This repository has been archived by the owner on Mar 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
variables: | ||
DOCKER_DRIVER: overlay | ||
REPO_NAME: registry.gitlab.com/alxrem/prometheus-logstash-exporter | ||
|
||
build_test_image: | ||
variables: | ||
TAG: $CI_COMMIT_REF_SLUG | ||
image: docker:latest | ||
services: | ||
- docker:dind | ||
stage: build | ||
only: | ||
- branches | ||
except: | ||
- master | ||
when: manual | ||
script: | ||
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.gitlab.com | ||
- docker build -t $REPO_NAME:$TAG . | ||
- docker push $REPO_NAME:$TAG | ||
|
||
build_release_image: | ||
variables: | ||
TAG: $CI_COMMIT_TAG | ||
image: docker:latest | ||
services: | ||
- docker:dind | ||
stage: build | ||
only: | ||
- tags | ||
script: | ||
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.gitlab.com | ||
- docker build -t $REPO_NAME:$TAG . | ||
- docker tag $REPO_NAME:$TAG $REPO_NAME:latest | ||
- docker push $REPO_NAME:$TAG | ||
- docker push $REPO_NAME:latest |