Skip to content

Commit 96b8ab7

Browse files
committed
Update pipeline
1 parent 1fbec62 commit 96b8ab7

File tree

1 file changed

+29
-10
lines changed

1 file changed

+29
-10
lines changed

.circleci/config.yml

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,23 @@ version: 2
22
jobs:
33
frontend:
44
docker:
5-
- image: circleci/node:10.24.1
5+
- image: cimg/node:16.15
66
steps:
77
- checkout
88
- run:
99
name: "Install dependencies"
1010
command: yarn install
1111
- run:
1212
name: "Build"
13-
command: yarn run build
13+
command: yarn build
1414
- persist_to_workspace:
1515
root: .
1616
paths:
1717
- dist/*
1818

1919
backend:
2020
docker:
21-
- image: circleci/golang:1.17
22-
working_directory: /go/src/github.com/RoboCup-SSL/ssl-status-board
21+
- image: cimg/go:1.18
2322
steps:
2423
- checkout
2524
- attach_workspace:
@@ -35,6 +34,10 @@ jobs:
3534
GOOS=linux GOARCH=arm packr build -o ../../release/ssl-status-board_linux_arm
3635
GOOS=darwin GOARCH=amd64 packr build -o ../../release/ssl-status-board_darwin_amd64
3736
GOOS=windows GOARCH=amd64 packr build -o ../../release/ssl-status-board_windows_amd64.exe
37+
- run:
38+
command: |
39+
mkdir -p release
40+
tar czf release/bootstrap.tar.gz rpi
3841
- persist_to_workspace:
3942
root: .
4043
paths:
@@ -45,7 +48,7 @@ jobs:
4548

4649
publish-github-release:
4750
docker:
48-
- image: circleci/golang:1.17
51+
- image: cimg/go:1.18
4952
steps:
5053
- attach_workspace:
5154
at: .
@@ -60,16 +63,26 @@ jobs:
6063
- run:
6164
name: "Publish Release on GitHub"
6265
command: |
63-
go get github.com/tcnksm/ghr
66+
go install github.com/tcnksm/ghr@v0.14.0
6467
ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete ${CIRCLE_TAG} ./release/
6568
66-
docker:
69+
docker-build:
6770
docker:
68-
- image: cimg/base:2022.04
71+
- image: cimg/base:2022.06
6972
steps:
7073
- checkout
7174
- setup_remote_docker:
72-
version: 20.10.6
75+
version: 20.10.11
76+
- run: |
77+
docker build .
78+
79+
docker-build-and-push:
80+
docker:
81+
- image: cimg/base:2022.06
82+
steps:
83+
- checkout
84+
- setup_remote_docker:
85+
version: 20.10.11
7386
- run: |
7487
TAG=${CIRCLE_TAG:1}
7588
TAG=${TAG:-latest}
@@ -92,14 +105,20 @@ workflows:
92105
tags:
93106
only: /.*/
94107
- publish-github-release:
108+
context: github
95109
requires:
96110
- backend
97111
filters:
98112
branches:
99113
ignore: /.*/
100114
tags:
101115
only: /^v.*/
102-
- docker:
116+
- docker-build:
117+
context: docker hub
118+
filters:
119+
branches:
120+
ignore: master
121+
- docker-build-and-push:
103122
context: docker hub
104123
filters:
105124
branches:

0 commit comments

Comments
 (0)