Keep the old image labels for backwards compatibility, just for now
Remove the filename scope: I want this to run every time we push, just
for now. We'll make this faster with caching soon.
- tags
script:
- cd ci/$IMAGE
- - docker build -t $CI_REGISTRY/graphviz/graphviz:$IMAGE .
- - docker push $CI_REGISTRY/graphviz/graphviz:$IMAGE
+ # Build and push with git commit SHA
+ - docker build -t $CI_REGISTRY/graphviz/graphviz/$IMAGE:$CI_COMMIT_SHA
+ - docker push $CI_REGISTRY/graphviz/graphviz/$IMAGE:$CI_COMMIT_SHA
+ # Re-tag, backwards compatibility for the tests which are still using graphviz/graphviz:image-name
+ - docker tag $CI_REGISTRY/graphviz/graphviz/$IMAGE:$CI_COMMIT_SHA $CI_REGISTRY/graphviz/graphviz:$IMAGE
+ - docker push $CI_REGISTRY/graphviz/graphviz:$IMAGE
only:
refs:
- master@graphviz/graphviz
- changes:
- - ci/$IMAGE/Dockerfile
docker_build_centos7:
<<: *docker_build_definition