Skip to content

Commit 73744ff

Browse files
committed
feat(master): c/build.sh: Add master branch support for next release
I believe developing on master would improve the developer experience, and it can reduce propagation of changes on each release (CI etc?). For smoother transition master is currently building 8.x branch, we might want to switch to unreleased 9.x soon. At the moment master uses Dockerfile-8.x (not duplicated), same with repo file. Later we could introduce master repo baseurl, and use it in an unstable Dockerfile. Side note, would it make sense to use master by default if no arg passed ? If yes, I will do it in later change since it touches the API For the record this change was tested using the following commands: ``` cd ~/mnt/xcp-ng-build-env # https://github.com/xcp-ng/xcp-ng-build-env ./container/build.sh master cd ~/mnt/xcp-ng-release # https://github.com/xcp-ng-rpms/xcp-ng-release ~/mnt/xcp-ng-build-env/src/xcp_ng_dev/cli.py container build master . ``` Signed-off-by: Philippe Coval <philippe.coval@vates.tech>
1 parent 4d51f00 commit 73744ff

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

container/build.sh

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,16 @@ cd $(dirname "$0")
6969

7070
ALMA_VERSION=
7171
CENTOS_VERSION=
72-
case "$1" in
72+
XCP_NG_BRANCH="$1"
73+
IMAGE_BRANCH="${XCP_NG_BRANCH}"
74+
75+
case "$XCP_NG_BRANCH" in
76+
master)
77+
# TODO: keep aligned to next release
78+
XCP_NG_BRANCH=8.3
79+
DOCKERFILE=Dockerfile-8.x
80+
: ${PLATFORM:=linux/amd64}
81+
;;
7382
9.*)
7483
DOCKERFILE=Dockerfile-9.x
7584
ALMA_VERSION=10.0
@@ -80,14 +89,14 @@ case "$1" in
8089
: ${PLATFORM:=linux/amd64}
8190
;;
8291
*)
83-
echo >&2 "Unsupported release '$1'"
92+
echo >&2 "Unsupported release '${XCP_NG_BRANCH}'"
8493
exit 1
8594
;;
8695
esac
8796

8897
"$RUNNER" build \
8998
--platform "$PLATFORM" \
90-
-t ghcr.io/xcp-ng/xcp-ng-build-env:${1} \
91-
--build-arg XCP_NG_BRANCH=${1} \
99+
-t ghcr.io/xcp-ng/xcp-ng-build-env:${IMAGE_BRANCH} \
100+
--build-arg XCP_NG_BRANCH=${XCP_NG_BRANCH} \
92101
--ulimit nofile=1024 \
93102
-f $DOCKERFILE .

0 commit comments

Comments
 (0)