Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tag prefix not working #287

Open
Jordan886 opened this issue Jan 24, 2020 · 0 comments
Open

tag prefix not working #287

Jordan886 opened this issue Jan 24, 2020 · 0 comments

Comments

@Jordan886
Copy link

Jordan886 commented Jan 24, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant