generated from cloudbees-days/pipeline-template-catalog
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Jenkinsfile
26 lines (26 loc) · 860 Bytes
/
Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
@Library('pipeline-library@master') _
pipeline {
agent none
options {
timeout(time: 10, unit: 'MINUTES')
buildDiscarder(logRotator(numToKeepStr: '2'))
}
stages {
stage("Import Catalog") {
agent { label 'default-jnlp' }
when {
branch 'master'
}
steps {
withCredentials([usernamePassword(credentialsId: 'admin-cli-token', usernameVariable: 'JENKINS_CLI_USR', passwordVariable: 'JENKINS_CLI_PSW')]) {
sh """
curl -O http://teams-cje-ci/teams-cje-ci/jnlpJars/jenkins-cli.jar
alias cli='java -jar jenkins-cli.jar -s http://teams-cje-ci/teams-cje-ci/ -auth $JENKINS_CLI_USR:$JENKINS_CLI_PSW'
cli pipeline-template-catalogs --put < create-pipeline-template-catalog.json
"""
pipelineCatalogLabCleanup('cje-ci')
}
}
}
}
}