Skip to content

Commit

Permalink
make the task a bit more generic
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickcrocker committed May 23, 2017
1 parent cfe2b19 commit fd0ad63
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 25 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Maven Resource

[![ci.anvil.pcfdemo.com](https://ci.anvil.pcfdemo.com/api/v1/teams/pcrocker/pipelines/maven-resource/jobs/build/badge)](https://ci.anvil.pcfdemo.com/teams/pcrocker/pipelines/maven-resource) [docker](https://hub.docker.com/r/patrickcrocker/maven-resource/)
[![CI Build](https://wings.concourse.ci/teams/sme-pcf-concourse/pipelines/maven-resource/jobs/build/badge)](https://ci.anvil.pcfdemo.com/teams/pcrocker/pipelines/maven-resource)
[![Docker Pulls](https://img.shields.io/docker/pulls/mashape/kong.svg)](https://hub.docker.com/r/pivotalpa/maven-resource/)

Deploys and retrieve artifacts from a Maven Repository Manager.

Expand Down Expand Up @@ -43,7 +44,7 @@ resource_types:
- name: maven-resource
type: docker-image
source:
repository: patrickcrocker/maven-resource
repository: pivotalpa/maven-resource
tag: latest

resources:
Expand Down
4 changes: 2 additions & 2 deletions ci/generate-docker-tags.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ set -e

version=$(cat version/version)

echo $version > generate-docker-tags-output/tag-alpine
echo "$version-debian" > generate-docker-tags-output/tag-debian
echo $version > task-output/tag-alpine
echo "$version-debian" > task-output/tag-debian
6 changes: 3 additions & 3 deletions ci/generate-docker-tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ image_resource:
tag: '1.26'

inputs:
- name: maven-resource
- name: project
- name: version

outputs:
- name: generate-docker-tags-output
- name: task-output

run:
path: maven-resource/ci/generate-docker-tags.sh
path: project/ci/generate-docker-tags.sh
40 changes: 22 additions & 18 deletions pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,26 @@ jobs:
serial_groups: [version]
plan:
- aggregate:
- get: maven-resource
- get: project
resource: maven-resource
trigger: true
- get: version
params: {pre: rc}
- task: generate-docker-tags
file: maven-resource/ci/generate-docker-tags.yml
file: project/ci/generate-docker-tags.yml
output_mapping: {task-output: generate-docker-tags-output}
- put: version
params: {file: version/version}
- put: maven-resource-image-rc
params:
build: maven-resource
dockerfile: maven-resource/Dockerfile
build: project
dockerfile: project/Dockerfile
tag: generate-docker-tags-output/tag-alpine
tag_as_latest: false
- put: maven-resource-image-rc
params:
build: maven-resource
dockerfile: maven-resource/debian/Dockerfile
build: project
dockerfile: project/debian/Dockerfile
tag: generate-docker-tags-output/tag-debian
tag_as_latest: false
- put: tracker
Expand All @@ -35,7 +37,7 @@ jobs:
serial_groups: [version]
plan:
- aggregate:
- get: concourse-commons
- get: pipeline-tasks
- get: project
resource: maven-resource
passed: [build]
Expand All @@ -46,11 +48,13 @@ jobs:
passed: [build]
params: {bump: final}
- task: generate-docker-tags
file: maven-resource/ci/generate-docker-tags.yml
file: project/ci/generate-docker-tags.yml
- task: generate-github-release
file: concourse-commons/tasks/generate-github-release.yml
file: pipeline-tasks/generate-github-release/task.yml
output_mapping: {task-output: generate-github-release-output}
- task: generate-commitish
file: concourse-commons/tasks/generate-commitish.yml
file: pipeline-tasks/generate-commitish/task.yml
output_mapping: {task-output: generate-commitish-output}
- put: github-release
params:
name: generate-github-release-output/release-name
Expand Down Expand Up @@ -104,8 +108,8 @@ resources:
- name: maven-resource
type: git
source:
uri: {{git-uri}}
branch: {{git-branch}}
uri: {{maven-resource-git-uri}}
branch: {{maven-resource-git-branch}}
private_key: {{git-private-key}}
ignore_paths:
- LICENSE
Expand All @@ -118,21 +122,21 @@ resources:
source:
access_token: {{github-release-access-token}}
repository: maven-resource
user: patrickcrocker
user: {{github-release-user}}

- name: concourse-commons
- name: pipeline-tasks
type: git
source:
uri: {{git-concourse-commons}}
branch: master
uri: {{pipeline-tasks-git-uri}}
branch: {{pipeline-tasks-git-branch}}

- name: version
type: semver
source:
driver: git
initial_version: 1.0.0-rc.0
uri: {{git-uri-semver}}
branch: version
uri: {{maven-resource-semver-git-uri}}
branch: {{maven-resource-semver-git-branch}}
file: version
private_key: {{git-private-key}}

Expand Down

0 comments on commit fd0ad63

Please sign in to comment.