first draft for apply_patch pipeline
This commit is contained in:
parent
7f59673bb4
commit
d869a15706
1 changed files with 1 additions and 0 deletions
1
Jenkins/BETA-apply-patch/Jenkinsfile
vendored
Normal file
1
Jenkins/BETA-apply-patch/Jenkinsfile
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
// Copyright 2019 Google LLC
//
// Licensed under the the Apache License v2.0 with LLVM Exceptions (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://llvm.org/LICENSE.txt
//
// 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.
def success = true
def failure_message = ""
pipeline {
agent { label 'linux' }
parameters {
string(name: 'DIFF_ID')
string(name: 'PHID')
string(name: 'REV_ID')
}
environment {
CONDUIT_TOKEN = credentials('phabricator-conduit-token')
PHABRICATOR_HOST = 'https://reviews.llvm.org'
LLVM_DIR = "${WORKSPACE}/llvm-project"
SCRIPT_DIR = "${WORKSPACE}/llvm-premerge-checks/scripts"
RESULT_DIR = "${WORKSPACE}/results"
PHAB_LOG = "${RESULT_DIR}/.phabricator-comment"
MY_BUILD_ID = "${JOB_BASE_NAME}-${BUILD_NUMBER}"
}
stages {
stage("build info"){
steps {
echo "Building diff ${DIFF_ID} with PHID ${PHID} for Revision ${REV_ID}"
script {
currentBuild.displayName += " D${REV_ID}"
currentBuild.description = "<a href='https://reviews.llvm.org/D${REV_ID}'>D${REV_ID}</a>"
}
}
}
stage("git checkout"){
steps {
dir("llvm-project"){
git url: 'git@github.com:llvm-premerge-tests/llvm-project.git'
}
dir("llvm-premerge-checks")
{
git url: 'https://github.com/google/llvm-premerge-checks.git'
}
}
}
stage('arc patch'){
steps {
dir(${LLVM_DIR}){
sh """
${SCRIPT_DIR}/phabtalk/apply_patch2.py ${DIFF_ID} \
--token ${CONDUIT_TOKEN} \
--url ${PHABRICATOR_HOST} \
--comment-file ${PHAB_LOG} \
--push-branch
"""
}
}
}
/*
post {
always {
sh """${SCRIPT_DIR}/phabtalk/phabtalk.py "${PHID}" "${DIFF_ID}" \
--workspace "${WORKSPACE}" \
--conduit-token "${CONDUIT_TOKEN}" \
--test-result-file "test-results.xml" \
--host "${PHABRICATOR_HOST}/api/" \
--buildresult ${currentBuild.result} \
--clang-format-patch "clang-format.patch" \
--clang-tidy-result "clang-tidy.txt" \
--clang-tidy-ignore "${SCRIPT_DIR}/clang-tidy-comments.ignore" \
--results-dir "${TARGET_DIR}" \
--results-url "${RESULT_URL}" \
--failures "${failure_message}" \
--name "linux"
"""
}
*/
}
}
|
Loading…
Reference in a new issue