1
0
mirror of https://github.com/gsi-upm/senpy synced 2024-11-24 17:12:29 +00:00

Fix docker latest image

This commit is contained in:
J. Fernando Sánchez 2022-05-23 16:03:30 +02:00
parent 55e5ce3a66
commit efa93f5456

View File

@ -11,6 +11,7 @@ stages:
variables:
KUBENS: senpy
LATEST_IMAGE: "${HUB_REPO}:${CI_COMMIT_SHORT_SHA}"
docker:
stage: publish
@ -43,7 +44,7 @@ docker-latest:
- sed "s/{{PYVERSION}}/$PYTHON_VERSION/" Dockerfile.template > Dockerfile
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"},\"https://index.docker.io/v1/\":{\"auth\":\"$HUB_AUTH\"}}}" > /kaniko/.docker/config.json
# The skip-tls-verify flag is there because our registry certificate is self signed
- /kaniko/executor --context $CI_PROJECT_DIR --skip-tls-verify --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $HUB_REPO:$CI_COMMIT_SHORT_SHA
- /kaniko/executor --context $CI_PROJECT_DIR --skip-tls-verify --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $LATEST_IMAGE --destination "${HUB_REPO}:latest"
only:
refs:
- master
@ -103,7 +104,8 @@ latest-demo:
environment: production
variables:
KUBECONFIG: "/kubeconfig"
IMAGEWTAG: "${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHORT_SHA}"
# Same image as docker-latest
IMAGEWTAG: "${LATEST_IMAGE}"
KUBEAPP: "senpy"
script:
- echo "${KUBECONFIG_RAW}" > $KUBECONFIG