Skip to content

Commit

Permalink
Edit circleci config
Browse files Browse the repository at this point in the history
  • Loading branch information
janzh committed Jul 29, 2019
1 parent 0e9d206 commit bebda5d
Showing 1 changed file with 33 additions and 11 deletions.
44 changes: 33 additions & 11 deletions .circleci/config.yml
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:
Expand All @@ -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
Expand All @@ -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

0 comments on commit bebda5d

Please sign in to comment.