Concourse pipeline for building a Docker image with convoy (https://github.com/rancher/convoy)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

93 lines
2.2 KiB

---
resources:
- name: alpine
type: registry-image
icon: pine-tree
source:
repository: (( grab meta.upstream.alpine.repo ))
tag: (( grab meta.upstream.alpine.tag ))
.: (( inject meta.upstream.alpine.auth ))
- name: commons
type: git
icon: git
source:
.: (( inject meta.upstream.commons ))
- name: golang
type: registry-image
icon: language-go
source:
repository: (( grab meta.upstream.golang.repo ))
tag: (( grab meta.upstream.golang.tag ))
.: (( inject meta.upstream.golang.auth ))
- name: convoy
type: registry-image
icon: wall
source:
repository: (( grab meta.image.convoy.repo ))
tag: (( grab meta.image.convoy.tag ))
.: (( inject meta.registry.auth ))
- name: source
type: git
icon: git
source:
.: (( inject meta.source ))
ignore_paths:
- "pipeline.yml"
- "settings.yml"
- name: source-pipeline
type: git
icon: git
source:
.: (( inject meta.source ))
paths:
- "pipeline.yml"
- "settings.yml"
jobs:
- name: "pipeline"
public: true
plan:
- get: commons
- get: source-pipeline
trigger: true
- task: "generate-pipeline"
file: (( grab meta.tasks.ci-repipe ))
input_mapping: {source: source-pipeline}
- set_pipeline: self
file: metadata/pipeline.yml
- name: "convoy"
public: true
plan:
- get: commons
passed: ["pipeline"]
- get: source
trigger: true
- get: alpine
trigger: true
- get: golang
- task: "build-image"
file: (( grab meta.tasks.img-build-oci ))
privileged: true
input_mapping: {context: source}
params:
BUILD_ARG_ALPINE_REPO: (( grab meta.upstream.alpine.repo ))
BUILD_ARG_ALPINE_VERSION: (( grab meta.upstream.alpine.tag ))
BUILD_ARG_CONVOY_VERSION: (( grab meta.upstream.convoy.version ))
BUILD_ARG_GOLANG_REPO: (( grab meta.upstream.golang.repo ))
BUILD_ARG_GOLANG_VERSION: (( grab meta.upstream.golang.tag ))
CONTEXT: (( grab meta.image.convoy.context ))
- task: "write-image-tags"
file: (( grab meta.tasks.img-write-tags ))
params:
TAGS: (( grab meta.upstream.convoy.version ))
- put: convoy
params:
image: image/image.tar
additional_tags: metadata/additional_tags