Skip to content

Commit

Permalink
Use CI to release bleeding images
Browse files Browse the repository at this point in the history
  • Loading branch information
suprnova32 committed Mar 7, 2019
1 parent 1c43315 commit 945edf7
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 11 deletions.
32 changes: 23 additions & 9 deletions .alloy-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,35 +44,49 @@ credo + formatter:
- mix credo
- mix format --check-formatted

image build:
.docker: &docker
image: docker:git
cache:
paths: []
before_script: []
stage: build
services:
- docker:dind

image build:
<<: *docker
variables:
TAG: test-builder
DOCKER_DRIVER: overlay
DOCKER_HOST: tcp://docker:2375
script:
- apk add --update make
- make build
only:
- branches
except:
- master

image release bleeding:
<<: *docker
variables:
TAG: bleeding
DOCKER_DRIVER: overlay
DOCKER_HOST: tcp://docker:2375
script:
- apk add --update make
- make release
only:
- master

image release:
image: docker:git
cache:
paths: []
before_script: []
stage: build
services:
- docker:dind
<<: *docker
variables:
DOCKER_DRIVER: overlay
DOCKER_HOST: tcp://docker:2375
script:
- apk add --update make
- make release
- make release
- make latest
only:
- tags
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@ publish:
docker push alloyci/alloy_ci:$(TAG)

release:
make build
./bin/prepare_credentials
make build
cat /tmp/credentials | docker login --username $(DOCKER_HUB_USER) --password-stdin
make publish
make latest

latest:
docker tag alloy_ci:$(TAG) alloyci/alloy_ci:latest
Expand Down

0 comments on commit 945edf7

Please sign in to comment.