diff --git a/Jenkinsfile b/Jenkinsfile deleted file mode 100644 index 9bc1c49c..00000000 --- a/Jenkinsfile +++ /dev/null @@ -1,115 +0,0 @@ -def bmarkFile = 'run_benchmarks.jl' -pipeline { - agent any - environment { - REPO_EXISTS = fileExists "$repo" - } - options { - skipDefaultCheckout true - } - triggers { - GenericTrigger( - genericVariables: [ - [ - key: 'action', - value: '$.action', - expressionType: 'JSONPath', //Optional, defaults to JSONPath - regexpFilter: '[^(created)]', //Optional, defaults to empty string - defaultValue: '' //Optional, defaults to empty string - ], - [ - key: 'comment', - value: '$.comment.body', - expressionType: 'JSONPath', //Optional, defaults to JSONPath - regexpFilter: '', //Optional, defaults to empty string - defaultValue: '' //Optional, defaults to empty string - ], - [ - key: 'org', - value: '$.organization.login', - expressionType: 'JSONPath', //Optional, defaults to JSONPath - regexpFilter: '', //Optional, defaults to empty string - defaultValue: 'JuliaSmoothOptimizers' //Optional, defaults to empty string - ], - [ - key: 'pullrequest', - value: '$.issue.number', - expressionType: 'JSONPath', //Optional, defaults to JSONPath - regexpFilter: '[^0-9]', //Optional, defaults to empty string - defaultValue: '' //Optional, defaults to empty string - ], - [ - key: 'repo', - value: '$.repository.name', - expressionType: 'JSONPath', //Optional, defaults to JSONPath - regexpFilter: '', //Optional, defaults to empty string - defaultValue: '' //Optional, defaults to empty string - ] - ], - - causeString: 'Triggered on $comment', - - token: "ADNLPModels", - - printContributedVariables: true, - printPostContent: true, - - silentResponse: false, - - regexpFilterText: '$comment', - regexpFilterExpression: '@JSOBot runbenchmarks' - ) - } - stages { - stage('clone repo') { - when { - expression { REPO_EXISTS == 'false' } - } - steps { - sh 'git clone https://${GITHUB_AUTH}@github.com/$org/$repo.git' - } - } - stage('checkout on new branch') { - steps { - dir(WORKSPACE + "/$repo") { - sh ''' - git clean -fd - git checkout main - git pull origin main - git fetch origin - git branch -D $BRANCH_NAME || true - git checkout -b $BRANCH_NAME origin/$BRANCH_NAME || true - ''' - } - } - } - stage('run benchmarks') { - steps { - script { - def data = env.comment.tokenize(' ') - if (data.size() > 2) { - bmarkFile = data.get(2); - } - } - dir(WORKSPACE + "/$repo") { - sh "mkdir -p $HOME/benchmarks/${org}/${repo}" - sh "qsub -N ${repo}_${pullrequest} -V -cwd -o $HOME/benchmarks/${org}/${repo}/${pullrequest}_bmark_output.log -e $HOME/benchmarks/${org}/${repo}/${pullrequest}_bmark_error.log push_benchmarks.sh $bmarkFile" - } - } - } - } - post { - success { - echo "SUCCESS!" - } - cleanup { - dir(WORKSPACE + "/$repo") { - sh 'printenv' - sh ''' - git clean -fd - git checkout main - ''' - } - } - } -} diff --git a/push_benchmarks.sh b/push_benchmarks.sh deleted file mode 100644 index fa7ed601..00000000 --- a/push_benchmarks.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -julia benchmark/send_comment_to_pr.jl -o $org -r $repo -p $pullrequest -c '**Starting benchmarks!**' - -git checkout $BRANCH_NAME -- - -if [ "$?" -ne "0" ] ; then - LOCAL_BRANCH_NAME="temp_bmark" - git fetch origin pull/$pullrequest/head:$LOCAL_BRANCH_NAME - git checkout $LOCAL_BRANCH_NAME -- -fi - -julia benchmark/$1 $repo - -if [ "$?" -eq "0" ] ; then - julia benchmark/send_comment_to_pr.jl -o $org -r $repo -p $pullrequest -g -else - julia benchmark/send_comment_to_pr.jl -o $org -r $repo -p $pullrequest -c "**An error has occured while running the benchmark script: $1** " -fi - -git checkout main - -git branch -D $LOCAL_BRANCH_NAME