mirror of
https://github.com/elyby/chrly.git
synced 2024-11-30 02:32:19 +05:30
Добавлен gitlab-ci
This commit is contained in:
parent
34179ae1fe
commit
1694403c79
33
.gitlab-ci.yml
Normal file
33
.gitlab-ci.yml
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
image: docker:latest
|
||||||
|
|
||||||
|
stages:
|
||||||
|
- build
|
||||||
|
- push
|
||||||
|
|
||||||
|
before_script:
|
||||||
|
- docker login -u gitlab-ci -p $CI_BUILD_TOKEN registry.ely.by
|
||||||
|
|
||||||
|
variables:
|
||||||
|
CONTAINER_IMAGE: registry.ely.by/elyby/skinsystem
|
||||||
|
|
||||||
|
build:
|
||||||
|
stage: build
|
||||||
|
script:
|
||||||
|
- export IMAGE_NAME="$CONTAINER_IMAGE:dev"
|
||||||
|
- docker build --pull -t $IMAGE_NAME .
|
||||||
|
- docker push $IMAGE_NAME
|
||||||
|
only:
|
||||||
|
- develop
|
||||||
|
|
||||||
|
push_tags:
|
||||||
|
stage: push
|
||||||
|
variables:
|
||||||
|
GIT_STRATEGY: none
|
||||||
|
script:
|
||||||
|
- export IMAGE_NAME="$CONTAINER_IMAGE:$CI_BUILD_TAG"
|
||||||
|
- docker tag $CONTAINER_IMAGE:dev $CONTAINER_IMAGE:latest
|
||||||
|
- docker tag $CONTAINER_IMAGE:latest $IMAGE_NAME
|
||||||
|
- docker push $IMAGE_NAME
|
||||||
|
- docker push $CONTAINER_IMAGE:latest
|
||||||
|
only:
|
||||||
|
- tags
|
Loading…
Reference in New Issue
Block a user