forked from eclipse-che/che-devfile-registry
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
executable file
·28 lines (27 loc) · 1.18 KB
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/sh
#
# Copyright (c) 2012-2018 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
# Build Che devfile registry image. Note that this script will read the version
# in ./VERSION; if it is *-SNAPSHOT, devfiles in the registry will use nightly-tagged
# images with the arbitrary user IDs patch. If ./VERSION contains otherwise,
# the devfiles in the registry will instead use the value in ./VERSION.
#
VERSION=$(head -n 1 VERSION)
case $VERSION in
*SNAPSHOT)
echo "Snapshot version (${VERSION}) specified in $(find . -name VERSION): building nightly plugin registry."
docker build -t "quay.io/eclipse/che-devfile-registry:nightly" -f ./build/dockerfiles/Dockerfile --target registry .
;;
*)
echo "Release version specified in $(find . -name VERSION): Building plugin registry for release ${VERSION}."
docker build -t "quay.io/eclipse/che-devfile-registry:${VERSION}" -f ./build/dockerfiles/Dockerfile . \
--build-arg "PATCHED_IMAGES_TAG=${VERSION}" \
--target registry
;;
esac