Skip to content

Commit b763c31

Browse files
committed
relay: Push image to Nexus in addition to DockerHub
Add an oci_push Bazel target for artifacts.lan.tribe29.com:4000 and a corresponding Jenkins pipeline stage that logs in with the 'nexus' credential and pushes the relay image, mirroring the existing DockerHub stage. Change-Id: I971812b50455a39ed8b62a5a8fe2211c44e6bfa9
1 parent 5161320 commit b763c31

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

buildscripts/scripts/build-cmk-relay-image.groovy

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,29 @@ void main() {
104104
}
105105
}
106106
}
107+
108+
// RC builds are only pushed to nexus. never to dockerhub
109+
smart_stage(
110+
name: "Push image to Nexus",
111+
condition: push_to_registry && is_release_candidate,
112+
) {
113+
withCredentials([
114+
usernamePassword(
115+
credentialsId: "nexus",
116+
passwordVariable: 'NEXUS_PASSWORD',
117+
usernameVariable: 'NEXUS_USERNAME'),
118+
]) {
119+
withEnv(["DOCKER_CONFIG=${checkout_dir}/.docker"]) {
120+
sh('''
121+
mkdir -p ${DOCKER_CONFIG}
122+
echo "${NEXUS_PASSWORD}" | docker login --password-stdin -u "${NEXUS_USERNAME}" artifacts.lan.tribe29.com:4000
123+
''')
124+
sh("""
125+
bazel run --cmk_edition=ultimate //omd/non-free/relay:image_push_nexus -- --tag ${cmk_version}
126+
""")
127+
}
128+
}
129+
}
107130
}
108131
}
109132
}

0 commit comments

Comments
 (0)