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

tekton: make sure the git workingdir is not dirty… #5573

Merged
merged 1 commit into from
Sep 29, 2022

Conversation

vdemeester
Copy link
Member

@vdemeester vdemeester commented Sep 28, 2022

Changes

… when building the released binaries/images.

As of today, we are modifying the source and building. This means knative.dev/pkg/changeset will require the commit hash suffixed by -dirty. This can be a bit confusing the users as, well, this means the source is not really the source of truth of the binary :)

This changes that:

  • it generates .ko.yaml in /workspace so that it's not in the git repository. It uses KO_CONFIG_PATH environment variable to force ko to use it.
  • it does the devel->version rewrite on generated yamls, so after the build is done.

Signed-off-by: Vincent Demeester [email protected]

/kind cleanup
/cc @imjasonh @mattmoor @afrittoli @abayer

Submitter Checklist

As the author of this PR, please check off the items in this checklist:

  • Has Docs included if any changes are user facing
  • Has Tests included if any functionality added or changed
  • Follows the commit message standard
  • Meets the Tekton contributor standards (including
    functionality, content, code)
  • Has a kind label. You can add one by adding a comment on this PR that contains /kind <type>. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tep
  • Release notes block below has been updated with any user facing changes (API changes, bug fixes, changes requiring upgrade notices or deprecation warnings)
  • Release notes contains the string "action required" if the change requires additional action from users switching to the new release

Release Notes

Fix the `-dirty` suffix in `pipeline.tekton.dev/release` annotation

@tekton-robot tekton-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Sep 28, 2022
@tekton-robot tekton-robot added the kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. label Sep 28, 2022
@tekton-robot tekton-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Sep 28, 2022
@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 28, 2022
@imjasonh
Copy link
Member

Would it make sense to have the release pipeline fail if its working dir is dirty, instead of silently pushing images that have -dirty versions?

@vdemeester
Copy link
Member Author

Would it make sense to have the release pipeline fail if its working dir is dirty, instead of silently pushing images that have -dirty versions?

good point, and I would say yes. let me update the PR to add this as well.

… when building the released binaries/images.

As of today, we are modifying the source and building. This means
`knative.dev/pkg/changeset` will require the commit hash suffixed by
`-dirty`. This can be a bit confusing the users as, well, this means
the source is not really the source of truth of the binary :)

This changes that:
- it generates `.ko.yaml` in `/workspace` so that it's not in the git
  repository. It uses `KO_CONFIG_PATH` environment variable to force
  `ko` to use it.
- it does the devel->version rewrite on generated yamls, so after the
  build is done.

Signed-off-by: Vincent Demeester <[email protected]>
@abayer
Copy link
Contributor

abayer commented Sep 28, 2022

/retest

1 similar comment
@abayer
Copy link
Contributor

abayer commented Sep 28, 2022

/retest

@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: abayer, imjasonh

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:

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

@vdemeester
Copy link
Member Author

/cherry-pick release-v0.40.x

@tekton-robot
Copy link
Collaborator

@vdemeester: once the present PR merges, I will cherry-pick it on top of release-v0.40.x in a new PR and assign it to you.

In response to this:

/cherry-pick release-v0.40.x

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@abayer
Copy link
Contributor

abayer commented Sep 29, 2022

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Sep 29, 2022
@tekton-robot tekton-robot merged commit 468dfd8 into tektoncd:main Sep 29, 2022
@tekton-robot
Copy link
Collaborator

@vdemeester: new pull request created: #5583

In response to this:

/cherry-pick release-v0.40.x

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

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. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. 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.

4 participants