-
Notifications
You must be signed in to change notification settings - Fork 8
ci: add jenkins task for release #121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -5,7 +5,9 @@ pipeline { | |||||||||
| string(name: 'VERSION', defaultValue: '', description: '[Optional] Version. If not filled default is YY.mm.ddHH.') | ||||||||||
| string(name: 'RELEASE', defaultValue: 'nightly', description: '[Optional] Example: nightly (default)') | ||||||||||
| string(name: 'BRANCH', defaultValue: 'main', description: '[Optional] Branch name to clone. Default (main) ') | ||||||||||
| string(name: 'DOCKER_PUBLISH', defaultValue: 'false', description: 'true to publish to ghcr.io') | ||||||||||
| string(name: 'RUN_TEST', defaultValue: 'true', description: 'false to skip test') | ||||||||||
| string(name: 'OVERWRITE_DOCKER_LATEST_TAG', defaultValue: 'false', description: 'true to overwrite latest tag at ghcr.io. Works only if DOCKER_PUBLISH is true') | ||||||||||
| } | ||||||||||
|
|
||||||||||
| environment { | ||||||||||
|
|
@@ -17,6 +19,12 @@ pipeline { | |||||||||
| echo \"${params.RELEASE}\" | ||||||||||
| """).trim() | ||||||||||
| BRANCH = getBranchName(env.CHANGE_BRANCH, params.BRANCH) | ||||||||||
| DOCKER_PUBLISH = sh (returnStdout: true, script: """ | ||||||||||
| echo \"${params.DOCKER_PUBLISH}\" | ||||||||||
| """).trim() | ||||||||||
| OVERWRITE_DOCKER_LATEST_TAG = sh (returnStdout: true, script: """ | ||||||||||
| echo \"${params.OVERWRITE_DOCKER_LATEST_TAG}\" | ||||||||||
| """).trim() | ||||||||||
| targetParentLocation = "/opt/home/nightly/" | ||||||||||
| ontapMcpPath = "ontap-mcp" | ||||||||||
| ghcrOntapMcpImage = "ghcr.io/netapp/ontap-mcp" | ||||||||||
|
|
@@ -122,6 +130,32 @@ pipeline { | |||||||||
| } | ||||||||||
| } | ||||||||||
|
|
||||||||||
| stage('Publish ONTAP MCP Docker Image') { | ||||||||||
| when { | ||||||||||
| expression { | ||||||||||
| return env.DOCKER_PUBLISH == 'true' | ||||||||||
|
||||||||||
| return env.DOCKER_PUBLISH == 'true' | |
| return params.DOCKER_PUBLISH == 'true' && | |
| params.BRANCH == 'main' && | |
| !env.CHANGE_ID |
Uh oh!
There was an error while loading. Please reload this page.