- 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>
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.
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>
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>
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>
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>
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>
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.
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
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>
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>
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
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>
- 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>
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>
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>
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!)
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>
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.
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.
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>
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>
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>
- 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>
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
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.
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>
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.