Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.

Commit

Permalink
wip: enable presubmit tests on experimental repository
Browse files Browse the repository at this point in the history
Tests will run for all PRs, but it should run only the folder that
have changed files. If files are changed accross folders, it will run
all of the tests.

Signed-off-by: Vincent Demeester <[email protected]>
  • Loading branch information
vdemeester committed Jun 12, 2019
1 parent 702e52a commit 7af40f9
Show file tree
Hide file tree
Showing 11 changed files with 1,837 additions and 0 deletions.
32 changes: 32 additions & 0 deletions tekton-listener/test/presubmit-tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/usr/bin/env bash

# Copyright 2018 The Tekton Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# This script runs the presubmit tests; it is started by prow for each PR.
# For convenience, it can also be executed manually.
# Running the script without parameters, or with the --all-tests
# flag, causes all tests to be executed, in the right order.
# Use the flags --build-tests, --unit-tests and --integration-tests
# to run a specific set of tests.

# Markdown linting failures don't show up properly in Gubernator resulting
# in a net-negative contributor experience.
export DISABLE_MD_LINTING=1

#source $(dirname $0)/../../../vendor/github.com/tektoncd/plumbing/scripts/presubmit-tests.sh

# We use the default build, unit and integration test runners.

main $@
45 changes: 45 additions & 0 deletions test/presubmit-tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/usr/bin/env bash

# Copyright 2018 The Tekton Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# This script runs the presubmit tests; it is started by prow for each PR.
# For convenience, it can also be executed manually.
# Running the script without parameters, or with the --all-tests
# flag, causes all tests to be executed, in the right order.
# Use the flags --build-tests, --unit-tests and --integration-tests
# to run a specific set of tests.

# Markdown linting failures don't show up properly in Gubernator resulting
# in a net-negative contributor experience.
export DISABLE_MD_LINTING=1

source $(dirname $0)/../vendor/github.com/tektoncd/plumbing/scripts/presubmit-tests.sh

echo $CHANGED_FILES

IS_TEKTONCD_LISTENER_ONLY=0
IS_WEBHOOK_EXTENSION_ONLY=0

pr_only_contains "tektoncd-listener" && IS_TEKTONCD_LISTENER_ONLY=1
pr_only_contains "tektoncd-listener" && IS_WEBHOOK_EXTENSION_ONLY=1

if (( IS_TEKTONCD_LISTENER_ONLY )); then
source $(dirname $0)/../tektoncd-listener/test/presubmit-tests.sh
elif (( IS_WEBHOOK_EXTENSION_ONLY)); then
source $(dirname $0)/../webhooks-extension/test/presubmit-tests.sh
else
source $(dirname $0)/../tektoncd-listener/test/presubmit-tests.sh
source $(dirname $0)/../webhooks-extension/test/presubmit-tests.sh
fi
201 changes: 201 additions & 0 deletions vendor/github.com/tektoncd/plumbing/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 7af40f9

Please sign in to comment.