-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildkite.yml
29 lines (29 loc) · 1.09 KB
/
buildkite.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
steps:
- command: apk add --update alpine-sdk && bundle install && bundle exec rake rubocop
name: rubocop
plugins:
docker:
image: symbols/minimal-ruby:2.5.1
always-pull: true
agents:
linux: true
- wait
- command: |
if [ "x$$BUILDKITE_PULL_REQUEST" == "xfalse" ]; then
docker login -u=$$DOCKERHUB_USERNAME -p=$$DOCKERHUB_PASSWORD
docker build --pull --rm -t symbols/buildkite-bitbucket_server-connector:$$BUILDKITE_BRANCH .
if [ "x$$?" == "x0" ]; then
docker push symbols/buildkite-bitbucket_server-connector:$$BUILDKITE_BRANCH
if [ "x$$BUILDKITE_BRANCH" == "xmaster" ]; then
docker tag symbols/buildkite-bitbucket_server-connector:$$BUILDKITE_BRANCH \
symbols/buildkite-bitbucket_server-connector:latest
docker push symbols/buildkite-bitbucket_server-connector:latest
fi
fi
else
docker build --pull --rm .
fi
docker images -q --filter "dangling=true" | xargs -r docker rmi || true
label: docker build
agents:
linux: true