Skip to content

Instantly share code, notes, and snippets.

@2018kguo
Last active April 22, 2021 16:33
Show Gist options
  • Save 2018kguo/1b45e0cab9ce590219a46ebfd5de0ad6 to your computer and use it in GitHub Desktop.
Save 2018kguo/1b45e0cab9ce590219a46ebfd5de0ad6 to your computer and use it in GitHub Desktop.
Jenkinsfile snippet #1
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