-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 changed file
with
33 additions
and
11 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 |
---|---|---|
@@ -1,6 +1,7 @@ | ||
version: 2.1 | ||
orbs: | ||
barkendeploy: navikt/barkendeploy@dev:master | ||
slack: circleci/[email protected] | ||
jobs: | ||
build_jar: | ||
docker: | ||
|
@@ -17,14 +18,9 @@ jobs: | |
name: Build jar file | ||
command: ./gradlew shadowJar -x test | ||
- barkendeploy/gradle-cache-persist | ||
- run: | ||
name: Build and publish Docker image | ||
command: docker build -t docker.pkg.github.com/navikt/${CIRCLE_PROJECT_REPONAME}/${CIRCLE_PROJECT_REPONAME}:${IMAGE_VERSION} . | ||
- run: | ||
name: Push docker image | ||
command: | | ||
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin docker.pkg.github.com | ||
docker push docker.pkg.github.com/navikt/${CIRCLE_PROJECT_REPONAME}/${CIRCLE_PROJECT_REPONAME}:${IMAGE_VERSION} | ||
- barkendeploy/docker-build | ||
- barkendeploy/docker-login | ||
- barkendeploy/docker-push | ||
|
||
workflows: | ||
version: 2 | ||
|
@@ -35,11 +31,37 @@ workflows: | |
filters: | ||
branches: | ||
only: master | ||
- barkendeploy/deploy-publish: | ||
cluster: dev-fss | ||
- barkendeploy/deployment: | ||
deployments: | ||
- barkendeploy/deploy-create: | ||
cluster: dev-fss | ||
- barkendeploy/deploy-create: | ||
cluster: prod-fss | ||
context: barkendeploy | ||
requires: | ||
- build_jar | ||
build_branch: | ||
jobs: | ||
- build_jar: | ||
context: barkendeploy | ||
filters: | ||
branches: | ||
only: master | ||
ignore: master | ||
- slack/approval-notification: | ||
context: barkendeploy | ||
name: deploy_branch | ||
mentions: here | ||
message: Repoet ${CIRCLE_PROJECT_REPONAME} trenger godkjennelse for å deploye branchen ${CIRCLE_BRANCH} til dev-fss | ||
requires: | ||
- build_jar | ||
- await_approval_branch: | ||
type: approval | ||
requires: | ||
- build_jar | ||
- barkendeploy/deployment: | ||
context: barkendeploy | ||
deployments: | ||
- barkendeploy/deploy-create: | ||
cluster: dev-fss | ||
requires: | ||
- await_approval_branch |