testing registry
This commit is contained in:
@@ -31,8 +31,6 @@ variables:
|
|||||||
# See https://github.com/docker-library/docker/pull/166
|
# See https://github.com/docker-library/docker/pull/166
|
||||||
DOCKER_TLS_CERTDIR: "/certs"
|
DOCKER_TLS_CERTDIR: "/certs"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
make_image:
|
make_image:
|
||||||
stage: build
|
stage: build
|
||||||
needs:
|
needs:
|
||||||
@@ -42,7 +40,6 @@ make_image:
|
|||||||
- docker:26.1.3-dind
|
- docker:26.1.3-dind
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- unset DOCKER_HOST
|
|
||||||
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
|
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
|
||||||
|
|
||||||
script:
|
script:
|
||||||
@@ -72,6 +69,8 @@ Push latest:
|
|||||||
# We do not need GitLab to clone the source code.
|
# We do not need GitLab to clone the source code.
|
||||||
GIT_STRATEGY: none
|
GIT_STRATEGY: none
|
||||||
stage: push
|
stage: push
|
||||||
|
before_script:
|
||||||
|
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
|
||||||
script:
|
script:
|
||||||
# Because we have no guarantee that this job will be picked up by the same runner
|
# Because we have no guarantee that this job will be picked up by the same runner
|
||||||
# that built the image in the previous step, we pull it again locally
|
# that built the image in the previous step, we pull it again locally
|
||||||
@@ -88,6 +87,8 @@ Push commit:
|
|||||||
# Again, we do not need the source code here. Just playing with Docker.
|
# Again, we do not need the source code here. Just playing with Docker.
|
||||||
GIT_STRATEGY: none
|
GIT_STRATEGY: none
|
||||||
stage: push
|
stage: push
|
||||||
|
before_script:
|
||||||
|
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
|
||||||
script:
|
script:
|
||||||
- docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
|
- docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
|
||||||
- docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
|
- docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
|
||||||
@@ -101,6 +102,8 @@ Push tag:
|
|||||||
only:
|
only:
|
||||||
# We want this job to be run on tags only.
|
# We want this job to be run on tags only.
|
||||||
- tags
|
- tags
|
||||||
|
before_script:
|
||||||
|
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
|
||||||
script:
|
script:
|
||||||
- docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
|
- docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
|
||||||
- docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
|
- docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
|
||||||
|
|||||||
Reference in New Issue
Block a user