1
0
mirror of https://github.com/tektoncd/catalog.git synced 2024-11-21 05:55:35 +00:00
Commit Graph

104 Commits

Author SHA1 Message Date
vinamra28
11a17cfe87 Add security context in create step of buildpacks
Signed-off-by: vinamra28 <vinjain@redhat.com>
2020-11-19 15:58:28 +00:00
vinamra28
2f24ebc1b2 Fix e2e script
- While running integration tests we are getting `dirname: missing operand`.
- `git --no-pager diff --name-only 65dd35a5e8a7e63443b52df70ea5bbc0bc621dac..` Pull SHA is missing so fixed that

Signed-off-by: vinamra28 <vinjain@redhat.com>
2020-11-17 08:55:28 +00:00
Priti Desai
3770e17cf3 bumping up pipeline version
Tekton Pipeline 0.18.0 was just released and as part of the release
process, bumping up the following images in the catalog tasks:

git-batch-merge - v0.17.3
git-clone - v0.17.3

0.18 contains bug fix for git-init and therefore bumping related tasks only.
2020-11-11 09:36:26 +00:00
Chmouel Boudjnah
7b49793238 Fix add_task common function
We were not getting properly the versions when there was files like OWNER in there

so make sure to grab only the directory

Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
2020-10-30 13:44:21 +00:00
Chmouel Boudjnah
9a3c2ef648 Make sure we ar enot quoting $@
And detect properly the changed files when we have multiple yaml files in dir.

Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
2020-10-29 16:24:21 +00:00
Chmouel Boudjnah
5412a08cfc Test only the tasks that has been modified or added
We are detecting the task that only has been modified or added with the help of
git diff against the 'main' branch.

If we set and define the variable TEST_RUN_ALL_TESTS it will force running all
the tests and not just the modified ones.

Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
2020-10-28 17:35:21 +00:00
Chmouel Boudjnah
95006e48b4 Improve e2e tests runner output
We temporary disable the debug output while on the loop so we don't have the
gazillions debug messages while digging into the log. We have added the 'timing'
when it start and ends so we can easily spots the very slow test.

Aditionally we have introduced the new variable `CATALOG_TEST_SKIP_CLEANUP` if
set it will skip deleting the namespace. This is useful when running in
conjuncton with the `./test/run-test.sh` script to debug when there is a failure.

Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
2020-10-26 11:24:20 +00:00
divyansh42
28866d4a83 Bump images to 0.17.1
Signed-off-by: divyansh42 <diagrawa@redhat.com>
2020-10-14 14:56:22 +01:00
Chmouel Boudjnah
73b9b12e53 Add add_task helper function for tests
We were previously using the outdated git_clone version 0.1 in the
add_git_clone_task function.

So let's introduce a more generic function :

```
add_task ${task} ${version}
```

if version is 'latest' it will always install the latest version of the task.

Change all pre-apply-task-hook to use that function instead.

Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
2020-10-07 17:51:55 +01:00
Chmouel Boudjnah
b9383b4936 Add support for REST services testing
Add support for REST services testing, if we have a directory in the tests
directory called `fixtures` with a yaml file that contains a responder
rules (see github-add-comments task example) it will add a sidecar task from
https://github.com/chmouel/go-rest-api-test/ so the test can point to it.

Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
2020-10-06 17:03:54 +01:00
vinamra28
fdca849a59 Bump images to 0.16.2
Signed-off-by: vinamra28 <vinjain@redhat.com>
2020-09-15 21:33:24 +01:00
Chmouel Boudjnah
9aa07d4adf Use the proper path for the last release.yaml
previous link https://storage.googleapis.com/tekton-releases/latest/release.yaml would install 0.10.0
2020-09-01 19:12:13 +01:00
popcor255
58900d2a75 use default yaml release using google apis instead of querying github api
This line queries twice to the github api in order to apply the tekton release yaml. It would increase readability if we just use the googleapi to fetch the yaml.
2020-09-01 10:08:12 +01:00
popcor255
a9600e084a [Fixes #481] remove add registry sidecar from docker-build tests
The end to end test attaches a sidecar with a image registry for tasks to push into to. However, the function add_sidecar_registry sets the sidecar registry instead of appending it. Removing the function from test to remove this bug. There is a local registry being added to the test that is deployed with deployment and svc. The svc is referenced during the test instead of the sidecar. #481
2020-08-31 15:25:12 +01:00
vinamra28
015142c05f Fix CI issues
CI was not able to monitor some pipelineruns for tasks in catalog example maven task and was getting "Could not find a created taskrun or pipelinerun in maven-0-1+ breakit=True" which is not the expected behaviour so with this patch we will iterate over it 5 times and check for it's status and reason

Signed-off-by: vinamra28 <vinjain@redhat.com>
2020-08-17 17:17:08 +01:00
Piyush Garg
947198561e Bump images to 0.15.2 2020-08-12 08:52:06 +01:00
Piyush Garg
71983fd2d9 Skip docker-build in CI
This will docker-build test in CI as it is
flaky atm and causing other PR not able
to merge
2020-08-11 16:17:06 +01:00
Chmouel Boudjnah
f5824acdda Bump to pipeline 0.15.1
Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
2020-08-11 11:46:06 +01:00
Chmouel Boudjnah
3ba53979da Add a helper script to run a task test directly from your cluster
This script will allow the developer to test a task directly withouth having to
send it to the CI and wait that all tasks runs to test it.

Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
2020-08-11 10:11:06 +01:00
Piyush Garg
b895a44bba Refactor namespace name to have version
This will refactor the namespace name to have version of task
in namespace name as current logic may create issue in case
of multiple versions running in same namespace as pid will
remain same
2020-08-03 10:25:03 +01:00
Chmouel Boudjnah
bddd282012 Centralize all the git-clone apply task to a common function
Centralize all the the git-clone apply commands we had around the
pre-apply-task-hook to a central common function.

This will make easier to have the same git-clone task version used everywhere.

Add some documentation about the helper functions along the way.

Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
2020-07-24 15:00:01 +01:00
Piyush Garg
e83bc62494 Refactor sidecar script
This will refactor sidecar script to read it in
a better way to avoid unicode error
2020-07-22 07:58:00 +01:00
Piyush Garg
299b352d75 Use python3 2020-07-21 11:20:00 +01:00
Vincent Demeester
2bb049e125 Bump pipeline release to 0.14.2
- Update the pipeline to install for e2e tests
- Update images to refer to 0.14.0 version of pipeline

Signed-off-by: Vincent Demeester <vdemeest@redhat.com>
2020-07-17 15:31:59 +01:00
Ian Coffey
3985b72782 Add cloudevent task and fix to fit new formatting 2020-07-16 19:35:58 +01:00
Piyush Garg
7a474eac65 Fix warning for yaml.Load function 2020-07-16 18:35:59 +01:00
Piyush Garg
dce60ee8c5 Skip cloudevent task as it is failing 2020-07-16 18:35:59 +01:00
Piyush Garg
479c6d967b Update e2e scipts according to new structure
This will update the e2e scripts to run tests according to
new catalog structure after reorg

Fix #420
2020-07-16 18:35:59 +01:00
PuneetPunamiya
e680707ec9 Enables the yamllint job
Issue: #387

Signed-off-by: Puneet Punamiya <ppunamiy@redhat.com>
2020-06-25 17:20:59 +01:00
Chmouel Boudjnah
b79765dbbd test-runner: Do not show logs on success
This can grow the log pretty big with message that not a lot of people will care
about.

when we show the logs on failure, make sure we are not failing if we can't show
them. Sometime some container may be in "Terminated" state until k8 cleans them
up. (i.e: affinity-assistant) so no need to worry if those are failing/exiting before
showing the next container log.

Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
2020-06-23 15:06:59 +01:00
Dibyo Mukherjee
903370fd9f Wait until all TaskRuns are complete to print logs
The loop in the test runner script that was waiting for all TaskRuns to
complete had a bug where it would break out of the loop as soon as any one of
the TaskRuns completed. The test runner then tries to print the logs for all
TaskRuns (which includes some Running ones) which will sometimes fail e.g. if
the TaskRun's pod is in a PodInitializing state.

Fixes #379

Signed-off-by: Dibyo Mukherjee <dibyo@google.com>
2020-06-22 23:06:58 +01:00
Christie Wilson
4ce31b6c8d Update automation to test against 0.13.2
Eventually we want to be able to have Tasks declare what versions they
are compatible with and test against those
(https://github.com/tektoncd/catalog/issues/373) but in the meantime, it
seems reasonable to bump the version every time we do a release (and
even once we have #373, we would want to be running tests against new
versions as well - and this could have the benefit of giving us
information about issues in a release early, before users notice them!)
2020-06-18 21:15:57 +01:00
Chmouel Boudjnah
6b7cf32a82 Make sure we skip the test if there is no yaml file in there
Test would be failing if there is a directory but no yaml template in there,
which in reality we should not have this happening but it happens sometime.

let's make sure we skip the test if there is no yaml files then.

Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
2020-06-04 09:56:51 +01:00
Scott
7fade7fc03 Update to Pipelines 0.12.1 for e2e tests
We've been using Pipelines 0.11.0-rc2 for e2e tests but that's
now several months old and there are features in 0.12+ that we
can expect to appear in Catalog Tasks and their Tests.

This commit attempts to update the version of Tekton used for
e2e tests.
2020-05-18 10:30:05 +01:00
Scott
67612fa4f6 Give test Runs time to appear in kubectl get lists
Immediately after our test runner submits test TaskRuns / PipelineRuns
it checks that those Runs appear in `kubectl get` output. In a recent
PR to add a kythe-go Task (#301) the test runner would fail at this
point. Checking locally I was able to reproduce the issue. It looks
like it can take a small amount of time for submitted resources to
show up in `kubectl get` output.

For other types of test failures the test runner gives a grace period of
up to ten minutes. I did the same for the `kubectl get` check, allowing
the test run loop to run again in ten seconds if nothing appears in a
taskrun / pipelinerun list. Making that change resulted in the kythe-go
test proceeding normally and passing.

This commit updates the test runner to repeatedly check whether
TaskRuns / PipelineRuns have appeared in the `kubectl get` output.
2020-05-07 10:06:36 +01:00
Chmouel Boudjnah
f86cb987b4 Allow multiple tests on each tasks
We were checking only one test previously, let allow multiple test in task

Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
2020-04-16 15:03:04 +01:00
Vincent Demeester
2c3c81f712 Temporarly disable yamllint 😓
yamllint fails often on the current CI image. While we are working on
fixing it, let's disable yamllint temporarly.

Signed-off-by: Vincent Demeester <vdemeest@redhat.com>
2020-04-09 16:47:02 +01:00
Chmouel Boudjnah
22e0507eef Handle TaskRun as well as PipelineRun tests
Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
2020-04-08 23:15:01 +01:00
Vincent Demeester
a3f2ee24aa Add -x to be able to debug what is happening
Signed-off-by: Vincent Demeester <vdemeest@redhat.com>
2020-03-23 08:11:52 -05:00
Vincent Demeester
074ddecbb9 Force using v0.11.0-rc2 yaml for the v1beta1 branch
Signed-off-by: Vincent Demeester <vdemeest@redhat.com>
2020-03-23 08:11:52 -05:00
Vincent Demeester
a648e990dd Use PipelineRun instead of TaskRun in e2e 📎
Signed-off-by: Vincent Demeester <vdemeest@redhat.com>
2020-03-11 07:43:48 -05:00
Vincent Demeester
54b250dc32 Add more *dump* information in case of failure 🦆
Output Tasks, Pipeline, PipelineRun and TaskRun.

Signed-off-by: Vincent Demeester <vdemeest@redhat.com>
2020-03-11 07:43:48 -05:00
Vincent Demeester
5358e7b7cd Disable markdown link check 😓
Signed-off-by: Vincent Demeester <vdemeest@redhat.com>
2020-01-28 05:23:52 -06:00
Chmouel Boudjnah
a642294878 Catalog tests should not be looping in case of failures
We are currently looping forever without any safe counter, let's just do that,

Refactoring a bit so we reuse a common function for that,

Closes #156

Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
2019-12-03 03:41:38 -06:00
Chmouel Boudjnah
c9bd921943 [E2E] Add common function when we are adding a registry to tasks
Closes #145

Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
2019-11-27 04:09:35 -06:00
Chmouel Boudjnah
1b3ceee11d Fix S2I E2E Test
Run the python s2i example from the official sclorgs image instead of the nodejs
one with my personal directory.

Add loglevel parameter to s2i

Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
2019-11-25 07:39:35 -06:00
Chmouel Boudjnah
c2dd526fe5 Refactor the test functions
- Move test functiosn to e2e-common
- Remove old serviceaccount things
- Allow override functions (or add) like the way we do with plumbing
functions (for downstream CIs)

Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
2019-11-18 11:25:33 -06:00
Piyush Garg
608f6fd06d Refactor e2e test
This will add create install pipeline CRD
function which can accept release yaml or
install latest
2019-11-15 12:02:32 -06:00
Chmouel Boudjnah
43f52adb4d Add Taskrun e2e testing
We are adding a test directory with a collection of yamls to runs.

There is a hook system which allows to do some manipulation on task for the
tests (as we don't want to modify the main task). Or if we want to do some extra
pre-setup before setting the taskrun

For example on buildah/kaniko would add a registry as a sidecontainers on
the tasks so we can do our testings without having to upload it somewhere.

S2I is disabled too due of not working on other cluster than openshift.

Closes: #103
2019-11-14 08:10:31 -06:00
Chmouel Boudjnah
e081fed543 E2E Tests: Allow ignores and ns default
- allow ignores with the IGNORES variables
- use the created namespace to run the tests
- sed the templates to use that namespace
2019-09-25 11:07:13 -05:00
Chmouel Boudjnah
690d175901 Do not initialize a GCP cluster if we run a local CI
Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
2019-09-25 06:56:12 -05:00
Dan Lorenc
d9147be8a1 Add a basic Task CRD validation test for all Tasks in the catalog.
This e2e test just verifies each task is valid by setting up a test cluster and
creating each task. This uses boskos to provision and clean a project.

This also fixes up the makisu task to remove the extraneuous yaml file.
2019-05-16 10:32:59 -05:00
Vincent Demeester
9443e5585d Use tektoncd/plumbing instead of knative/test-infra
As Pipeline graduated from `knative`, we're trying, with `plumbing` to
make remove our dependency on knative `test-infra` scripts. Those
scripts have been migrated to `tektoncd/plumbing`, so let's start use those.

The end goal being to reduce even more the use of those script and
only use pipeline to run experimental pipelines 👼.

Signed-off-by: Vincent Demeester <vdemeest@redhat.com>
2019-05-15 09:42:57 -05:00
Dan Lorenc
acb7ca4c0f Add the required boilerplate to run presubmit tests in prow.
This adds a single dummy test (required to make dep fetch the dependencies),
and then the Gopkg.toml configuration so we grab the presubmit helper scripts.

This will eventually use the code in plumbing instead of knative, but that isn't
ready yet.
2019-05-13 11:12:56 -05:00