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

Pass image with digest to the deploy task #1756

Merged
merged 5 commits into from
May 25, 2023

Conversation

matejvasek
Copy link
Contributor

@matejvasek matejvasek commented May 25, 2023

Changes

  • The pack build task result IMAGE_DIGEST is passed to the deploy task. Before this was done only for the s2i build.
  • The deploy task explicitly sets the --image flag.
- On-cluster build: The `pack` build task result `IMAGE_DIGEST` is passed to the deploy task.
- On-cluster build: The deploy task explicitly sets the `--image` flag.

Signed-off-by: Matej Vasek <mvasek@redhat.com>
Signed-off-by: Matej Vasek <mvasek@redhat.com>
@knative-prow knative-prow bot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels May 25, 2023
@matejvasek matejvasek requested review from zroubalik, lance and lkingland and removed request for nainaz May 25, 2023 03:43
@matejvasek matejvasek changed the title Pack propagate image Propagate image with digest to the deploy task May 25, 2023
@codecov
Copy link

codecov bot commented May 25, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +1.78 🎉

Comparison is base (bc39a1a) 60.82% compared to head (bc7b09f) 62.61%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1756      +/-   ##
==========================================
+ Coverage   60.82%   62.61%   +1.78%     
==========================================
  Files          98       99       +1     
  Lines       13066    13202     +136     
==========================================
+ Hits         7947     8266     +319     
+ Misses       4360     4143     -217     
- Partials      759      793      +34     
Flag Coverage Δ
e2e-test 38.10% <0.00%> (-0.37%) ⬇️
e2e-test-oncluster 33.68% <100.00%> (?)
e2e-test-oncluster-runtime 28.87% <100.00%> (?)
e2e-test-runtime-go 27.52% <0.00%> (?)
e2e-test-runtime-node 28.61% <0.00%> (?)
e2e-test-runtime-python 28.61% <0.00%> (?)
e2e-test-runtime-quarkus 28.73% <0.00%> (?)
e2e-test-runtime-springboot 27.67% <0.00%> (?)
e2e-test-runtime-typescript 28.73% <0.00%> (?)
integration-tests 48.29% <0.00%> (-2.17%) ⬇️
unit-tests-macos-latest 49.55% <100.00%> (+0.17%) ⬆️
unit-tests-ubuntu-latest 50.37% <100.00%> (+0.13%) ⬆️
unit-tests-windows-latest 49.60% <100.00%> (+0.14%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/pipelines/tekton/resources.go 97.12% <100.00%> (+45.01%) ⬆️
pkg/pipelines/tekton/tasks.go 100.00% <100.00%> (ø)

... and 13 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label May 25, 2023
@knative-prow
Copy link

knative-prow bot commented May 25, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lkingland, matejvasek

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [lkingland,matejvasek]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@lkingland lkingland added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 25, 2023
Signed-off-by: Matej Vasek <mvasek@redhat.com>
Signed-off-by: Matej Vasek <mvasek@redhat.com>
@knative-prow knative-prow bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed lgtm Indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels May 25, 2023
Signed-off-by: Matej Vasek <mvasek@redhat.com>
Copy link
Member

@lance lance left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me @matejvasek. But I'm a little confused. How is this working now?

@matejvasek
Copy link
Contributor Author

matejvasek commented May 25, 2023

@lance Before only s2i passed digest via task result. The pack task passed it somehow via func.yaml (on shared volume). This PR unifies behaviour, so both use task result which is then used as the image parameter for the deploy task.

With this the image is explicitly set via --image flag. I think that's safer because if the flag is not set and func.yaml has some discrepancy between registry/image weird things happen.

@matejvasek matejvasek changed the title Propagate image with digest to the deploy task Pass image with digest to the deploy task May 25, 2023
@lance
Copy link
Member

lance commented May 25, 2023

@matejvasek thanks for explaining
/lgtm

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label May 25, 2023
@matejvasek
Copy link
Contributor Author

/unhold

@knative-prow knative-prow bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 25, 2023
@knative-prow knative-prow bot merged commit f8e976c into knative:main May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants