Skip to content

Commit

Permalink
chore: Update test-infra (#742)
Browse files Browse the repository at this point in the history
  • Loading branch information
navidshaikh authored Mar 17, 2020
1 parent db569fa commit 2fcf5ad
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 22 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ require (
knative.dev/eventing v0.13.1
knative.dev/pkg v0.0.0-20200304185554-312b1be35ceb
knative.dev/serving v0.13.0
knative.dev/test-infra v0.0.0-20200229011351-4dac123b9a3d
knative.dev/test-infra v0.0.0-20200317044931-e97f2ecc90ce
sigs.k8s.io/yaml v1.1.0
)

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -598,8 +598,8 @@ knative.dev/pkg v0.0.0-20200304185554-312b1be35ceb h1:cgpFaVF0jb7z+zJGzq30HMfxMm
knative.dev/pkg v0.0.0-20200304185554-312b1be35ceb/go.mod h1:pgODObA1dTyhNoFxPZTTjNWfx6F0aKsKzn+vaT9XO/Q=
knative.dev/serving v0.13.0 h1:HkkTVBi6EWoFJcgjXgAVUFdKdxZRulb38dnfnkBYCrQ=
knative.dev/serving v0.13.0/go.mod h1:x2n255JS2XBI39tmjZ8CwTxIf9EKNMCrkVuiOttLRm0=
knative.dev/test-infra v0.0.0-20200229011351-4dac123b9a3d h1:YlscBzPOL3Rfyl8844/wHhJNL5uiHDdyaRn6IEVvv64=
knative.dev/test-infra v0.0.0-20200229011351-4dac123b9a3d/go.mod h1:xcdUkMJrLlBswIZqL5zCuBFOC22WIPMQoVX1L35i0vQ=
knative.dev/test-infra v0.0.0-20200317044931-e97f2ecc90ce h1:XTqgZ7XLDcRcmGxBwjnEkmQDHT6xg25skjGe6K1H0Cs=
knative.dev/test-infra v0.0.0-20200317044931-e97f2ecc90ce/go.mod h1:xcdUkMJrLlBswIZqL5zCuBFOC22WIPMQoVX1L35i0vQ=
modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw=
modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk=
modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k=
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# For help, see
# https://github.com/raviqqe/liche/blob/master/README.md

# Don't check localhost links
-x "^https?://localhost($|[:/].*)"
# Don't check localhost links and don't check templated links
-x "(^https?://localhost($|[:/].*))|(^https://.*{{.*$)"
18 changes: 10 additions & 8 deletions vendor/knative.dev/test-infra/scripts/presubmit-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -147,14 +147,20 @@ function markdown_build_tests() {

# Default build test runner that:
# * check markdown files
# * `go build` on the entire repo
# * run `/hack/verify-codegen.sh` (if it exists)
# * `go build` on the entire repo
# * check licenses in all go packages
function default_build_test_runner() {
local failed=0
# Perform markdown build checks first
# Perform markdown build checks
markdown_build_tests || failed=1
# For documentation PRs, just check the md files
# Run verify-codegen check
if [[ -f ./hack/verify-codegen.sh ]]; then
subheader "Checking autogenerated code is up-to-date"
report_build_test Verify_CodeGen ./hack/verify-codegen.sh || failed=1
fi
# For documentation PRs, just check the md files and run
# verify-codegen (as md files can be auto-generated in some repos).
(( IS_DOCUMENTATION_PR )) && return ${failed}
# Don't merge these two lines, or return code will always be 0.
local go_pkg_dirs
Expand Down Expand Up @@ -186,13 +192,9 @@ function default_build_test_runner() {
# Remove unused generated binary, if any.
rm -f e2e.test
done

local errors_go="$(echo -e "${errors_go1}\n${errors_go2}" | uniq)"
create_junit_xml _build_tests Build_Go "${errors_go}"
if [[ -f ./hack/verify-codegen.sh ]]; then
subheader "Checking autogenerated code is up-to-date"
report_build_test Verify_CodeGen ./hack/verify-codegen.sh || failed=1
fi
# Check that we don't have any forbidden licenses in our images.
subheader "Checking for forbidden licenses"
report_build_test Check_Licenses check_licenses ${go_pkg_dirs} || failed=1
Expand Down
30 changes: 22 additions & 8 deletions vendor/knative.dev/test-infra/scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -498,9 +498,30 @@ function publish_artifacts() {

# Entry point for a release script.
function main() {
parse_flags "$@"

# Checkout specific branch, if necessary
local current_branch
current_branch="$(git rev-parse --abbrev-ref HEAD)"
if [[ -n "${RELEASE_BRANCH}" && -z "${FROM_NIGHTLY_RELEASE}" && "${current_branch}" != "${RELEASE_BRANCH}" ]]; then
setup_upstream
setup_branch
# When it runs in Prow, the origin is identical with upstream, and previous
# fetch already fetched release-* branches, so no need to `checkout -b`
if (( IS_PROW )); then
git checkout "${RELEASE_BRANCH}" || abort "cannot checkout branch ${RELEASE_BRANCH}"
else
git checkout -b "${RELEASE_BRANCH}" upstream/"${RELEASE_BRANCH}" || abort "cannot checkout branch ${RELEASE_BRANCH}"
fi
# HACK HACK HACK
# Rerun the release script from the release branch. Fixes https://github.com/knative/test-infra/issues/1262
./hack/release.sh "$@"
exit "$?"
fi

function_exists build_release || abort "function 'build_release()' not defined"
[[ -x ${VALIDATION_TESTS} ]] || abort "test script '${VALIDATION_TESTS}' doesn't exist"
parse_flags "$@"

# Log what will be done and where.
banner "Release configuration"
if which gcloud &>/dev/null ; then
Expand Down Expand Up @@ -533,13 +554,6 @@ function main() {
fi
[[ -n "${RELEASE_NOTES}" ]] && echo "- Release notes are generated from '${RELEASE_NOTES}'"

# Checkout specific branch, if necessary
if [[ -n "${RELEASE_BRANCH}" && -z "${FROM_NIGHTLY_RELEASE}" ]]; then
setup_upstream
setup_branch
git checkout upstream/${RELEASE_BRANCH} || abort "cannot checkout branch ${RELEASE_BRANCH}"
fi

if [[ -n "${FROM_NIGHTLY_RELEASE}" ]]; then
build_from_nightly_release
else
Expand Down
2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ knative.dev/serving/pkg/autoscaler/config
knative.dev/serving/pkg/client/clientset/versioned/scheme
knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1
knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/fake
# knative.dev/test-infra v0.0.0-20200229011351-4dac123b9a3d
# knative.dev/test-infra v0.0.0-20200317044931-e97f2ecc90ce
knative.dev/test-infra/scripts
# sigs.k8s.io/kustomize v2.0.3+incompatible
sigs.k8s.io/kustomize/pkg/commands/build
Expand Down

0 comments on commit 2fcf5ad

Please sign in to comment.