-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
34 lines (30 loc) · 1.18 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
image: docker:latest
services:
- docker:dind
stages:
- build
- publish
build:
stage: build
script:
- docker build
--pull
--tag registry.gitlab.com/peterkuczera/docker-oauth2-proxy/oauth2_proxy:$CI_COMMIT_SHA
.
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.gitlab.com
- docker push registry.gitlab.com/peterkuczera/docker-oauth2-proxy/oauth2_proxy:$CI_COMMIT_SHA
publish:
stage: publish
script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.gitlab.com
- docker pull registry.gitlab.com/peterkuczera/docker-oauth2-proxy/oauth2_proxy:$CI_COMMIT_SHA
- docker tag
registry.gitlab.com/peterkuczera/docker-oauth2-proxy/oauth2_proxy:$CI_COMMIT_SHA
registry.gitlab.com/peterkuczera/docker-oauth2-proxy/oauth2_proxy:2.2.0
- docker tag
registry.gitlab.com/peterkuczera/docker-oauth2-proxy/oauth2_proxy:$CI_COMMIT_SHA
registry.gitlab.com/peterkuczera/docker-oauth2-proxy/oauth2_proxy:latest
- docker push registry.gitlab.com/peterkuczera/docker-oauth2-proxy/oauth2_proxy:2.2.0
- docker push registry.gitlab.com/peterkuczera/docker-oauth2-proxy/oauth2_proxy:latest
only:
- master