Skip to content
Snippets Groups Projects
Commit 4870e5ba authored by Bo-Chun Chen's avatar Bo-Chun Chen
Browse files

Tag image with date and push to registry

parent 1a475eb4
No related branches found
No related tags found
No related merge requests found
......@@ -53,9 +53,8 @@ build_docker_image:
wget https://releases.hashicorp.com/packer/$PACKER_VER/packer_${PACKER_VER}_linux_amd64.zip -O packer.zip
unzip packer.zip
rm packer.zip
- docker build -t $CI_REGISTRY_IMAGE:latest .
- docker push $CI_REGISTRY_IMAGE:$BUILD_DATE
- docker push $CI_REGISTRY_IMAGE:latest
- docker build -t $CI_REGISTRY_IMAGE:$BUILD_DATE -t $CI_REGISTRY_IMAGE:latest .
- docker push --all-tags $CI_REGISTRY_IMAGE
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
changes:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment