64 lines
1.8 KiB
YAML
64 lines
1.8 KiB
YAML
check:
|
|
image: eu.gcr.io/shad-ts/grader/go-build
|
|
script:
|
|
- golangci-lint run --build-tags private,solution ./...
|
|
- rm -rf lectures/ # do not run tests from lecture examples
|
|
- go test -v -tags private,solution ./...
|
|
- go test -v -race -tags private,solution ./...
|
|
|
|
rebuild-base-image:
|
|
only:
|
|
- master
|
|
tags:
|
|
- docker
|
|
when: manual
|
|
script:
|
|
- docker build -f build.docker -t eu.gcr.io/shad-ts/grader/go-build .
|
|
- docker push eu.gcr.io/shad-ts/grader/go-build:latest
|
|
|
|
deploy:
|
|
only:
|
|
- master
|
|
tags:
|
|
- docker
|
|
script:
|
|
- docker pull eu.gcr.io/shad-ts/grader/go-build:latest
|
|
- docker build -f testenv.docker -t eu.gcr.io/shad-ts/grader/go .
|
|
- docker push eu.gcr.io/shad-ts/grader/go:latest
|
|
|
|
build-slides:
|
|
only:
|
|
- master
|
|
tags:
|
|
- docker
|
|
script:
|
|
- docker build lectures -t eu.gcr.io/shad-ts/go-lectures
|
|
- docker push eu.gcr.io/shad-ts/go-lectures
|
|
|
|
push-to-public:
|
|
stage: .post
|
|
image: eu.gcr.io/shad-ts/grader/go
|
|
only:
|
|
- master
|
|
script:
|
|
- git remote rm public || true
|
|
- git remote add -f public https://prime:${CI_PUSH_TOKEN}@gitlab.com/slon/shad-go.git
|
|
- git config --global user.email 'prime@yandex-team.ru'
|
|
- git config --global user.name 'Fedor Korotkiy'
|
|
- git fetch public
|
|
- git branch -D public || true
|
|
- git branch public public/master
|
|
- testtool export --push --move-to-master=false
|
|
- curl -F token=$TESTER_TOKEN https://go.manytask.org/api/sync_task_columns
|
|
|
|
deploy-slides:
|
|
stage: .post
|
|
only:
|
|
- master
|
|
tags:
|
|
- web
|
|
script:
|
|
- docker stop -t0 go-lectures || true
|
|
- docker rm go-lectures || true
|
|
- docker pull eu.gcr.io/shad-ts/go-lectures
|
|
- docker run -p 3999:3999 -d --name go-lectures --restart=always eu.gcr.io/shad-ts/go-lectures
|