-
Notifications
You must be signed in to change notification settings - Fork 0
/
pipeline1
34 lines (33 loc) · 1008 Bytes
/
pipeline1
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
27
28
29
30
31
32
33
34
pipeline {
agent any
stages {
stage('build') {
steps {
echo 'build step'
}
}
stage('test') {
steps {
echo 'test step'
}
}
stage('register') {
steps {
echo 'register step'
script {
stageName = 'Publish artifact to ServiceNow'
def applicationJar = "testing2.jar";
def packageName = "testing2";
snDevOpsArtifact(artifactsPayload: """{"artifacts": [{"name": "${applicationJar}", "version": "2.${env.BUILD_NUMBER}.0","semanticVersion": "1.0.0","repositoryName": "repo2"}], "branchName": "master"}""")
snDevOpsPackage(name: "${packageName}", artifactsPayload: """{"artifacts": [{"name": "${applicationJar}", "version": "2.${env.BUILD_NUMBER}.0","semanticVersion": "1.0.0","repositoryName": "repo2"}], "branchName": "master"}""")
}
}
}
stage('deploy') {
steps {
// snDevOpsChange()
echo 'deploy step'
}
}
}
}