shad-go/.releaser-ci.yml

82 lines
2.7 KiB
YAML
Raw Permalink Normal View History

2020-01-31 19:03:57 +00:00
check:
image: gitlab.manytask.org:5050/go/public-2024-spring/build
2020-01-31 19:03:57 +00:00
script:
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:18:16 +00:00
- sudo -u nobody HOME=/tmp PATH=$PATH git config --global --add safe.directory /builds/slon/shad-go-private
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:
- docker build -f build.docker -t gitlab.manytask.org:5050/go/public-2024-spring/build .
- docker push gitlab.manytask.org:5050/go/public-2024-spring/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:
- docker pull gitlab.manytask.org:5050/go/public-2024-spring/build:latest
- docker build -f testenv.docker -t gitlab.manytask.org:5050/go/public-2024-spring .
- docker push gitlab.manytask.org:5050/go/public-2024-spring:latest
2020-02-01 20:57:53 +00:00
build-slides:
2020-02-01 20:16:15 +00:00
only:
- master
tags:
- docker
script:
- docker build lectures -t gitlab.manytask.org:5050/go/public-2024-spring/lectures
- docker push gitlab.manytask.org:5050/go/public-2024-spring/lectures
2020-02-01 20:16:15 +00:00
update-config:
2020-02-01 00:35:28 +00:00
only:
- master
script:
- >
curl -v --fail --silent -X POST \
-H "Authorization: Bearer $TESTER_TOKEN" \
-H "Content-type: application/x-yaml" \
--data-binary "@.manytask.yml" \
https://go.manytask.org/api/update_config
- >
curl -v --fail --silent -X POST \
-H "Authorization: Bearer $TESTER_TOKEN" \
https://go.manytask.org/api/update_cache
2020-02-01 20:57:53 +00:00
push-to-public:
2023-03-10 12:39:03 +00:00
stage: .post
image: gitlab.manytask.org:5050/go/public-2024-spring
parallel:
matrix:
- REMOTE:
- git@github.com:slon/shad-go.git
- git@gitlab.manytask.org:go/public-2024-spring.git
2023-03-10 11:47:27 +00:00
only:
- master
script:
- testtool list-private-files > /tmp/private_files.txt
2023-03-10 11:51:45 +00:00
- git filter-repo --force --paths-from-file /tmp/private_files.txt --invert-path
2023-03-10 12:27:51 +00:00
- echo $GITHUB_PUSH_KEY | base64 -d > private.key && chmod go-rwx private.key
2023-03-10 12:00:48 +00:00
- git branch -D main || true
2023-03-10 11:47:27 +00:00
- git checkout -b main
2023-03-10 12:05:04 +00:00
- git remote rm github || true
- env GIT_SSH_COMMAND="ssh -i ${PWD}/private.key -o StrictHostKeyChecking=no" git remote add -f github $REMOTE
2023-03-10 12:37:54 +00:00
- env GIT_SSH_COMMAND="ssh -i ${PWD}/private.key -o StrictHostKeyChecking=no" git push github main
2023-03-10 11:47:27 +00:00
2020-02-01 20:57:53 +00:00
deploy-slides:
stage: .post
only:
- master
tags:
- web
script:
- docker pull gitlab.manytask.org:5050/go/public-2024-spring/lectures
2023-02-22 13:33:01 +00:00
- cd /srv/manytask/go && docker compose up -d