diff --git a/first-class-pipeline/src/com/freeleaps/devops/ArgoApplicationVersionUpdater.groovy b/first-class-pipeline/src/com/freeleaps/devops/ArgoApplicationVersionUpdater.groovy index 5b97de77..c6eb0e70 100644 --- a/first-class-pipeline/src/com/freeleaps/devops/ArgoApplicationVersionUpdater.groovy +++ b/first-class-pipeline/src/com/freeleaps/devops/ArgoApplicationVersionUpdater.groovy @@ -46,6 +46,8 @@ class ArgoApplicationVersionUpdater { // echo "Done." // """ steps.sh """ + #!/bin/bash + echo "Set ${workspace} as a safe directory..." git config --global --add safe.directory ${workspace} diff --git a/first-class-pipeline/src/com/freeleaps/devops/CommitMessageLinter.groovy b/first-class-pipeline/src/com/freeleaps/devops/CommitMessageLinter.groovy index 899e794d..5222a56b 100644 --- a/first-class-pipeline/src/com/freeleaps/devops/CommitMessageLinter.groovy +++ b/first-class-pipeline/src/com/freeleaps/devops/CommitMessageLinter.groovy @@ -30,7 +30,11 @@ class CommitMessageLinter { steps.dir(steps.env.workroot) { // commit lint cli requires a git repository to lint commit messages, so we need make sure the workspace is a trusted git repository steps.sh "git config --global --add safe.directory ${steps.env.workroot}" - steps.sh "commitlint --verbose -g ${rules} -f HEAD^" + steps.sh """ + #!/bin/bash + + commitlint --verbose -g ${rules} -f HEAD^ + """ } } } \ No newline at end of file diff --git a/first-class-pipeline/src/com/freeleaps/devops/SemanticReleasingExecutor.groovy b/first-class-pipeline/src/com/freeleaps/devops/SemanticReleasingExecutor.groovy index a992d92f..9bdff998 100644 --- a/first-class-pipeline/src/com/freeleaps/devops/SemanticReleasingExecutor.groovy +++ b/first-class-pipeline/src/com/freeleaps/devops/SemanticReleasingExecutor.groovy @@ -26,15 +26,17 @@ class SemanticReleasingExecutor { steps.dir(steps.env.workroot) { steps.withCredentials([steps.usernamePassword(credentialsId: credentialsId, passwordVariable: 'GIT_PASSWORD', usernameVariable: 'GIT_USERNAME')]) { steps.env.GIT_CREDENTIALS = "${steps.env.GIT_USERNAME}:${steps.env.GIT_PASSWORD}" - steps.log.info("SemanticReleasingExecutor", "Installing semantic-release requirements...") + // steps.log.info("SemanticReleasingExecutor", "Installing semantic-release requirements...") // steps.sh "apt-get -y update && apt-get install -y --no-install-recommends git apt-transport-https ca-certificates curl wget gnupg" steps.writeFile file: '.releaserc.json', text: steps.libraryResource(config) - steps.log.info("SemanticReleasingExecutor", "Installing semantic-release plugins...") + // steps.log.info("SemanticReleasingExecutor", "Installing semantic-release plugins...") // steps.sh "npm install -g ${plugins.join(' ')}" steps.sh "git config --global --add safe.directory ${steps.env.workroot}" steps.env.GIT_LOCAL_BRANCH = "${branch}" - steps.sh "whoami && whereis semantic-release" - steps.sh "semantic-release --debug" + steps.sh """ + #!/bin/bash + semantic-release + """ steps.log.info("SemanticReleasingExecutor", "Semantic release completed, read latest version from VERSION file") def released = steps.sh(script: 'test -f "VERSION"', returnStatus: true) == 0 if (released) {