77 lines
2.2 KiB
YAML
77 lines
2.2 KiB
YAML
# fly --target cloud login --concourse-url https://ci.spring.io --team-name spring-cloud
|
|
# fly --target cloud set-pipeline --config pipeline.yml --pipeline spring-cloud-function --load-vars-from credentials.yml
|
|
---
|
|
jobs:
|
|
- name: build
|
|
plan:
|
|
- get: source
|
|
trigger: true
|
|
- task: maven
|
|
config:
|
|
platform: linux
|
|
image_resource:
|
|
type: docker-image
|
|
source:
|
|
repository: springio/maven-base
|
|
inputs:
|
|
- name: source
|
|
caches:
|
|
- path: source/.m2
|
|
run:
|
|
dir: source
|
|
path: sh
|
|
args:
|
|
- -c
|
|
- |
|
|
rm -rf ~/.m2
|
|
ln -s $(pwd)/.m2 ~/.m2
|
|
./mvnw deploy -s .mvn/settings.xml -Dgpg.passphrase="${passphrase}"
|
|
params:
|
|
TERM: -dumb
|
|
passphrase: {{passphrase}}
|
|
sonatype_username: {{sonatype-username}}
|
|
sonatype_password: {{sonatype-password}}
|
|
spring_username: {{spring-username}}
|
|
spring_password: {{spring-password}}
|
|
on_failure: *slack-failure
|
|
on_success: *slack-success
|
|
|
|
slack-failure: &slack-failure
|
|
put: slack
|
|
params:
|
|
channel: spring-cloud-firehose
|
|
attachments:
|
|
- color: danger
|
|
fallback: "$BUILD_PIPELINE_NAME/$BUILD_JOB_NAME #$BUILD_NAME <FAILURE>"
|
|
text: "<!here> Build has failed"
|
|
title: "$BUILD_PIPELINE_NAME/$BUILD_JOB_NAME #$BUILD_NAME"
|
|
title_link: $ATC_EXTERNAL_URL/teams/$BUILD_TEAM_NAME/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME
|
|
|
|
slack-success: &slack-success
|
|
put: slack
|
|
params:
|
|
channel: spring-cloud-firehose
|
|
attachments:
|
|
- color: good
|
|
fallback: "$BUILD_PIPELINE_NAME/$BUILD_JOB_NAME #$BUILD_NAME <SUCCESS>"
|
|
text: "Build has succeeded"
|
|
title: "$BUILD_PIPELINE_NAME/$BUILD_JOB_NAME #$BUILD_NAME"
|
|
title_link: $ATC_EXTERNAL_URL/teams/$BUILD_TEAM_NAME/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME
|
|
|
|
resources:
|
|
- name: source
|
|
type: git
|
|
source:
|
|
uri: https://github.com/spring-cloud/spring-cloud-function.git
|
|
- name: slack
|
|
type: slack-notification
|
|
source:
|
|
url: {{slack-url}}
|
|
|
|
resource_types:
|
|
- name: slack-notification
|
|
type: docker-image
|
|
source:
|
|
repository: nebhale/slack-notification-resource
|
|
|