Created
August 9, 2018 19:47
-
-
Save roberthamel/16082546741e6b33972a9b677ca4bf0d to your computer and use it in GitHub Desktop.
Concourse pipeline example
This file contains hidden or 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
--- | |
resources: | |
- name: source-code | |
type: git | |
check_every: 10s | |
source: | |
uri: ((gitRepository)) | |
branch: master | |
- name: deploy-cf | |
type: cf | |
source: | |
api: https://api.sys.apbg.apcf.io | |
username: ((CFUsername)) | |
password: ((CFPassword)) | |
organization: ((CFOrg)) | |
space: ((CFSpace)) | |
skip_cert_check: false | |
jobs: | |
- name: test | |
plan: | |
- get: source-code | |
trigger: true | |
- task: test | |
config: | |
platform: linux | |
image_resource: | |
type: docker-image | |
source: | |
repository: openjdk | |
tag: 8 | |
inputs: | |
- name: source-code | |
run: | |
path: sh | |
args: | |
- -exc | |
- | | |
cd source-code | |
ls -lah | |
./gradlew test | |
echo "all tests pass" | |
- name: build-and-deploy | |
plan: | |
- get: source-code | |
passed: [test] | |
trigger: true | |
- task: build | |
config: | |
platform: linux | |
image_resource: | |
type: docker-image | |
source: | |
repository: openjdk | |
tag: 8 | |
inputs: | |
- name: source-code | |
outputs: | |
- name: build-output | |
run: | |
path: sh | |
args: | |
- -exc | |
- | | |
cd source-code | |
./gradlew clean assemble | |
cp build/libs/product-service-1.0.0.jar ../build-output | |
cp manifest.yml ../build-output | |
echo "build successful" | |
echo "deploying now..." | |
- put: deploy-cf | |
params: | |
manifest: build-output/manifest.yml | |
path: build-output/product-service-1.0.0.jar |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment