Skip to content

Commit

Permalink
feat(OctopusDeployExtension): add back commitLinkBaseUrl to gitlab()
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Mirwald committed Aug 15, 2024
1 parent 8e4b2ad commit bc57185
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,11 @@ abstract class OctopusDeployExtension(val project: Project) {
*/
abstract val useShortCommitHashes: Property<Boolean>

/**
* Default `buildInformationAddition` implementation adding context from the CI environment for Gitlab CI. Also sets `commitLinkBaseUrl`.
*/
fun gitlab(additional: BuildInformationCli.() -> Unit = {}) {
commitLinkBaseUrl.set("${System.getenv("CI_PROJECT_URL")?.removeSuffix("/")}/commit/")
buildInformationAddition.set({
BuildEnvironment = if (System.getenv("CI") != null) {
"GitLabCI"
Expand Down

0 comments on commit bc57185

Please sign in to comment.