-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Add nightly release pipeline 🌙 #1274
Conversation
This Pipeline will be triggered via prow over in the tektoncd/plumbing repo every night. It will create releases of all images normally released when doing official releases, plus also the image used for building with ko, and tag them with the date and commit they were built at, and will create the release.yaml as well. This Pipeline is missing a few things that are in the manual release Pipeline - due to tektoncd#1124 unit tests have a race condition, due to tektoncd#1205 the linting is flakey and it would be frustrating to lose a whole nightly release, and finally due to using v0.3.1 it's not possible to use workingDir, which is required by the golang build Task. The Pipelines and Tasks have been updated to work with Tekton Pipelines v0.3.1 because that's what we're using in our official cluster (since currently Prow requires it). Made release instructions more oriented toward someone actually making a release vs. a random person trying to run the same pipeline against their own infrastructure. Removed example Runs b/c it's much simpler to invoke via `tkn`, or Prow (these were falling out of date with how we were actually using the Pipelines/Tasks as well). Removed the `gcs-uploader-image` PipelineResource which is no longer being used. Fixes tektoncd#860
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bobcatfish 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 |
This is the configuration to run the Pipeline + Tasks being added in tektoncd/pipeline#1274 every night at midnight PDT. I've successfully run this by setting the cron to every 5 minutes. This configuration is already applied to the repo. Status can be seen at https://prow.tekton.dev/?type=periodic. Part of tektoncd/pipeline#860
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I 😻 it 🎉
|
||
1. Install / update Tekton in the kubernetes cluster you'll be running against either via: | ||
1. [Install Tekton v0.3.1](#install-tekton) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should say tkn
or "Tekton CLI" here right ?
value: /secret/release.json | ||
|
||
volumes: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be specified in the PipelineRun
with PodTemplate
(that said it's not supported yet by tkn
…)
This is the configuration to run the Pipeline + Tasks being added in tektoncd/pipeline#1274 every night at midnight PDT. I've successfully run this by setting the cron to every 5 minutes. This configuration is already applied to the repo. Status can be seen at https://prow.tekton.dev/?type=periodic. Part of tektoncd/pipeline#860
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM once we add the bit about installing the CLI like Vincent mentioned!
@@ -55,7 +55,7 @@ spec: | |||
- /kaniko/executor | |||
args: | |||
- --dockerfile=/workspace/go/src/github.com/tektoncd/pipeline/images/Dockerfile | |||
- --destination=$(inputs.params.imageRegistry)/$(inputs.params.pathToProject)/$(outputs.resources.builtBaseImage.url) | |||
- --destination=${inputs.params.imageRegistry}/${inputs.params.pathToProject}/${outputs.resources.builtBaseImage.url} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😿
- name: revision | ||
value: vX.Y.Z-invalid-tags-boouuhhh # REPLACE with your own commit | ||
value: vX.Y.Z-invalid-tags-boouuhhh # REPLACE with the commit you want to release |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 for clear description!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this! I have a few minor comments, but nothing blocking really.
gcloud container clusters get-credentials prow --zone us-central1-a --project tekton-releases | ||
``` | ||
|
||
name: tekton-pipelines-vX-Y- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uhm, something's missing here, the rest of the pipelineresource definition is on L70-76 mixed up with the text.
|
||
```shell | ||
# Do not forget to change those environment variables ! | ||
# Change thie environment variable to the verison you would like to use. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT: s/verison/version
|
||
- [koparse](./koparse) - Contains logic for parsing `release.yaml` files created | ||
by `ko` | ||
# Connected to the `prow` in the `tekton-releases` GCP project |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT: prow
cluster?
|
||
## Supporting scripts and images | ||
|
||
Some supporting scripts have been written using Python 2.7: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to change those to python3 soon! :)
mkdir -p /workspace/bucket/previous/$VERSION_TAG/ | ||
cp /workspace/bucket/latest/release.yaml /workspace/bucket/previous/$VERSION_TAG/release.yaml | ||
|
||
- name: tag-images |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kaniko (the latest version at least) supports specifying multiple destinations for a single build command, meaning that we could build and tag the images in the same step. It might be that the code would be less readable though.
@@ -0,0 +1,226 @@ | |||
apiVersion: tekton.dev/v1alpha1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a few differences between publish and publish-nightly, but not so many, so it would be nice eventually to have them converge to a single Task executed with different inputs.
One difference that might be difficult to overcome is the version of the ko-ci image, which is gcr.io/tekton-releases/ko-ci
in one case and gcr.io/tekton-nightly/ko-ci
in the other case. I wonder if we support variable substitution in the image
field as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me as a first step, we can follow-up on this (the postsubmit job is already there it seems)
/lgtm
/test pull-tekton-pipeline-integration-tests |
👀
/test pull-tekton-pipeline-build-tests |
/test pull-tekton-pipeline-integration-tests |
1 similar comment
/test pull-tekton-pipeline-integration-tests |
Changes
This Pipeline will be triggered via prow over in the tektoncd/plumbing
repo every night. It will create releases of all images normally
released when doing official releases, plus also the image used for
building with ko, and tag them with the date and commit they were built
at, and will create the release.yaml as well.
This Pipeline is missing a few things that are in the manual release
Pipeline - due to #1124 unit tests have a race condition, due to #1205
the linting is flakey and it would be frustrating to lose a whole
nightly release, and finally due to using v0.3.1 it's not possible to
use workingDir, which is required by the golang build Task.
The Pipelines and Tasks have been updated to work with Tekton Pipelines
v0.3.1 because that's what we're using in our official cluster (since
currently Prow requires it).
Made release instructions more oriented toward someone actually
making a release vs. a random person trying to run the same pipeline
against their own infrastructure.
Removed example Runs b/c it's much simpler to invoke
via
tkn
, or Prow (these were falling out of date with how we wereactually using the Pipelines/Tasks as well).
Removed the
gcs-uploader-image
PipelineResource which is no longerbeing used.
Fixes #860
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
See the contribution guide for more details.
Double check this list of stuff that's easy to miss:
cmd
dir, please updatethe release Task and TaskRun to build and release this image
Reviewer Notes
If API changes
are included, additive changes
must be approved by at least two OWNERS
and backwards incompatible changes
must be approved by more than 50% of the OWNERS,
and they must first be added
in a backwards compatible way.