File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,8 @@ pipeline {
1717 // variables for SystemTest stages (integration tests)
1818 STAGING_DIR = " /scratch/artifacts/imagetool"
1919 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'
2022 }
2123
2224 stages {
@@ -92,7 +94,6 @@ pipeline {
9294 when {
9395 anyOf {
9496 triggeredBy ' TimerTrigger'
95- tag ' release-*'
9697 changelog ' \\ [full-mats\\ ].*'
9798 }
9899 }
@@ -118,7 +119,7 @@ pipeline {
118119 }
119120 }
120121 }
121- stage (' Save Nightly Installer' ){
122+ stage (' Save Nightly Installer' ) {
122123 when {
123124 allOf {
124125 triggeredBy ' TimerTrigger'
@@ -131,6 +132,18 @@ pipeline {
131132 '''
132133 }
133134 }
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+ }
134147 }
135148}
136149
You can’t perform that action at this time.
0 commit comments