From f61ad909b3d68c06bc38df653d9a63a1ff74160a Mon Sep 17 00:00:00 2001 From: Oliver Bertuch Date: Thu, 23 Jan 2020 02:19:21 +0100 Subject: [PATCH] Hotfix Jenkinsfiles with typos in env var names --- docker/dataverse-k8s/Jenkinsfile | 4 ++-- docker/solr-k8s/Jenkinsfile | 6 +++--- docs/images/push-description.sh | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docker/dataverse-k8s/Jenkinsfile b/docker/dataverse-k8s/Jenkinsfile index 4b4c5ba4..1bb94bfc 100644 --- a/docker/dataverse-k8s/Jenkinsfile +++ b/docker/dataverse-k8s/Jenkinsfile @@ -11,7 +11,7 @@ void setBuildStatus(String message, String state) { pipeline { agent any environment { - DOCKER_IMAGE = "iqss/dataverse-k8s" + DOCKER_IMAGE_NAME = "iqss/dataverse-k8s" DOCKER_IMAGE_TAG = "build-${env.BRANCH_NAME}" DOCKER_FILE = "./docker/dataverse-k8s/glassfish/Dockerfile" DOCKER_WORKDIR = "." @@ -36,7 +36,7 @@ pipeline { } steps { script { - docker_image = docker.build("${env.DOCKER_IMAGE}:${env.DOCKER_IMAGE_TAG}", "--pull -f ${env.DOCKER_FILE} ${env.DOCKER_WORKDIR}") + docker_image = docker.build("${env.DOCKER_IMAGE_NAME}:${env.DOCKER_IMAGE_TAG}", "--pull -f ${env.DOCKER_FILE} ${env.DOCKER_WORKDIR}") } } } diff --git a/docker/solr-k8s/Jenkinsfile b/docker/solr-k8s/Jenkinsfile index 6b70c97b..3ace78e1 100644 --- a/docker/solr-k8s/Jenkinsfile +++ b/docker/solr-k8s/Jenkinsfile @@ -11,7 +11,7 @@ void setBuildStatus(String message, String state) { pipeline { agent any environment { - DOCKER_IMAGE = "iqss/solr-k8s" + DOCKER_IMAGE_NAME = "iqss/solr-k8s" DOCKER_IMAGE_TAG = "build-${env.BRANCH_NAME}" DOCKER_WORKDIR = "docker/solr-k8s" DOCKER_HUB_CRED = "dockerhub-dataversebot" @@ -35,7 +35,7 @@ pipeline { } steps { script { - docker_image = docker.build("${env.DOCKER_IMAGE}:${env.DOCKER_IMAGE_TAG}", "--pull ${env.DOCKER_WORKDIR}") + docker_image = docker.build("${env.DOCKER_IMAGE_NAME}:${env.DOCKER_IMAGE_TAG}", "--pull ${env.DOCKER_WORKDIR}") } } } @@ -58,7 +58,7 @@ pipeline { } steps { script { - docker.withRegistry("${env.DOCKER_REGISTRY}", "${env.DOCKER_HUB_LOGIN}") { + docker.withRegistry("${env.DOCKER_REGISTRY}", "${env.DOCKER_HUB_CRED}") { docker_image.push("${env.DOCKER_IMAGE_TAG}") } } diff --git a/docs/images/push-description.sh b/docs/images/push-description.sh index 19528af5..2dcfc75a 100755 --- a/docs/images/push-description.sh +++ b/docs/images/push-description.sh @@ -19,7 +19,7 @@ TOKEN=$(curl -sS -f -H "Content-Type: application/json" -X POST -d ${LOGIN_PAYLO # Send a PATCH request to update the description of the repository echo "Sending PATCH request" -REPO_URL="https://hub.docker.com/v2/repositories/${DOCKER_IMAGE}/" +REPO_URL="https://hub.docker.com/v2/repositories/${DOCKER_IMAGE_NAME}/" RESPONSE_CODE=$(curl -sS -f --write-out %{response_code} --output /dev/null -H "Authorization: JWT ${TOKEN}" -X PATCH --data-urlencode full_description@${DESCRIPTION_FILE} ${REPO_URL}) echo "Received response code: $RESPONSE_CODE"