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

DIGEST cannot be used to tag images with envTemplate #481

Closed
afrittoli opened this issue Apr 26, 2018 · 1 comment
Closed

DIGEST cannot be used to tag images with envTemplate #481

afrittoli opened this issue Apr 26, 2018 · 1 comment
Assignees
Labels

Comments

@afrittoli
Copy link
Contributor

I try to use the envTemplate tag strategy, but it doesn't work as expected because DIGEST is in the form sha265::

'''
tagPolicy:
envTemplate:
template: "{{.IMAGE_REG}}/{{.IMAGE_REG_NS}}/{{.IMAGE_NAME}}:{{.MY_DIGEST}}"
'''

Expected behavior

The image tag is my-registry.me/my-namespace/my-image:<digest>.

Actual behavior

The image tag is my-registry.me/my-namespace/my-image:sha256:<digest>, which is not valid.

Information

Skaffold version:0.4.0
Operating system: MacOS
Content of skaffold.yaml:

apiVersion: skaffold/v1alpha2
kind: Config
build:
  artifacts:
  - imageName: my-image
    docker:
      dockerfilePath: image1/Dockerfile
  - imageName: my-other-image
    docker:
      dockerfilePath: image2/Dockerfile
  tagPolicy:
    envTemplate:
      template: "{{.IMAGE_REG}}/{{.IMAGE_REG_NS}}/{{.IMAGE_NAME}}:{{.MY_DIGEST}}"
deploy:
  helm:
    releases:
    - name: development
      chartPath: my-chart
      valuesFilePath: skaffold/helm-values.yaml
      values:
        image1: my-image
        image2: my-other-image
      namespace: default

Steps to reproduce the behavior

  1. skaffold test
@dgageot dgageot self-assigned this Apr 26, 2018
dgageot added a commit to dgageot/skaffold that referenced this issue Apr 26, 2018
@dgageot dgageot added kind/bug Something isn't working area/tag labels Apr 26, 2018
dgageot added a commit to dgageot/skaffold that referenced this issue Apr 27, 2018
jstrachan added a commit to jstrachan/skaffold that referenced this issue Apr 28, 2018
which uses 2 separate environment variables

adds a test to show it working

#fixes 481
jstrachan added a commit to jstrachan/skaffold that referenced this issue Apr 28, 2018
which uses 2 separate environment variables

adds a test to show it working

#fixes 481
dgageot added a commit that referenced this issue May 5, 2018
@dgageot
Copy link
Contributor

dgageot commented May 9, 2018

Fixed with #495

@dgageot dgageot closed this as completed May 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants