diff --git a/.tekton/ansible-ee-pipeline.yaml b/.tekton/ansible-ee-pipeline.yaml index 952fe2c..a08a249 100644 --- a/.tekton/ansible-ee-pipeline.yaml +++ b/.tekton/ansible-ee-pipeline.yaml @@ -117,9 +117,9 @@ spec: - name: semantic-release when: - - input: "$(tasks.fetch-repository.results.branch)" + - input: "{{ source_branch }}" operator: in - values: ["HEAD"] + values: ["main"] runAfter: - ee-sanity-test taskRef: @@ -127,6 +127,9 @@ spec: workspaces: - name: source workspace: source + params: + - name: source-branch + value: "{{ source_branch }}" workspaces: - name: source diff --git a/.tekton/tasks/semantic-release.yaml b/.tekton/tasks/semantic-release.yaml index 113fda5..2be06fe 100644 --- a/.tekton/tasks/semantic-release.yaml +++ b/.tekton/tasks/semantic-release.yaml @@ -20,6 +20,9 @@ spec: type: string description: name of the secret holding the github token and npm token default: semantic-release-auth + - name: source-branch + type: string + description: the source-branch that semantic-release will run on workspaces: - name: source steps: @@ -42,14 +45,14 @@ spec: workingDir: $(workspaces.source.path) script: | #!/usr/bin/env sh - echo "npm version: $(npm --version)" echo "npx version: $(npx --version)" - # install all the dependencies for semantic-release npm clean-install - git config --global --add safe.directory $(workspaces.source.path) - + echo "Fetch origin" + git fetch origin + echo "Checkout the $(params.source-branch)" + git checkout $(params.source-branch) # run the semantic-release - npx semantic-release --no-ci + npx semantic-release --no-ci --branches $(params.source-branch) diff --git a/release.config.js b/release.config.js index 5fe9a91..dd02d61 100644 --- a/release.config.js +++ b/release.config.js @@ -12,7 +12,7 @@ module.exports = { ], parserOpts: { noteKeywords: ["BREAKING CHANGE", "BREAKING CHANGES", "BREAKING"], - noteKeywords: ["feat", "feature"] + noteKeywords: ["feat", "feature"], }, }, ], @@ -25,6 +25,12 @@ module.exports = { ], "@semantic-release/git", "@semantic-release/github", - "@codedependant/semantic-release-docker", + // [ + // "@codedependant/semantic-release-docker", { + // dockerContext: "examples/ansible-ee", + // dockerRegistry: "quay.io", + // dockerImage: "custom-ansible-ee", + // } + // ] ], };