File tree 1 file changed +15
-2
lines changed
1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,8 @@ pipeline {
17
17
// variables for SystemTest stages (integration tests)
18
18
STAGING_DIR = " /scratch/artifacts/imagetool"
19
19
DB_IMAGE = " phx.ocir.io/weblogick8s/database/enterprise:12.2.0.1-slim"
20
+ GITHUB_API_TOKEN = credentials(' encj_github_token' )
21
+ GH_TOOL = tool name : ' github-cli' , type : ' com.cloudbees.jenkins.plugins.customtools.CustomTool'
20
22
}
21
23
22
24
stages {
@@ -92,7 +94,6 @@ pipeline {
92
94
when {
93
95
anyOf {
94
96
triggeredBy ' TimerTrigger'
95
- tag ' release-*'
96
97
changelog ' \\ [full-mats\\ ].*'
97
98
}
98
99
}
@@ -118,7 +119,7 @@ pipeline {
118
119
}
119
120
}
120
121
}
121
- stage (' Save Nightly Installer' ){
122
+ stage (' Save Nightly Installer' ) {
122
123
when {
123
124
allOf {
124
125
triggeredBy ' TimerTrigger'
@@ -131,6 +132,18 @@ pipeline {
131
132
'''
132
133
}
133
134
}
135
+ stage (' Create Draft Release' ) {
136
+ when {
137
+ tag ' release-*'
138
+ }
139
+ steps {
140
+ sh """
141
+ echo '${ env.GITHUB_API_TOKEN} ' | ${ GH_TOOL} /bin/gh auth login --with-token
142
+ ${ GH_TOOL} /bin/gh release create ${ TAG_NAME} --draft --generate-notes --repo https://github.com/oracle/weblogic-image-tool
143
+ ${ GH_TOOL} /bin/gh release upload ${ TAG_NAME} installer/target/imagetool.zip --repo https://github.com/oracle/weblogic-image-tool
144
+ """
145
+ }
146
+ }
134
147
}
135
148
}
136
149
You can’t perform that action at this time.
0 commit comments