docker
This commit is contained in:
@@ -89,6 +89,9 @@ Build:
|
|||||||
image: docker@sha256:c8bb6fa5388b56304dd770c4bc0478de81ce18540173b1a589178c0d31bfce90
|
image: docker@sha256:c8bb6fa5388b56304dd770c4bc0478de81ce18540173b1a589178c0d31bfce90
|
||||||
services:
|
services:
|
||||||
- docker:dind@sha256:c8bb6fa5388b56304dd770c4bc0478de81ce18540173b1a589178c0d31bfce90
|
- docker:dind@sha256:c8bb6fa5388b56304dd770c4bc0478de81ce18540173b1a589178c0d31bfce90
|
||||||
|
before_script:
|
||||||
|
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
|
||||||
|
|
||||||
script:
|
script:
|
||||||
# fetches the latest image (not failing if image is not found)
|
# fetches the latest image (not failing if image is not found)
|
||||||
- docker pull $CI_REGISTRY_IMAGE:latest || true
|
- docker pull $CI_REGISTRY_IMAGE:latest || true
|
||||||
@@ -104,9 +107,9 @@ Build:
|
|||||||
--label "org.opencontainers.image.created=$CI_JOB_STARTED_AT"
|
--label "org.opencontainers.image.created=$CI_JOB_STARTED_AT"
|
||||||
--label "org.opencontainers.image.revision=$CI_COMMIT_SHA"
|
--label "org.opencontainers.image.revision=$CI_COMMIT_SHA"
|
||||||
--label "org.opencontainers.image.version=$CI_COMMIT_REF_NAME"
|
--label "org.opencontainers.image.version=$CI_COMMIT_REF_NAME"
|
||||||
--tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
|
--tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA
|
||||||
.
|
.
|
||||||
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
|
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA
|
||||||
|
|
||||||
# Here, the goal is to tag the "master" branch as "latest"
|
# Here, the goal is to tag the "master" branch as "latest"
|
||||||
#Push latest:
|
#Push latest:
|
||||||
|
|||||||
Reference in New Issue
Block a user