Skip to content

Commit efa0e4a

Browse files
authored
Merge pull request #16596 from h2oai/valenad-GH-16527-cherry-pick-docker-fix
GH-16527 Cherry pick docker release fix
2 parents b7600ff + 5f75f13 commit efa0e4a

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

scripts/jenkins/Makefile.jenkins

+2-2
Original file line numberDiff line numberDiff line change
@@ -678,10 +678,10 @@ h2o-k8s-docker-copy-resources:
678678
cp h2o-assemblies/$(H2O_ASSEMBLY)/build/libs/$(H2O_ASSEMBLY).jar h2o-assemblies/$(H2O_ASSEMBLY)/build/tmp_docker/h2o.jar
679679
cp LICENSE h2o-assemblies/$(H2O_ASSEMBLY)/build/tmp_docker/
680680

681-
h2o-k8s-docker-build: h2o-k8s-docker-copy-resources
681+
h2o-k8s-docker-build:
682682
docker build --build-arg H2O_VERSION=$(DOCKER_IMAGE_TAG) -t $(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_TAG) -f docker/public/Dockerfile-h2o-release h2o-assemblies/$(H2O_ASSEMBLY)/build/tmp_docker/
683683

684-
h2o-k8s-docker-build-latest: h2o-k8s-docker-copy-resources
684+
h2o-k8s-docker-build-latest:
685685
docker build --build-arg H2O_VERSION=$(DOCKER_IMAGE_TAG) -t $(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_TAG) -t $(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_LATEST_TAG) -f docker/public/Dockerfile-h2o-release h2o-assemblies/$(H2O_ASSEMBLY)/build/tmp_docker/
686686

687687
h2o-k8s-docker-push:

scripts/jenkins/jenkinsfiles/Jenkinsfile-Release

+15-4
Original file line numberDiff line numberDiff line change
@@ -571,12 +571,23 @@ EOF
571571
pipelineContext.getBuildSummary().addStageSummary(this, BUILD_H2O_DOCKER_STAGE_NAME, env.BUILD_NUMBER_DIR)
572572
pipelineContext.getBuildSummary().setStageDetails(this, BUILD_H2O_DOCKER_STAGE_NAME, env.NODE_NAME, env.WORKSPACE)
573573
withCredentials([
574-
usernamePassword(credentialsId: 'dockerhub', passwordVariable: 'DOCKERHUB_PASSWORD', usernameVariable: 'DOCKERHUB_USERNAME'),
575-
string(credentialsId: 'H2O_RED_HAT_REGISTRY_KEY', variable: 'H2O_RED_HAT_REGISTRY_KEY'),
576-
string(credentialsId: 'H2O_RED_HAT_PID', variable: 'H2O_RED_HAT_PID'),
577-
string(credentialsId: 'H2O_RED_HAT_APIKEY', variable: 'H2O_RED_HAT_APIKEY')
574+
usernamePassword(credentialsId: 'dockerhub', passwordVariable: 'DOCKERHUB_PASSWORD', usernameVariable: 'DOCKERHUB_USERNAME')
578575
]) {
579576
env["H2O_ASSEMBLY"] = assemblyName
577+
578+
// Copy resources outside of the build task because of the permissions
579+
insideDocker([], pipelineContext.getBuildConfig().getReleaseImage(), pipelineContext.getBuildConfig().DOCKER_REGISTRY, pipelineContext.getBuildConfig(), 2, 'HOURS', "") {
580+
sh """
581+
id
582+
printenv | sort
583+
ls -la
584+
cd ${env.BUILD_NUMBER_DIR}
585+
ls -la
586+
587+
make -f scripts/jenkins/Makefile.jenkins h2o-k8s-docker-copy-resources
588+
"""
589+
}
590+
580591
if (params.TEST_RELEASE) {
581592
env["DOCKER_IMAGE_NAME"] = "opsh2oai/${imageType}-test"
582593
// Test release goes to opsh2oai namespace

0 commit comments

Comments
 (0)