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

Test GCS Tasks #262

Merged
merged 1 commit into from Apr 16, 2020
Merged

Test GCS Tasks #262

merged 1 commit into from Apr 16, 2020

Conversation

ghost
Copy link

@ghost ghost commented Apr 7, 2020

Changes

Tasks in the catalog don't currently have a uniform approach to testing. It would be good if the catalog provided some kind of blessed path and supporting infrastructure so that Tasks can be exercised as part of PRs.

This commit includes a test for the GCS tasks that utilizes triggers to kick off a pipelinerun. There are still some decisions to be made around how service account generation might work, how the needed infra gets spun up, and how the triggers get triggered in the first place, but this demonstrates the general idea.

author: @bobcatfish
coauthor: @sbwsg

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.

@tekton-robot tekton-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 7, 2020
@tekton-robot tekton-robot requested review from chmouel and imjasonh April 7, 2020 16:36
@tekton-robot tekton-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Apr 7, 2020
gcs/tests/gcs-sample.yaml Outdated Show resolved Hide resolved
gcs/tests/gcs-sample.yaml Outdated Show resolved Hide resolved
gcs/tests/gcs-sample.yaml Outdated Show resolved Hide resolved
#!/usr/bin/env bash
set -xe
mkdir -p $(workspaces.data.path)/$(uid)/cookies/
echo "Test data $(uid)" > $(workspaces.data.path)/$(uid)/cookies/recipe
Copy link
Author

Choose a reason for hiding this comment

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

put a recipe in the recipe file or call the file something different.

Copy link
Contributor

Choose a reason for hiding this comment

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

now i suddenly want to create something called "tekton recipes"

@bobcatfish
Copy link
Contributor

I0407 16:56:57.079] unable to recognize "/tmp/.mm.ERwvFj": no matches for kind "TriggerTemplate" in version "triggers.tekton.dev/v1alpha1"
I0407 16:56:57.080] unable to recognize "/tmp/.mm.ERwvFj": no matches for kind "TriggerBinding" in version "triggers.tekton.dev/v1alpha1"
I0407 16:56:57.080] unable to recognize "/tmp/.mm.ERwvFj": no matches for kind "EventListener" in version "triggers.tekton.dev/v1alpha1"

looks like the existing tests try to apply all the yamls which wont work for the triggers types (yet!)

- name: output
workspace: data
params:
- name: name
Copy link
Contributor

Choose a reason for hiding this comment

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

oh whoops, this should be path now i think!

@googlebot googlebot added the cla: yes CLA has been signed label Apr 8, 2020
@ghost
Copy link
Author

ghost commented Apr 8, 2020

I've renamed the tests folder to sample. Hopefully the testing script will ignore it now. 🤞

@ghost
Copy link
Author

ghost commented Apr 8, 2020

/test pull-tekton-catalog-integration-tests

- name: pvc-name
- name: project-name
- name: secret-name
resourceTemplates:
Copy link
Contributor

Choose a reason for hiding this comment

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

this should actually be resourcetemplates - long story regarding how we got away with this but working with @dibyom it looks like this might be the root of tektoncd/triggers#526

Copy link
Contributor

Choose a reason for hiding this comment

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

😅

Copy link
Author

Choose a reason for hiding this comment

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

👍 replaced resourceTemplates with resourcetemplates

Tasks in the catalog don't currently have a uniform approach
to testing. It would be good if the catalog provided some
kind of blessed path and supporting infrastructure so that
Tasks can be exercised as part of PRs.

This commit includes a test for the GCS tasks that utilizes
triggers to kick off a pipelinerun. There are still some decisions
to be made around how service account generation might work,
how the needed infra gets spun up, and how the triggers get
_triggered_ in the first place, but this demonstrates the
general idea.

coauthored with @sbwsg
@ghost ghost changed the title WIP Test GCS Tasks Test GCS Tasks Apr 13, 2020
@tekton-robot tekton-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 13, 2020
@bobcatfish
Copy link
Contributor

/approve
/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Apr 16, 2020
@tekton-robot
Copy link

[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 Apr 16, 2020
@tekton-robot tekton-robot merged commit 75a5969 into tektoncd:v1beta1 Apr 16, 2020
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 CLA has been signed lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants