Skip to content

Commit efd42c8

Browse files
committed
Build docker image with circleci
1 parent 678f535 commit efd42c8

File tree

2 files changed

+24
-3
lines changed

2 files changed

+24
-3
lines changed

.circleci/config.yml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121

2222
backend:
2323
docker:
24-
- image: circleci/golang:1.14
24+
- image: circleci/golang:1.16
2525
working_directory: /go/src/github.com/RoboCup-SSL/ssl-game-controller
2626
steps:
2727
- checkout
@@ -47,7 +47,7 @@ jobs:
4747

4848
publish-github-release:
4949
docker:
50-
- image: circleci/golang:1.14
50+
- image: circleci/golang:1.16
5151
steps:
5252
- attach_workspace:
5353
at: .
@@ -65,6 +65,20 @@ jobs:
6565
go get github.com/tcnksm/ghr
6666
ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete ${CIRCLE_TAG} ./release/gh/
6767
68+
docker:
69+
docker:
70+
- image: cimg/base:2021.04
71+
steps:
72+
- checkout
73+
- setup_remote_docker:
74+
version: 20.10.6
75+
- run: |
76+
TAG=${CIRCLE_TAG:1}
77+
TAG=${TAG:-latest}
78+
docker build -t robocupssl/ssl-simulation-controller:$TAG .
79+
docker login -u "${DOCKER_HUB_USERNAME}" -p "${DOCKER_HUB_PASSWORD}"
80+
docker push robocupssl/ssl-simulation-controller:$TAG
81+
6882
workflows:
6983
version: 2
7084
main:
@@ -87,3 +101,10 @@ workflows:
87101
ignore: /.*/
88102
tags:
89103
only: /^v.*/
104+
- docker:
105+
context: docker hub
106+
filters:
107+
branches:
108+
only: master
109+
tags:
110+
only: /^v.*/

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ COPY . .
44
RUN yarn install
55
RUN yarn build
66

7-
FROM golang:1.14-alpine AS build_go
7+
FROM golang:1.16-alpine AS build_go
88
WORKDIR /go/src/github.com/RoboCup-SSL/ssl-game-controller
99
COPY . .
1010
COPY --from=build_node /tmp/ssl-game-controller/dist dist

0 commit comments

Comments
 (0)