-
Notifications
You must be signed in to change notification settings - Fork 790
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
version: 2 | ||
defaults: &defaults | ||
working_directory: ~/project | ||
docker: | ||
- image: docker:17.05.0-ce-git | ||
|
||
jobs: | ||
build: | ||
<<: *defaults | ||
branches: | ||
only: | ||
- master | ||
steps: | ||
- checkout | ||
- setup_remote_docker | ||
- run: | ||
name: install dependencies | ||
command: apk add --update alpine-sdk | ||
- run: | ||
name: build docker image | ||
command: make build | ||
- run: | ||
name: login to quay.io | ||
command: make login | ||
- run: | ||
name: push image to quay.io | ||
command: make push | ||
- run: | ||
name: log out of quay.io | ||
command: make logout |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
APP_NAME=burrow | ||
|
||
QUAY_REPO=mettle | ||
QUAY_USERNAME?="mettle+burrow" | ||
QUAY_PASSWORD?="unknown" | ||
|
||
CIRCLE_BUILD_NUM?="unknown" | ||
VERSION=1.2.2-$(CIRCLE_BUILD_NUM) | ||
|
||
IMAGE = quay.io/$(QUAY_REPO)/$(APP_NAME):$(VERSION) | ||
|
||
build: | ||
docker build -t $(IMAGE) . | ||
|
||
login: | ||
docker login -u $(QUAY_USERNAME) -p $(QUAY_PASSWORD) quay.io | ||
|
||
logout: | ||
docker logout | ||
|
||
push: | ||
docker push $(IMAGE) | ||
docker rmi $(IMAGE) | ||
|
||
scan: | ||
trivy --clear-cache --severity "UNKNOWN,MEDIUM,HIGH,CRITICAL" --exit-code 0 --quiet --auto-refresh $(IMAGE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters