2020-01-31 19:03:57 +00:00
|
|
|
check:
|
2023-02-11 18:48:52 +00:00
|
|
|
image: cr.yandex/crp9onavos88ug32d5r2/grader/go-build
|
2021-03-18 21:08:54 +00:00
|
|
|
variables:
|
|
|
|
DOCKER_HOST: tcp://docker:2375/
|
|
|
|
DOCKER_TLS_CERTDIR: ""
|
|
|
|
APP_HOST: docker
|
2021-03-22 19:20:48 +00:00
|
|
|
# services:
|
|
|
|
#- docker:dind
|
2020-01-31 19:03:57 +00:00
|
|
|
script:
|
2020-03-19 12:46:57 +00:00
|
|
|
- rm -rf lectures/ # do not run tests from lecture examples
|
2020-04-09 09:07:26 +00:00
|
|
|
- golangci-lint run --build-tags private,solution ./...
|
2021-03-22 19:20:48 +00:00
|
|
|
#- go test -v -tags private,solution ./...
|
|
|
|
#- go test -v -race -tags private,solution ./...
|
2023-02-22 13:02:34 +00:00
|
|
|
- sudo -u nobody HOME=/tmp PATH=$PATH /usr/local/go/bin/go test -tags private,solution ./...
|
|
|
|
- sudo -u nobody HOME=/tmp PATH=$PATH /usr/local/go/bin/go test -tags private,solution -race ./...
|
2020-01-31 19:03:57 +00:00
|
|
|
|
|
|
|
rebuild-base-image:
|
|
|
|
tags:
|
|
|
|
- docker
|
|
|
|
when: manual
|
|
|
|
script:
|
2023-02-11 18:48:52 +00:00
|
|
|
- docker build -f build.docker -t cr.yandex/crp9onavos88ug32d5r2/grader/go-build .
|
|
|
|
- docker push cr.yandex/crp9onavos88ug32d5r2/grader/go-build:latest
|
2020-01-31 19:03:57 +00:00
|
|
|
|
2020-02-01 00:35:28 +00:00
|
|
|
deploy:
|
2020-01-31 19:03:57 +00:00
|
|
|
only:
|
|
|
|
- master
|
|
|
|
tags:
|
|
|
|
- docker
|
|
|
|
script:
|
2023-02-11 18:48:52 +00:00
|
|
|
- docker pull cr.yandex/crp9onavos88ug32d5r2/grader/go-build:latest
|
|
|
|
- docker build -f testenv.docker -t cr.yandex/crp9onavos88ug32d5r2/grader/go .
|
|
|
|
- docker push cr.yandex/crp9onavos88ug32d5r2/grader/go:latest
|
2020-01-31 19:41:25 +00:00
|
|
|
|
2020-02-01 20:57:53 +00:00
|
|
|
build-slides:
|
2020-02-01 20:16:15 +00:00
|
|
|
only:
|
|
|
|
- master
|
|
|
|
tags:
|
|
|
|
- docker
|
|
|
|
script:
|
2023-02-11 18:48:52 +00:00
|
|
|
- docker build lectures -t cr.yandex/crp9onavos88ug32d5r2/go-lectures
|
|
|
|
- docker push cr.yandex/crp9onavos88ug32d5r2/go-lectures
|
2020-02-01 20:16:15 +00:00
|
|
|
|
2020-02-01 00:35:28 +00:00
|
|
|
push-to-public:
|
2022-05-05 19:31:35 +00:00
|
|
|
# stage: .post
|
2023-02-11 18:48:52 +00:00
|
|
|
image: cr.yandex/crp9onavos88ug32d5r2/grader/go
|
2020-02-01 00:35:28 +00:00
|
|
|
only:
|
|
|
|
- master
|
2022-05-05 19:31:35 +00:00
|
|
|
when: manual
|
2020-02-01 00:35:28 +00:00
|
|
|
script:
|
2020-02-01 00:54:20 +00:00
|
|
|
- git remote rm public || true
|
2020-02-01 00:52:09 +00:00
|
|
|
- git remote add -f public https://prime:${CI_PUSH_TOKEN}@gitlab.com/slon/shad-go.git
|
2020-02-01 00:35:28 +00:00
|
|
|
- git config --global user.email 'prime@yandex-team.ru'
|
|
|
|
- git config --global user.name 'Fedor Korotkiy'
|
2020-02-01 00:46:34 +00:00
|
|
|
- git fetch public
|
2020-02-01 00:54:20 +00:00
|
|
|
- git branch -D public || true
|
2020-02-01 00:46:34 +00:00
|
|
|
- git branch public public/master
|
2020-02-01 01:05:29 +00:00
|
|
|
- testtool export --push --move-to-master=false
|
2020-02-21 22:51:17 +00:00
|
|
|
- curl -F token=$TESTER_TOKEN https://go.manytask.org/api/sync_task_columns
|
2020-02-01 20:57:53 +00:00
|
|
|
|
|
|
|
deploy-slides:
|
|
|
|
stage: .post
|
|
|
|
only:
|
|
|
|
- master
|
|
|
|
tags:
|
|
|
|
- web
|
|
|
|
script:
|
|
|
|
- docker stop -t0 go-lectures || true
|
|
|
|
- docker rm go-lectures || true
|
2023-02-11 18:48:52 +00:00
|
|
|
- docker pull cr.yandex/crp9onavos88ug32d5r2/go-lectures
|
|
|
|
- docker run -p 3999:3999 -d --name go-lectures --restart=always cr.yandex/crp9onavos88ug32d5r2/go-lectures
|