Setting up CI

This commit is contained in:
Fedor Korotkiy 2020-01-31 22:03:57 +03:00
parent e1edf4b0b3
commit 6ebf29ab3b
5 changed files with 41 additions and 0 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
.idea

6
.grader-ci.yml Normal file
View file

@ -0,0 +1,6 @@
grade:
image: eu.gcr.io/shad-ts/grader/go
only:
- /^submits/.*$/
script:
- echo "Not implemented"

26
.releaser-ci.yml Normal file
View file

@ -0,0 +1,26 @@
check:
image: eu.gcr.io/shad-ts/grader/go-build
script:
- go test -tags private,solution ./...
- go test -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:
- curl -F token=$TESTER_TOKEN https://go.manytask.org/api/sync_task_columns
- 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

1
build.docker Normal file
View file

@ -0,0 +1 @@
FROM golang:1.13

7
testenv.docker Normal file
View file

@ -0,0 +1,7 @@
FROM eu.gcr.io/shad-ts/grader/go-build:latest
RUN go install gitlab.com/slon/shad-go/tools/testtool
COPY . /opt/shad
RUN find /opt/shad/private -name '*.cpp' -or -name '*.h' | xargs chmod o-rwx