concourse / concourse/docker-image-resource

How to pull and push a specific tagged docker image?

Open
#299 2 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
162
Forks
250
PR merge metrics
No merged PRs in 30d

Description

I am trying to use this Concourse CI resource to pulling specific "tagged" docker image.
I tried working out a solution using both https://github.com/concourse/registry-image-resource and https://github.com/concourse/docker-image-resource.
From the documentation, I dont see a way to achieve it.

In the below approach, Its declared as a resource and the tag remains same for rest of the execution.

  - name: server-docker-image-artifactory
    type: docker-image
    icon: docker
    source:
      username: username
      password: password
      tag: "mytag"
      repository: repo

  - name: server-docker-image-bintray
    type: docker-image
    icon: docker
    source:
      username: username
      password: password
      tag: "mytag"
      repository: repo

What I would like to achieve is, when declaring multiple steps, I would like to do something as below.

plan:
    # Pull an image with a "tag" that was derived by some step in the pipeline
    - get: server-docker-image-artifactory
       params:
           tag: my-dynamic tag

    # Copy that specific tagged image from artifactory to bintray
    - put: server-docker-image-bintray
       inputs: ["server-docker-image-artifactory", "my-dynamic tag"]
       params:
           load: server-docker-image-artifactory
           tag_file: my-dynamic tag

Right now... i am unable to provide something like above. It always ends up pulling the latest image.
I tried the params such as "load", "load_file", "load_tag". But no luck
Any directions?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the documentation and parameter handling in the docker-image-resource and registry-image-resource repositories, especially the existing load, load_file, and load_tag options. Done means a pipeline can pull a dynamically selected tag and copy that exact tagged image between registries rather than defaulting to the latest image.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go
Domain
ci-cd, devops
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.