docker-image-resource
docker-image-resource copied to clipboard
tag prefix not working
I'm transitioning my pipelines to oci-build-task and registry-image resource, unfortunately i had a problem with the second, so for now i'm keeping docker-image for pushing to the registry.
my pipeline is very simple and look like this
resources:
- name: ((project))-docker-image
type: docker-image
icon: docker
source:
repository: ((registry_base_url))/((project))
username: ((user))
password: ((registry_token))
- name: ((project))-stage.git
type: git
icon: gitlab
check_every: 10s
source:
uri: ((git_repo_url))
branch: staging
username: ((user))
password: ((pwd))
jobs:
- name: Build-and-push-((project))-stage
public: true
plan:
- get: ((project))-stage.git
trigger: true
# Build the image with oci-container
- task: build-image
privileged: true
config:
platform: linux
image_resource:
type: registry-image
source:
repository: vito/oci-build-task
params:
CONTEXT: ((project))-stage.git
inputs:
- name: ((project))-stage.git
outputs:
- name: image
caches:
- path: cache
run:
path: build
# Upload the image with the tag latest and git commit
- put: ((project))-docker-image
params:
import_file: image/image.tar
tag_prefix: ci
additional_tags: ((project))-stage.git/.git/ref
tag_as_latest: true
get_params:
skip_download: true
basically i neeed to push to the registry a tag ci-"commit hash", the problem is that everything i write in pipeline as prefix gets ignored and image is only tagged with the commit ref.