File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,13 @@ pipeline {
11
11
stage(' Init' ) {
12
12
steps {
13
13
checkout scm
14
+ script {
15
+ def m = (env. GIT_URL =~ / (\/ |:)(([^\/ ]+)\/ )?(([^\/ ]+?)(\. git)?)$/ )
16
+ if (m) {
17
+ org = m. group(3 )
18
+ repo = m. group(5 )
19
+ }
20
+ }
14
21
}
15
22
}
16
23
stage(' Setup build' ) {
@@ -45,9 +52,9 @@ pipeline {
45
52
when { buildingTag(); not { changeRequest() } }
46
53
steps {
47
54
withCredentials([usernamePassword(credentialsId : ' brandonarp-github-token' , usernameVariable : ' GITHUB_USERNAME' , passwordVariable : ' GITHUB_TOKEN' )]) {
48
- sh " github-release release --user ArpNetworking --repo metrics-aggregator-daemon --tag ${ TAG_NAME} "
49
- sh " github-release upload --user ArpNetworking --repo metrics-aggregator-daemon --tag ${ TAG_NAME} --name ${ TAG_NAME} .tgz --file target/metrics-aggregator-daemon*.tgz"
50
- sh " github-release upload --user ArpNetworking --repo metrics-aggregator-daemon --tag ${ TAG_NAME} --name ${ TAG_NAME} .rpm --file target/rpm/metrics-aggregator-daemon/RPMS/noarch/metrics-aggregator-daemon-*.rpm"
55
+ sh " github-release release --user ${ org } --repo ${ repo } --tag ${ TAG_NAME} "
56
+ sh " github-release upload --user ${ org } --repo ${ repo } --tag ${ TAG_NAME} --name ${ TAG_NAME} .tgz --file target/metrics-aggregator-daemon*.tgz"
57
+ sh " github-release upload --user ${ org } --repo ${ repo } --tag ${ TAG_NAME} --name ${ TAG_NAME} .rpm --file target/rpm/metrics-aggregator-daemon/RPMS/noarch/metrics-aggregator-daemon-*.rpm"
51
58
}
52
59
}
53
60
}
You can’t perform that action at this time.
0 commit comments