You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ez...@apache.org on 2021/04/12 15:32:10 UTC
[trafficserver-ci] branch main updated: Create autest.pipeline
This is an automated email from the ASF dual-hosted git repository.
eze pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/trafficserver-ci.git
The following commit(s) were added to refs/heads/main by this push:
new 555b8c0 Create autest.pipeline
555b8c0 is described below
commit 555b8c03b54828d41c3799b515569e21d7ca2116
Author: Evan Zelkowitz <ez...@apache.org>
AuthorDate: Mon Apr 12 09:32:04 2021 -0600
Create autest.pipeline
---
jenkins/github/autest.pipeline | 67 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 67 insertions(+)
diff --git a/jenkins/github/autest.pipeline b/jenkins/github/autest.pipeline
new file mode 100644
index 0000000..1462602
--- /dev/null
+++ b/jenkins/github/autest.pipeline
@@ -0,0 +1,67 @@
+pipeline {
+ agent {
+ docker {
+ image 'controller.trafficserver.org/ats/centos:8'
+ registryUrl 'https://controller.trafficserver.org/'
+ args '--init --cap-add=SYS_PTRACE --network=host -u root'
+ label 'docker'
+ }
+ }
+ stages {
+ stage('Clone') {
+ steps {
+ dir('src') {
+ checkout([$class: 'GitSCM',
+ branches: [[name: sha1]],
+ extensions: [],
+ userRemoteConfigs: [[url: github_url, refspec: '+refs/pull/*:refs/remotes/origin/pr/*']]])
+ }
+ echo 'Finished Cloning'
+ }
+ }
+ stage('Build') {
+ steps {
+ echo 'Starting build'
+ dir('src') {
+ sh('source /opt/rh/gcc-toolset-9/enable')
+ sh('update-crypto-policies --set LEGACY')
+ sh('autoreconf -fiv')
+ sh('./configure --enable-experimental-plugins --enable-example-plugins --prefix=/tmp/ats/ --enable-werror --enable-debug --enable-wccp --enable-luajit')
+ sh('make -j4')
+ sh('make install')
+ }
+ }
+ }
+ stage('AuTest') {
+ steps {
+ echo 'Starting AuTest'
+ dir('src/tests') {
+ sh '''
+ set +e
+ mkdir -p ${WORKSPACE}/output/${GITHUB_PR_NUMBER}
+ ./autest.sh --ats-bin /tmp/ats/bin/ --sandbox /tmp/sandbox -f active_timeout runroot_manager || true
+ if [ -n "$(ls -A /tmp/sandbox/)" ]; then
+ cp -rf /tmp/sandbox/ ${WORKSPACE}/output/${GITHUB_PR_NUMBER}/
+ chmod -R 777 ${WORKSPACE}
+ exit 1
+ else
+ touch ${WORKSPACE}/output/${GITHUB_PR_NUMBER}/No_autest_failures
+ chmod -R 777 ${WORKSPACE}
+ exit 0
+ fi
+ '''
+ }
+ }
+ }
+ }
+
+ post {
+ always {
+ sh('ls ${WORKSPACE}/output/${GITHUB_PR_NUMBER}')
+ archiveArtifacts artifacts: 'output/**/*', fingerprint: false, allowEmptyArchive: true
+ }
+ cleanup {
+ cleanWs()
+ }
+ }
+}