This is an automated email from the ASF dual-hosted git repository.
areusch pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git
The following commit(s) were added to refs/heads/main by this push:
new 8dc6b92 [ci] Manually merge code after checkout (#10778)
8dc6b92 is described below
commit 8dc6b927be9164d30fca354f72352710debef186
Author: driazati <[email protected]>
AuthorDate: Tue Mar 29 16:22:48 2022 -0700
[ci] Manually merge code after checkout (#10778)
* [ci] Manually merge code after checkout
This is step 1 of 2 to fix the issue where Jenkins schedules a PR rebuild
on non-code changes like editing the title. When the title is changed, GitHub
sends an `pull_request` webhook to GitHub. Jenkins would ordinarily look at the
webhook, query the PR and checks if the commit hash for the build has already
been built. However, since we have it set in the Jenkins job to merge with main
before this check occurs, the commit hash is different nearly every time.
Disabling that setting fi [...]
* Use the same commit everywhere to merge
Co-authored-by: driazati <[email protected]>
---
Jenkinsfile | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/Jenkinsfile b/Jenkinsfile
index fdcaa63..0a02f95 100755
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -82,6 +82,7 @@ tvm_multilib = 'build/libtvm.so, ' +
tvm_multilib_tsim = 'build/libvta_tsim.so, ' +
tvm_multilib
+upstream_revision = null
// command to start a docker container
docker_run = 'docker/bash.sh'
@@ -102,6 +103,23 @@ def init_git() {
script: './tests/scripts/task_show_node_info.sh',
label: 'Show executor node info',
)
+
+ // Determine merge commit to use for all stages
+ sh(
+ script: 'git fetch origin main',
+ label: 'Fetch upstream',
+ )
+ if (upstream_revision == null) {
+ upstream_revision = sh(
+ script: 'git log -1 FETCH_HEAD --format=\'%H\'',
+ label: 'Determine upstream revision',
+ returnStdout: true,
+ ).trim()
+ }
+ sh (
+ script: "git merge ${upstream_revision}",
+ label: 'Merge to origin/main'
+ )
retry(5) {
timeout(time: 2, unit: 'MINUTES') {
sh (script: 'git submodule update --init -f', label: 'Update git
submodules')