Setting up CI
This commit is contained in:
parent
e1edf4b0b3
commit
6ebf29ab3b
5 changed files with 41 additions and 0 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
.idea
|
6
.grader-ci.yml
Normal file
6
.grader-ci.yml
Normal 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
26
.releaser-ci.yml
Normal 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
1
build.docker
Normal file
|
@ -0,0 +1 @@
|
||||||
|
FROM golang:1.13
|
7
testenv.docker
Normal file
7
testenv.docker
Normal 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
|
Loading…
Reference in a new issue