Last active
April 22, 2021 16:33
-
-
Save 2018kguo/1b45e0cab9ce590219a46ebfd5de0ad6 to your computer and use it in GitHub Desktop.
Jenkinsfile snippet #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
environment { | |
OCTOPUS_ID = "" | |
DOCKER_REGISTRY = "" | |
VERSION = "$BUILD_TIMESTAMP" | |
DEPLOY = "" | |
} | |
stages { | |
... | |
stage ("Create/Deploy Release") { | |
steps { | |
withCredentials([string(credentialsId: "OctopusApiKey", variable: "OCTOPUS_CLI_API_KEY")]) { | |
sh """ | |
dotnet octo create-release --project "$OCTOPUS_ID" \ | |
$DEPLOY --packageVersion $VERSION | |
""" | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment