semantic-release-info job does not install required plugins
Describe the bug
I am using to-be-continuous/semantic-release template to calculate the next release version. I have SEMREL_RELEASE_DISABLED set to true as my release is done by different mechanism.
For my repository I would like to enforce conventionalcommits style of commits instead of angular commit conventions which is default preset for commit-analyzer plugin. It is simple to change this config as I can provide my own .releaserc.yaml with following
analyzeCommits:
- path: "@semantic-release/commit-analyzer"
preset: 'conventionalcommits'
However the preset must be installed;
npm install conventional-changelog-conventionalcommits -D
This template readme documents using SEMREL_REQUIRED_PLUGINS_FILE for such cases. I created file semrel-required-plugins.txt
and added the required plugin in it. However this is not working and I get following error;
[12:28:18 PM] [semantic-release] › ✘ Failed step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
[12:28:18 PM] [semantic-release] › ✘ An error occurred while running semantic-release: Error: Cannot find module 'conventional-changelog-conventionalcommits'
I have checked the template and the job semantic-release-info
it does not install the required plugins. The function install_semantic_release_plugins
is only called from semantic-release
job.
Expected behavior
I would expect the both semantic-release-info
and semantic-release
jobs to install the required plugins otherwise using my own .releaserc.yaml with such setup is not possible. It might actually make sense to call install_semantic_release_plugins from .semrel-base
before_script
Actual behavior
Required plugin not installed during semantic-release-info
job.
Logs and/or screenshots
$ install_ca_certs "${CUSTOM_CA_CERTS:-$DEFAULT_CA_CERTS}"
$ cd "${SEMREL_CONFIG_DIR}"
$ install_yq "yq_linux_amd64" "v4.21.1"
$ prepare_semantic_release
[INFO] .releaserc.yaml file found
$ dotenv_semrel_info
added 356 packages in 12s
92 packages are looking for funding
run `npm fund` for details
[12:28:15 PM] [semantic-release] › ℹ Running semantic-release version 21.0.7
[12:28:15 PM] [semantic-release] › ✔ Loaded plugin "verifyConditions" from "@semantic-release/exec"
[12:28:15 PM] [semantic-release] › ✔ Loaded plugin "analyzeCommits" from "@semantic-release/commit-analyzer"
[12:28:15 PM] [semantic-release] › ✔ Loaded plugin "verifyRelease" from "@semantic-release/exec"
[12:28:15 PM] [semantic-release] › ✔ Loaded plugin "generateNotes" from "@semantic-release/exec"
[12:28:15 PM] [semantic-release] › ✔ Loaded plugin "prepare" from "@semantic-release/exec"
[12:28:15 PM] [semantic-release] › ✔ Loaded plugin "publish" from "@semantic-release/exec"
[12:28:15 PM] [semantic-release] › ✔ Loaded plugin "addChannel" from "@semantic-release/exec"
[12:28:15 PM] [semantic-release] › ✔ Loaded plugin "success" from "@semantic-release/exec"
[12:28:15 PM] [semantic-release] › ✔ Loaded plugin "fail" from "@semantic-release/exec"
[12:28:18 PM] [semantic-release] › ⚠ Run automated release from branch master on repository XYZ in dry-run mode
[12:28:18 PM] [semantic-release] › ✔ Allowed to push to the Git repository
[12:28:18 PM] [semantic-release] › ℹ Start step "verifyConditions" of plugin "@semantic-release/exec"
[12:28:18 PM] [semantic-release] › ✔ Completed step "verifyConditions" of plugin "@semantic-release/exec"
[12:28:18 PM] [semantic-release] › ℹ Found git tag 0.3.2 associated with version 0.3.2 on branch master
[12:28:18 PM] [semantic-release] › ℹ Found 8 commits since last release
[12:28:18 PM] [semantic-release] › ℹ Start step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
[12:28:18 PM] [semantic-release] › ✘ Failed step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
[12:28:18 PM] [semantic-release] › ✘ An error occurred while running semantic-release: Error: Cannot find module 'conventional-changelog-conventionalcommits'
Context & Configuration
Link to a project, pipeline or job facing the bug: (please provide one if possible)
The issue was reproduced using:
- Version of the template: 3.4
- GitLab server(s): gitlab.com
- GitLab runner(s): 16.1.0~beta.59.g83c66823 (83c66823)