-
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.
Fikser 403-feil i tilgangskontroll og legger tilbake circleci
- Loading branch information
Kristian Storvoll
authored
Aug 22, 2019
1 parent
203ecbb
commit 8645e75
Showing
4 changed files
with
102 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 |
---|---|---|
@@ -0,0 +1,82 @@ | ||
version: 2.1 | ||
orbs: | ||
barkendeploy: navikt/barkendeploy@dev:master | ||
slack: circleci/[email protected] | ||
|
||
parameters: | ||
deploy_branch: | ||
type: boolean | ||
default: false | ||
|
||
jobs: | ||
build_jar: | ||
docker: | ||
- image: "circleci/openjdk:11-jdk" | ||
steps: | ||
- checkout | ||
- setup_remote_docker | ||
- barkendeploy/init | ||
- barkendeploy/gradle-cache-restore | ||
# - run: | ||
# name: Run tests | ||
# command: ./gradlew test | ||
- run: | ||
name: Build jar file | ||
command: ./gradlew shadowJar -x test | ||
- barkendeploy/skip-on-env-var: | ||
env_var: '"<< pipeline.parameters.deploy_branch >>"' | ||
- barkendeploy/gradle-cache-persist | ||
- barkendeploy/docker-build | ||
- barkendeploy/docker-login | ||
- barkendeploy/docker-push | ||
run_tests: | ||
machine: | ||
image: circleci/classic:201808-01 | ||
docker_layer_caching: true | ||
steps: | ||
- checkout | ||
- barkendeploy/init | ||
- barkendeploy/gradle-cache-restore | ||
- run: | ||
name: Run tests | ||
command: ./gradlew test | ||
workflows: | ||
version: 2 | ||
build_and_deploy: | ||
jobs: | ||
- build_jar: | ||
context: barkendeploy | ||
filters: | ||
branches: | ||
only: master | ||
- barkendeploy/deployment: | ||
deployments: | ||
- barkendeploy/deploy-create: | ||
cluster: dev-fss | ||
- barkendeploy/deploy-create: | ||
cluster: prod-fss | ||
context: barkendeploy | ||
requires: | ||
- build_jar | ||
test_branch: | ||
unless: << pipeline.parameters.deploy_branch >> | ||
jobs: | ||
- run_tests: | ||
filters: | ||
branches: | ||
ignore: master | ||
build_branch: | ||
when: << pipeline.parameters.deploy_branch >> | ||
jobs: | ||
- build_jar: | ||
context: barkendeploy | ||
filters: | ||
branches: | ||
ignore: master | ||
- barkendeploy/deployment: | ||
deployments: | ||
- barkendeploy/deploy-create: | ||
cluster: dev-fss | ||
context: barkendeploy | ||
requires: | ||
- build_jar |
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
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
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