mirror of
https://github.com/elyby/chrly.git
synced 2024-12-23 21:50:03 +05:30
Тестирование включено в CI
This commit is contained in:
parent
4734bfd93c
commit
eec6b384b7
@ -1,17 +1,27 @@
|
|||||||
image: docker:latest
|
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
|
- test
|
||||||
- build
|
- build
|
||||||
- push
|
- push
|
||||||
|
|
||||||
before_script:
|
|
||||||
- docker login -u gitlab-ci -p $CI_BUILD_TOKEN registry.ely.by
|
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
CONTAINER_IMAGE: registry.ely.by/elyby/skinsystem
|
CONTAINER_IMAGE: registry.ely.by/elyby/skinsystem
|
||||||
|
|
||||||
|
test:
|
||||||
|
image: golang:1.8.3-stretch
|
||||||
|
stage: test
|
||||||
|
script:
|
||||||
|
- mkdir -p $GOPATH/src/$CI_PROJECT_NAMESPACE
|
||||||
|
- cp -r $(pwd) $GOPATH/src/$CI_PROJECT_PATH
|
||||||
|
- cd $GOPATH/src/$CI_PROJECT_PATH
|
||||||
|
- go get -u github.com/golang/dep/cmd/dep
|
||||||
|
- $GOPATH/bin/dep ensure
|
||||||
|
- go test $(go list ./... | grep -v /vendor/)
|
||||||
|
|
||||||
build:
|
build:
|
||||||
|
image: docker:latest
|
||||||
stage: build
|
stage: build
|
||||||
|
before_script:
|
||||||
|
- docker login -u gitlab-ci -p $CI_BUILD_TOKEN registry.ely.by
|
||||||
script:
|
script:
|
||||||
- export IMAGE_NAME="$CONTAINER_IMAGE:dev"
|
- export IMAGE_NAME="$CONTAINER_IMAGE:dev"
|
||||||
- docker build --pull -t $IMAGE_NAME .
|
- docker build --pull -t $IMAGE_NAME .
|
||||||
@ -20,9 +30,12 @@ build:
|
|||||||
- develop
|
- develop
|
||||||
|
|
||||||
push_tags:
|
push_tags:
|
||||||
|
image: docker:latest
|
||||||
stage: push
|
stage: push
|
||||||
variables:
|
variables:
|
||||||
GIT_STRATEGY: none
|
GIT_STRATEGY: none
|
||||||
|
before_script:
|
||||||
|
- docker login -u gitlab-ci -p $CI_BUILD_TOKEN registry.ely.by
|
||||||
script:
|
script:
|
||||||
- export IMAGE_NAME="$CONTAINER_IMAGE:$CI_BUILD_TAG"
|
- export IMAGE_NAME="$CONTAINER_IMAGE:$CI_BUILD_TAG"
|
||||||
- docker tag $CONTAINER_IMAGE:dev $CONTAINER_IMAGE:latest
|
- docker tag $CONTAINER_IMAGE:dev $CONTAINER_IMAGE:latest
|
||||||
|
Loading…
Reference in New Issue
Block a user