Skip to content

Commit 8f4b2cb

Browse files
azharuddAzharuddin Mohammed
andauthored
[clang-3.4-debuginfo-statistics] Fix the LNT submissions run order (#291)
The run order should be the GIT_DISTANCE of the stage 1 compiler which is being used to build the historic compiler. Co-authored-by: Azharuddin Mohammed <[email protected]>
1 parent 693397c commit 8f4b2cb

File tree

1 file changed

+17
-22
lines changed

1 file changed

+17
-22
lines changed

zorg/jenkins/jobs/jobs/clang-3.4-debuginfo-statistics

Lines changed: 17 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pipeline {
1111

1212
string(name: 'GIT_SHA', defaultValue: params.GIT_REVISION ?: '*/release/13.x', description: 'Git commit to build.')
1313

14-
string(name: 'ARTIFACT', defaultValue: params.ARTIFACT ?: 'clang-stage1-RA/latest', description: 'Clang artifact to use')
14+
string(name: 'STAGE_1_JOB_NAME', defaultValue: params.STAGE_1_JOB_NAME ?: 'clang-stage1-RA', description: 'Stage 1 job name to download the artifact from.')
1515

1616
string(name: 'BUILD_TYPE', defaultValue: params.BUILD_TYPE ?: 'Release', description: 'Default CMake build type; one of: Release, Debug, ...')
1717

@@ -68,6 +68,19 @@ pipeline {
6868
'''
6969
}
7070
}
71+
stage('Download Properties File') {
72+
environment {
73+
PATH="$PATH:/usr/bin:/usr/local/bin"
74+
}
75+
steps {
76+
withCredentials([string(credentialsId: 's3_resource_bucket', variable: 'S3_BUCKET')]) {
77+
sh """
78+
source ./venv/bin/activate
79+
aws s3 cp "{S3_BUCKET}/clangci/${params.STAGE_1_JOB_NAME}/last_good_build.properties" "."
80+
"""
81+
}
82+
}
83+
}
7184
stage('Fetch Artifact') {
7285
environment {
7386
PATH="$PATH:/usr/bin:/usr/local/bin"
@@ -76,7 +89,7 @@ pipeline {
7689
withCredentials([string(credentialsId: 's3_resource_bucket', variable: 'S3_BUCKET')]) {
7790
sh """
7891
source ./venv/bin/activate
79-
echo "ARTIFACT=${params.ARTIFACT}"
92+
export $(grep ARTIFACT last_good_build.properties)
8093
python llvm-zorg/zorg/jenkins/monorepo_build.py fetch
8194
ls $WORKSPACE/host-compiler/lib/clang/
8295
VERSION=`ls $WORKSPACE/host-compiler/lib/clang/`
@@ -102,21 +115,9 @@ pipeline {
102115
sh '''
103116
source ./venv/bin/activate
104117
105-
cd src/clang-13
106-
git tag -a -m "First Commit" first_commit 97724f18c79c7cc81ced24239eb5e883bf1398ef || true
107-
108-
git_desc=$(git describe --match "first_commit")
109-
export GIT_DISTANCE=$(echo ${git_desc} | cut -f 2 -d "-")
110-
111-
sha=$(echo ${git_desc} | cut -f 3 -d "-")
112-
export GIT_SHA=${sha:1}
113-
114-
cd -
115-
116118
set -eux
117119
118120
$CXX --version
119-
LLVM_REV=${GIT_DISTANCE}
120121
121122
mkdir -p $HISTORIC_COMPILER-src
122123
mkdir -p $HISTORIC_COMPILER-build
@@ -166,17 +167,11 @@ pipeline {
166167
sh '''
167168
source ./venv/bin/activate
168169
169-
cd src/clang-13
170-
git tag -a -m "First Commit" first_commit 97724f18c79c7cc81ced24239eb5e883bf1398ef || true
171-
172-
git_desc=$(git describe --match "first_commit")
173-
export GIT_DISTANCE=$(echo ${git_desc} | cut -f 2 -d "-")
174-
175-
cd -
170+
export GIT_DISTANCE=$(grep GIT_DISTANCE last_good_build.properties)
176171
177172
python llvm-zorg/zorg/jenkins/jobs/util/submit-debuginfo-statistics-to-lnt.py
178173
'''
179174
}
180175
}
181176
}
182-
}
177+
}

0 commit comments

Comments
 (0)