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

Implement OBS stage workflow #3088

Merged
merged 4 commits into from
Jun 1, 2023
Merged

Conversation

xmudrii
Copy link
Member

@xmudrii xmudrii commented May 26, 2023

What type of PR is this?

/kind feature

What this PR does / why we need it:

This PR implements OBS staging workflow via krel obs stage command as described in #3051. For more details about the command workflow, including a diagram, see the referenced issue.

In general, this workflow does the following:

  • generate release version, package version, OBS project name
  • check prerequisites such as environment variables and disk space
  • run osc checkout to checkout the project locally
  • run krel obs stage for each package
  • run osc addremove to stage changes
  • run osc commit to commit and push changes to OBS

Pushing changes to OBS triggers the package building process. Packages are not yet available to end users as this requires a release step that's going to be implemented in a follow up PR.

This workflow is realized as a dedicated step in the stage process, see changes to gcb/stage/cloudbuild.yaml for details. This workflow can also be called standalone using the submit option. The submit option is going to trigger a new Cloud Build job responsible only for building packages. This option is supposed to be used by other Kubernetes subprojects.

The scope of this PR is only kubeadm, kubectl, and kubelet. cri-tools and kubernetes-cni can be built using the standalone mode described above. We're yet going to figure out how we can automate those two packages.

This PR has some TODO notes that are non-blocking and will be resolved in follow up PRs.

This PR has been tested and logs are available here: https://console.cloud.google.com/cloud-build/builds/4fc2cb3b-81ee-4336-8834-1e8414aa43c0?project=kubernetes-release-test

It can also be tested by triggering a mock stage process (although packages are not going to be committed/pushed to OBS because it's mock stage):

export TOOL_ORG=xmudrii TOOL_REF=obs-stage && go run ./cmd/krel stage

Which issue(s) this PR fixes:

Fixes #3051

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Implement OBS staging workflow via `krel obs stage` command

@k8s-ci-robot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. area/release-eng Issues or PRs related to the Release Engineering subproject labels May 26, 2023
@k8s-ci-robot k8s-ci-robot added sig/release Categorizes an issue or PR as relevant to SIG Release. approved Indicates a PR has been approved by an approver from all required OWNERS files. needs-priority size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels May 26, 2023
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 26, 2023
@xmudrii xmudrii force-pushed the obs-stage branch 16 times, most recently from 45cae9a to f7018f9 Compare May 27, 2023 19:24
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 31, 2023
Signed-off-by: Marko Mudrinić <mudrinic.mare@gmail.com>
Signed-off-by: Marko Mudrinić <mudrinic.mare@gmail.com>
@xmudrii xmudrii changed the title WIP Implement OBS stage workflow Implement OBS stage workflow May 31, 2023
@xmudrii xmudrii marked this pull request as ready for review May 31, 2023 09:26
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 31, 2023
@xmudrii
Copy link
Member Author

xmudrii commented May 31, 2023

The PR is ready for review
/assign @saschagrunert @cpanato @puerco
cc @kubernetes/release-engineering

@xmudrii
Copy link
Member Author

xmudrii commented May 31, 2023

/test pull-release-integration-test-eks-canary

@xmudrii
Copy link
Member Author

xmudrii commented May 31, 2023

/test pull-release-verify

@xmudrii
Copy link
Member Author

xmudrii commented Jun 1, 2023

/assign

@xmudrii
Copy link
Member Author

xmudrii commented Jun 1, 2023

/assign @saschagrunert @cpanato @xmudrii

Copy link
Member

@saschagrunert saschagrunert left a comment

Choose a reason for hiding this comment

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

Great work, just found a non-blocking nit with the license header. This can be fixed alter on.

@@ -0,0 +1,194 @@
/*
Copyright 2020 The Kubernetes Authors.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Copyright 2020 The Kubernetes Authors.
Copyright 2023 The Kubernetes Authors.

Copy link
Member Author

Choose a reason for hiding this comment

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

I’ll fix it in the PR for OBS release workflow.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 1, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: saschagrunert, xmudrii

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 [saschagrunert,xmudrii]

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

@k8s-ci-robot k8s-ci-robot merged commit e04981a into kubernetes:master Jun 1, 2023
@k8s-ci-robot k8s-ci-robot added this to the v1.28 milestone Jun 1, 2023
@xmudrii xmudrii deleted the obs-stage branch June 1, 2023 10:48
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. area/release-eng Issues or PRs related to the Release Engineering subproject cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/release Categorizes an issue or PR as relevant to SIG Release. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement krel obs stage command for staging OBS builds
5 participants