Created
July 20, 2018 11:50
-
-
Save ynott/4f4a9aa07600f6e5e6603e2dac9df269 to your computer and use it in GitHub Desktop.
.gitlab-ci.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file is a template, and might need editing before it works on your project. | |
# Official docker image. | |
image: docker:latest | |
services: | |
- docker:dind | |
stages: | |
- build | |
before_script: | |
- docker info | |
- docker login -u "gitlab-ci-token" -p "$CI_JOB_TOKEN" $CI_REGISTRY | |
- export IMAGE_TAG="${CI_BUILD_TAG-${CI_COMMIT_SHA:0:8}}" | |
fluent-twitter: | |
stage: build | |
script: | |
- docker build --pull -t "${CI_REGISTRY_IMAGE}/${CI_JOB_NAME}:${IMAGE_TAG}" "fluent/${CI_JOB_NAME}" | |
- docker push "${CI_REGISTRY_IMAGE}/${CI_JOB_NAME}:${IMAGE_TAG}" | |
- docker tag "${CI_REGISTRY_IMAGE}/${CI_JOB_NAME}:${IMAGE_TAG}" "${CI_REGISTRY_IMAGE}/${CI_JOB_NAME}" | |
- docker push "${CI_REGISTRY_IMAGE}/${CI_JOB_NAME}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment