From 527bf1d6f207efdb5b5c45e392d7577e0167dff0 Mon Sep 17 00:00:00 2001 From: wang-y-z Date: Fri, 3 Nov 2023 10:56:53 +0800 Subject: [PATCH 1/2] Fix broken links about Jenkins --- ci/README.md | 16 ++++++++-------- ci/jenkins/README.md | 4 ++-- ci/jenkins/templates/utils/base.groovy.j2 | 2 +- docs/contribute/ci.rst | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/ci/README.md b/ci/README.md index 2cb915e70207..2f67e590f69a 100644 --- a/ci/README.md +++ b/ci/README.md @@ -27,7 +27,7 @@ TVM project in a healthy state and preventing breakages. CI in TVM is broken int - Definitions of test suites, with each suite defined as a separate `task_` script in [`tests/scripts`](../tests/scripts). - Scripts and automation [`ci/scripts`](../ci/scripts). - - The linux test sequence (in [`Jenkinsfile`](../Jenkinsfile)), which lints and builds TVM and runs test + - The linux test sequence (in [`Jenkinsfile`](../ci/jenkins/templates/)), which lints and builds TVM and runs test suites using Docker on Linux. - The Windows and Mac test sequences (in [`.github/actions`](../.github/actions)). - GitHub Actions that support the code review process (in [`.github/actions`](../.github/actions)). @@ -66,21 +66,21 @@ https://github.com/apache/tvm/actions has the logs for each of these workflows. Each CI job runs most of its work inside a Docker container, built from files in the [`docker/`](../docker) folder. These -files are built nightly in Jenkins via the [docker-images-ci](https://ci.tlcpack.ai/job/docker-images-ci/>) job. -The images for these containers are hosted in the [tlcpack Docker Hub](https://hub.docker.com/u/tlcpack>) -and referenced in the [`Jenkinsfile.j2`](Jenkinsfile.j2). These can be inspected and run +files are built nightly in Jenkins via the [docker-images-ci](https://ci.tlcpack.ai/job/docker-images-ci/) job. +The images for these containers are hosted in the [tlcpack Docker Hub](https://hub.docker.com/u/tlcpack) +and referenced in the [`jenkins/templates`](/ci/jenkins/templates/). These can be inspected and run locally via standard Docker commands. ### `ci-docker-staging` -The [ci-docker-staging](https://github.com/apache/tvm/tree/ci-docker-staging>) +The [ci-docker-staging](https://github.com/apache/tvm/tree/ci-docker-staging) branch is used to test updates to Docker images and `Jenkinsfile` changes. When running a build for a normal PR from a forked repository, Jenkins uses the code from the PR except for the `Jenkinsfile` itself, which comes from the base branch. When branches are built, the `Jenkinsfile` in the branch is used, so a committer with write access must push PRs to a branch in apache/tvm to properly test `Jenkinsfile` changes. If your PR makes changes to the `Jenkinsfile`, make sure -to @ a [committer](../CONTRIBUTORS.md>) +to @ a [committer](/CONTRIBUTORS.md) and ask them to push your PR as a branch to test the changes. # Jenkins CI @@ -88,11 +88,11 @@ and ask them to push your PR as a branch to test the changes. TVM uses Jenkins for running Linux continuous integration (CI) tests on [branches](https://ci.tlcpack.ai/job/tvm/) and [pull requests](https://ci.tlcpack.ai/job/tvm/view/change-requests/) through a -build configuration specified in a [`Jenkinsfile`](../Jenkinsfile). +build configuration specified in a [`Jenkinsfile`](/ci/jenkins/templates/). Other jobs run in GitHub Actions for Windows and MacOS jobs. ## `Jenkinsfile` -The template files in this directory are used to generate the [`Jenkinsfile`](../Jenkinsfile) used by Jenkins to run CI jobs for each commit to PRs and branches. +The template files in this directory are used to generate the [`Jenkinsfile`](/ci/jenkins/templates/) used by Jenkins to run CI jobs for each commit to PRs and branches. To regenerate the `Jenkinsfile`, run `make` in the `ci/jenkins` dir. diff --git a/ci/jenkins/README.md b/ci/jenkins/README.md index ff136bdca6f1..e207751a738f 100644 --- a/ci/jenkins/README.md +++ b/ci/jenkins/README.md @@ -39,12 +39,12 @@ https://github.com/apache/tvm/actions has the logs for each of these workflows. TVM uses Jenkins for running Linux continuous integration (CI) tests on [branches](https://ci.tlcpack.ai/job/tvm/) and [pull requests](https://ci.tlcpack.ai/job/tvm/view/change-requests/) through a -build configuration specified in a [`Jenkinsfile`](../../Jenkinsfile). +build configuration specified in a [`Jenkinsfile`](/ci/jenkins/templates/). Other jobs run in GitHub Actions for Windows and MacOS jobs. ## `Jenkinsfile` -The template files in this directory are used to generate the [`Jenkinsfile`](../../Jenkinsfile) used by Jenkins to run CI jobs for each commit to PRs and branches. +The template files in this directory are used to generate the [`Jenkinsfile`](/ci/jenkins/templates/) used by Jenkins to run CI jobs for each commit to PRs and branches. To regenerate the `Jenkinsfile`, run diff --git a/ci/jenkins/templates/utils/base.groovy.j2 b/ci/jenkins/templates/utils/base.groovy.j2 index 68395d05a941..8db44e6eeceb 100644 --- a/ci/jenkins/templates/utils/base.groovy.j2 +++ b/ci/jenkins/templates/utils/base.groovy.j2 @@ -40,7 +40,7 @@ // ============================= IMPORTANT NOTE ============================= // This file is generated by 'jenkins/generate.py'. Do not edit this file directly! -// Make edits to 'jenkins/Jenkinsfile.j2' and regenerate this with +// Make edits to '/ci/jenkins/templates/backend_jenkinsfile.groovy.j2' and regenerate this with // 'python3 jenkins/generate.py' // Note: This timestamp is here to ensure that updates to the Jenkinsfile are // always rebased on main before merging: diff --git a/docs/contribute/ci.rst b/docs/contribute/ci.rst index 428319a99a0a..037b64bac39e 100644 --- a/docs/contribute/ci.rst +++ b/docs/contribute/ci.rst @@ -26,7 +26,7 @@ Using TVM's CI TVM primarily uses Jenkins for running Linux continuous integration (CI) tests on `branches `_ `pull requests `_ through a -build configuration specified in a `Jenkinsfile `_. +build configuration specified in a `Jenkinsfile `_. Jenkins is the only CI step that is codified to block merging. TVM is also tested minimally against Windows and MacOS using GitHub Actions. From 370add4aad220b6ced6c2c8ba5d16806fad5600d Mon Sep 17 00:00:00 2001 From: wang-y-z <57429717+wang-y-z@users.noreply.github.com> Date: Sun, 12 Nov 2023 16:26:17 +0800 Subject: [PATCH 2/2] Update base.groovy.j2 To pass Run Lint: ```docker/bash.sh --env CI --env PLATFORM --env TVM_SHARD_INDEX --env TVM_NUM_SHARDS --env RUN_DISPLAY_URL --env PLATFORM --env SKIP_SLOW_TESTS --env TEST_STEP_NAME tlcpack/ci-lint:20230504-142417-4d37a0a0 ./tests/scripts/task_lint.sh``` --- ci/jenkins/templates/utils/base.groovy.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/jenkins/templates/utils/base.groovy.j2 b/ci/jenkins/templates/utils/base.groovy.j2 index 8db44e6eeceb..68395d05a941 100644 --- a/ci/jenkins/templates/utils/base.groovy.j2 +++ b/ci/jenkins/templates/utils/base.groovy.j2 @@ -40,7 +40,7 @@ // ============================= IMPORTANT NOTE ============================= // This file is generated by 'jenkins/generate.py'. Do not edit this file directly! -// Make edits to '/ci/jenkins/templates/backend_jenkinsfile.groovy.j2' and regenerate this with +// Make edits to 'jenkins/Jenkinsfile.j2' and regenerate this with // 'python3 jenkins/generate.py' // Note: This timestamp is here to ensure that updates to the Jenkinsfile are // always rebased on main before merging: