Skip to content

Commit 652a453

Browse files
committed
Fix Jenkinsfile to also build webhook and controller images
1 parent dbab8fe commit 652a453

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

Jenkinsfile

+14-3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ pipeline {
55
environment {
66
VERSION = readFile "${env.WORKSPACE}/version.txt"
77
BUILD_BRANCH = readFile "${env.WORKSPACE}/build_branch.txt"
8+
DOCKER_REGISTRY = "docker.hops.works"
9+
CONTROLLER_IMAGE = "${DOCKER_REGISTRY}/hopsworks/rss-controller:${VERSION}"
10+
WEBHOOK_IMAGE = "${DOCKER_REGISTRY}/hopsworks/rss-webhook:${VERSION}"
811
}
912
stages {
1013
stage("checkout") {
@@ -26,18 +29,26 @@ pipeline {
2629
sh """
2730
set -ex
2831
echo "Building RSS version ${VERSION} on branch ${BUILD_BRANCH}"
29-
docker login -u ${NEXUS_CREDS_USR} -p ${NEXUS_CREDS_PSW} docker.hops.works
32+
docker login -u ${NEXUS_CREDS_USR} -p ${NEXUS_CREDS_PSW} $DOCKER_REGISTRY
3033
3134
./build_distribution.sh --spark3-profile spark3 --hadoop-profile hadoop3.2 --without-dashboard
3235
cd deploy/kubernetes/docker || exit
33-
./build.sh --hadoop-version 3.2.0.14-EE-RC0 --registry docker.hops.works --nexus-user $NEXUS_CREDS_USR --nexus-password $NEXUS_CREDS_PSW
36+
./build.sh --hadoop-version 3.2.0.14-EE-RC0 --registry $DOCKER_REGISTRY --nexus-user $NEXUS_CREDS_USR --nexus-password $NEXUS_CREDS_PSW
3437
cd ../../..
3538
3639
mkdir -p /opt/repository/master/rss/${VERSION}/
3740
cp client-spark/spark3-shaded/target/rss-client-spark3-shaded-${VERSION}.jar /opt/repository/master/rss/${VERSION}/
41+
42+
# build the controller and webhook images
43+
cd deploy/kubernetes/operator || exit 1
44+
docker build . --progress=plain -t $CONTROLLER_IMAGE --build-arg MODULE=controller -f hack/Dockerfile
45+
docker build . --progress=plain -t $WEBHOOK_IMAGE --build-arg MODULE=webhook -f hack/Dockerfile
46+
# push the controller and webhook images
47+
docker push $CONTROLLER_IMAGE
48+
docker push $WEBHOOK_IMAGE
3849
"""
3950
}
4051
}
4152
}
4253
}
43-
}
54+
}

deploy/kubernetes/docker/build.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ GIT_COMMIT=$(git describe --dirty --always --tags | sed 's/-/./g')
140140
IMAGE_VERSION=$(cat $RSS_DIR/version.txt | awk '{$1=$1; print}' | sed '/^$/d')
141141
IMAGE=$REGISTRY/rss-server:$IMAGE_VERSION
142142
echo "image version: ${IMAGE_VERSION}"
143-
IMAGE=$REGISTRY/rss:$IMAGE_VERSION
143+
IMAGE=$REGISTRY/hopsworks/rss:$IMAGE_VERSION
144144
echo "building image: $IMAGE"
145145

146146
DOCKER_BUILDKIT=1 docker build --network=host -t "$IMAGE" \

0 commit comments

Comments
 (0)