How to add docker image tag? #8593
Unanswered
sooraj-sky
asked this question in
Q&A
Replies: 1 comment 3 replies
-
I'm using the legacy docker-image resource, which can read My pipeline looks like this: jobs:
- name: build-image
plan:
- get: tasks
- task: write-param
file: tasks/write-param/task.yml
params:
file: tag
content: ((branch))
reveal: true
output_mapping: { result: image-tag }
- get: image-source
trigger: true
- put: image
params:
build: image-source/images/my-project
tag_file: image-tag/tag
resources:
- name: image-source
type: git
source:
uri: [email protected]:my-org/tasks.git
private_key: ((git-private-key))
branch: ((branch))
paths: [ images/my-project/Dockerfile ]
- name: image
type: docker-image
source:
repository: my-org/image
username: my-user
password: ((apikey))
tag: ((branch)) I'm setting The relevant part of the write-params task is params:
content: # the content to write
file: # path to file to write to; below output 'result'
outputs:
- name: result
run:
path: bash
args:
- -c
- |
mkdir -p $(dirname result/$file)
echo "$content" | tee result/$file |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello I'm tying to add docker tag. But i could't find how to do that. I want to tag my image like imagename:$gitbranch-$concourse_build_id
eg: myimage:test-12.
This is my current Pipeline.
Beta Was this translation helpful? Give feedback.
All reactions