image: docker:latest stages: - publish docker: stage: publish before_script: - docker login -u $CI_REGISTRY_USER -p $CI_JOB_TOKEN $CI_REGISTRY script: - docker build --no-cache -t "$CI_REGISTRY_IMAGE:latest" -t ztimson/node-exporter:latest . - docker push "$CI_REGISTRY_IMAGE:latest" - docker push "ztimson/node-exporter:latest" rules: - if: $CI_COMMIT_BRANCH