Skip to content

Commit 149bdb7

Browse files
committed
Build docker image for ssl-ref-client
1 parent bec842a commit 149bdb7

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

.circleci/config.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
version: 2.1
2+
parameters:
3+
cmds:
4+
type: string
5+
default: "ssl-game-controller ssl-ref-client"
6+
27
jobs:
38
build_node:
49
resource_class: medium
@@ -46,7 +51,7 @@ jobs:
4651
- run: |
4752
set -u
4853
version=${CIRCLE_TAG:-}
49-
for cmd in ssl-game-controller ssl-ref-client; do
54+
for cmd in ${cmds}; do
5055
GOOS=linux GOARCH=amd64 go build -o ./release/${cmd}_${version}_linux_amd64 ./cmd/${cmd}
5156
GOOS=linux GOARCH=arm64 go build -o ./release/${cmd}_${version}_linux_arm64 ./cmd/${cmd}
5257
GOOS=linux GOARCH=arm go build -o ./release/${cmd}_${version}_linux_arm ./cmd/${cmd}
@@ -80,11 +85,14 @@ jobs:
8085
- setup_remote_docker:
8186
version: 20.10.18
8287
- run: |
83-
TAG=${CIRCLE_TAG:-1}
88+
# Parse version from tag (removing 'v' prefix)
89+
TAG=${CIRCLE_TAG:1}
8490
TAG=${TAG:-latest}
85-
docker build -t robocupssl/ssl-game-controller:$TAG .
86-
docker login -u "${DOCKER_HUB_USERNAME}" -p "${DOCKER_HUB_PASSWORD}"
87-
docker push robocupssl/ssl-game-controller:$TAG
91+
for cmd in ${cmds}; do
92+
docker build -t robocupssl/${cmd}:${TAG} .
93+
docker login -u "${DOCKER_HUB_USERNAME}" -p "${DOCKER_HUB_PASSWORD}"
94+
docker push robocupssl/${cmd}:${TAG}
95+
done
8896
8997
workflows:
9098
version: 2

0 commit comments

Comments
 (0)