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

Add nightly release pipeline 🌙 #1274

Merged
merged 1 commit into from
Sep 16, 2019

Conversation

bobcatfish
Copy link
Collaborator

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 were
actually using the Pipelines/Tasks as well).

Removed the gcs-uploader-image PipelineResource which is no longer
being 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:

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.

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
@tekton-robot
Copy link
Collaborator

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 4, 2019
@googlebot googlebot added the cla: yes Trying to make the CLA bot happy with ppl from different companies work on one commit label Sep 4, 2019
@tekton-robot tekton-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Sep 4, 2019
bobcatfish added a commit to bobcatfish/plumbing that referenced this pull request Sep 4, 2019
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
Copy link
Member

@vdemeester vdemeester left a 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)
Copy link
Member

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:
Copy link
Member

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…)

tekton-robot pushed a commit to tektoncd/plumbing that referenced this pull request Sep 5, 2019
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
Copy link
Member

@dibyom dibyom left a 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}
Copy link
Member

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
Copy link
Member

Choose a reason for hiding this comment

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

👍 for clear description!

Copy link
Member

@afrittoli afrittoli left a 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-
Copy link
Member

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.
Copy link
Member

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
Copy link
Member

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:
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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?

Copy link
Member

@vdemeester vdemeester left a 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

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Sep 11, 2019
@vdemeester
Copy link
Member

/test pull-tekton-pipeline-integration-tests

@dibyom
Copy link
Member

dibyom commented Sep 12, 2019

👀

I0911 14:53:52.608] ERROR https://www.apache.org/licenses/LICENSE-2.0
I0911 14:53:52.608] Dialing to the given TCP address timed out

/test pull-tekton-pipeline-build-tests

@dibyom
Copy link
Member

dibyom commented Sep 16, 2019

/test pull-tekton-pipeline-integration-tests

1 similar comment
@dibyom
Copy link
Member

dibyom commented Sep 16, 2019

/test pull-tekton-pipeline-integration-tests

@tekton-robot tekton-robot merged commit 5d72079 into tektoncd:master Sep 16, 2019
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. cla: yes Trying to make the CLA bot happy with ppl from different companies work on one commit lgtm Indicates that a PR is ready to be merged. 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.

Create Pipeline for nightly releases
6 participants