-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
19 lines (18 loc) · 1012 Bytes
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
stages:
- docker-build
docker-build:
image: docker.io/library/docker:latest
stage: docker-build
script:
# - export C7N_COMMIT_SHA=$(echo ${CI_COMMIT_SHA:-abcdefghijklmhopqrst} | awk '{print substr($1,1,8)}')
- docker login ${MY_DOCKER_REGISTRY} --password ${DOCKER_PASSWORD} --username ${DOCKER_USER}
# - docker build . -t ${MY_DOCKER_REGISTRY}/hzero-fe-public/distributed-nginx:${C7N_COMMIT_SHA}
- docker build . -t ${MY_DOCKER_REGISTRY}/hzero-fe-public/distributed-nginx:${DOCKER_IMAGE_VERSION:-1.24.0}
# - docker push ${MY_DOCKER_REGISTRY}/hzero-fe-public/distributed-nginx:${C7N_COMMIT_SHA}
# - docker tag ${MY_DOCKER_REGISTRY}/hzero-fe-public/distributed-nginx:${C7N_COMMIT_SHA} ${MY_DOCKER_REGISTRY}/hzero-fe-public/distributed-nginx:0.0.1
- docker push ${MY_DOCKER_REGISTRY}/hzero-fe-public/distributed-nginx:${DOCKER_IMAGE_VERSION:-1.24.0}
# - docker push ${MY_DOCKER_REGISTRY}/hzero-fe-public/distributed-nginx:0.0.1
only:
- master
# tags:
# - docker