-
Notifications
You must be signed in to change notification settings - Fork 186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove sign and annotate tag from releasing tools #6797
Merged
Desvelao
merged 2 commits into
4.9.0
from
change/6795-remove-sign-annotate-tag-release-tool
Jun 24, 2024
Merged
Remove sign and annotate tag from releasing tools #6797
Desvelao
merged 2 commits into
4.9.0
from
change/6795-remove-sign-annotate-tag-release-tool
Jun 24, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign and annotate the tag created by the tag release tool was moved to be optional through parameters. This lets its usage if were required on the future. The signed/annotated tag causes a problem in the build of Wazuh dashboard thorugh GHA workflow that uses a reusable workflow to build the plugins of this repository. This means, the tags that could be used to build packages of Wazuh dashboard SHOULD NOT be signed or annotated.
|
|
|
Tostti
approved these changes
Jun 24, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test
$ node scripts/release/tag.js --plugins-directory ./plugins --manifest-changelog ./CHANGELOG.md --manifest-package ./plugins/main/package.json --plugin-main-generate-api-data-spec https://raw.githubusercontent.com/wazuh/wazuh/4.9.0/api/api/spec/spec.yaml --version 4.9.0 --revision 03 --platform-version 2.13.0 --tag-suffix -removeUnsigned
[INFO][tag]: Version: 4.9.0
[INFO][tag]: Revision: 03
[INFO][tag]: Platform version: 2.13.0
[INFO][tag]: Tag suffix: -removeUnsigned
[INFO][tag]: Sign tag: no
[INFO][tag]: Annotate tag: no
[INFO][tag]: Tag name: v4.9.0-removeUnsigned
[WARN][tag]: Ensure the base branch is created in the remote and it has updated the files that are not modified by the bump process. See RELEASING.md.
[WARN][tag]: This script will prune the local branches and tags, bump the plugins, commit and push the tags to the remote repository, deleting any unpushed changes. It is required you have configurated the repository to sign the commit and tag creation.
Do you want to continue? [y/N] y
[INFO][tag]: Run command: git checkout 4.9.0
Switched to branch '4.9.0'
[INFO][tag]: Switched to branch: 4.9.0
[INFO][tag]: Run command: git fetch --prune --prune-tags --force
[INFO][tag]: Pruned local branches and tags
[INFO][tag]: Generating tag: v4.9.0-removeUnsigned...
[INFO][bump]: Plugin directories from ./plugins: main, wazuh-check-updates, wazuh-core
[INFO][bump][main]: Version: 4.9.0
[INFO][bump][main]: Revision: 03
[INFO][bump][main]: Platform version: 2.13.0
[INFO][bump][main]: Package manifest: /home/tostti/src/wazuh-dashboard-plugins/plugins/main/package.json
[INFO][bump][main]: Plugin manifest: /home/tostti/src/wazuh-dashboard-plugins/plugins/main/opensearch_dashboards.json
[INFO][bump][main]: This will update the manifest files: package and platform plugin.
[INFO][bump][main]: Updated /home/tostti/src/wazuh-dashboard-plugins/plugins/main/package.json
[INFO][bump][main]: Updated /home/tostti/src/wazuh-dashboard-plugins/plugins/main/opensearch_dashboards.json
[INFO][bump][main]: Calling to specific bump script
[INFO][bump][main][specific]: Run command: cd /home/tostti/src/wazuh-dashboard-plugins/plugins/main && yarn generate:api-data --spec https://raw.githubusercontent.com/wazuh/wazuh/4.9.0/api/api/spec/spec.yaml
{
displayConfiguration: true,
displayExamples: false,
displayHelp: false,
format: 'plugin',
output: 'file',
spec: 'https://raw.githubusercontent.com/wazuh/wazuh/4.9.0/api/api/spec/spec.yaml',
outputDirectory: '/home/tostti/src/wazuh-dashboard-plugins/plugins/main/common/api-info'
}
yarn run v1.22.22
$ node scripts/generate-api-data.js --spec https://raw.githubusercontent.com/wazuh/wazuh/$(node -e "console.log(require('./package.json').version)")/api/api/spec/spec.yaml --output file --output-directory common/api-info --display-configuration --spec https://raw.githubusercontent.com/wazuh/wazuh/4.9.0/api/api/spec/spec.yaml
File was created! Path: /home/tostti/src/wazuh-dashboard-plugins/plugins/main/common/api-info/security-actions.json
File was created! Path: /home/tostti/src/wazuh-dashboard-plugins/plugins/main/common/api-info/endpoints.json
Done in 0.88s.
[INFO][bump][wazuh-check-updates]: Version: 4.9.0
[INFO][bump][wazuh-check-updates]: Revision: 03
[INFO][bump][wazuh-check-updates]: Platform version: 2.13.0
[INFO][bump][wazuh-check-updates]: Package manifest: /home/tostti/src/wazuh-dashboard-plugins/plugins/wazuh-check-updates/package.json
[INFO][bump][wazuh-check-updates]: Plugin manifest: /home/tostti/src/wazuh-dashboard-plugins/plugins/wazuh-check-updates/opensearch_dashboards.json
[INFO][bump][wazuh-check-updates]: This will update the manifest files: package and platform plugin.
[INFO][bump][wazuh-check-updates]: Updated /home/tostti/src/wazuh-dashboard-plugins/plugins/wazuh-check-updates/package.json
[INFO][bump][wazuh-check-updates]: Updated /home/tostti/src/wazuh-dashboard-plugins/plugins/wazuh-check-updates/opensearch_dashboards.json
[INFO][bump][wazuh-core]: Version: 4.9.0
[INFO][bump][wazuh-core]: Revision: 03
[INFO][bump][wazuh-core]: Platform version: 2.13.0
[INFO][bump][wazuh-core]: Package manifest: /home/tostti/src/wazuh-dashboard-plugins/plugins/wazuh-core/package.json
[INFO][bump][wazuh-core]: Plugin manifest: /home/tostti/src/wazuh-dashboard-plugins/plugins/wazuh-core/opensearch_dashboards.json
[INFO][bump][wazuh-core]: This will update the manifest files: package and platform plugin.
[INFO][bump][wazuh-core]: Updated /home/tostti/src/wazuh-dashboard-plugins/plugins/wazuh-core/package.json
[INFO][bump][wazuh-core]: Updated /home/tostti/src/wazuh-dashboard-plugins/plugins/wazuh-core/opensearch_dashboards.json
[INFO][bump]: Updated ./CHANGELOG.md
Review the changes done with the bump. y (continue), d (list changes: git diff), f (list modified files: git diff --name-only), N/n (cancel) y
[INFO][tag]: Run command: git diff --exit-code --no-patch;echo -n $?
[INFO][tag]: There are changes to commit.
[INFO][tag]: Run command: git diff --name-only
CHANGELOG.md
plugins/main/opensearch_dashboards.json
plugins/main/package.json
plugins/wazuh-check-updates/opensearch_dashboards.json
plugins/wazuh-check-updates/package.json
plugins/wazuh-core/opensearch_dashboards.json
plugins/wazuh-core/package.json
[INFO][tag]: Run command: git commit -S -am "Bump v4.9.0-removeUnsigned"
[INFO][tag]: Commited
[INFO][tag]: Run command: git tag v4.9.0-removeUnsigned
[INFO][tag]: Created tag: v4.9.0-removeUnsigned
[INFO][tag]: Run command: git push origin v4.9.0-removeUnsigned
To github.com:wazuh/wazuh-dashboard-plugins.git
* [new tag] v4.9.0-removeUnsigned -> v4.9.0-removeUnsigned
[INFO][tag]: Pushed tag v4.9.0-removeUnsigned to remote
[INFO][tag]: Run command: git reset --hard origin/4.9.0
[INFO][tag]: Undone changes.
[WARN][tag]: A commit was added to the tag, but the branch 4.9.0 was reset to the state of the remote.
❯ git checkout -f change/6795-remove-sign-annotate-tag-release-tool
Switched to branch 'change/6795-remove-sign-annotate-tag-release-tool'
Your branch is up to date with 'origin/change/6795-remove-sign-annotate-tag-release-tool'.
node scripts/release/tag.js --plugins-directory ./plugins --manifest-changelog ./CHANGELOG.md --manifest-package ./plugins/main/package.json --plugin-main-generate-api-data-spec https://raw.githubusercontent.com/wazuh/wazuh/4.9.0/api/api/spec/spec.yaml --version 4.9.0 --revision 03 --platform-version 2.13.0 --tag-suffix -removeSigned --tag-annotate --tag-sign
[INFO][tag]: Version: 4.9.0
[INFO][tag]: Revision: 03
[INFO][tag]: Platform version: 2.13.0
[INFO][tag]: Tag suffix: -removeSigned
[INFO][tag]: Sign tag: yes
[INFO][tag]: Annotate tag: yes
[INFO][tag]: Tag name: v4.9.0-removeSigned
[WARN][tag]: Ensure the base branch is created in the remote and it has updated the files that are not modified by the bump process. See RELEASING.md.
[WARN][tag]: This script will prune the local branches and tags, bump the plugins, commit and push the tags to the remote repository, deleting any unpushed changes. It is required you have configurated the repository to sign the commit and tag creation.
Do you want to continue? [y/N] y
[INFO][tag]: Run command: git checkout 4.9.0
Switched to branch '4.9.0'
[INFO][tag]: Switched to branch: 4.9.0
[INFO][tag]: Run command: git fetch --prune --prune-tags --force
[INFO][tag]: Pruned local branches and tags
[INFO][tag]: Generating tag: v4.9.0-removeSigned...
[INFO][bump]: Plugin directories from ./plugins: main, wazuh-check-updates, wazuh-core
[INFO][bump][main]: Version: 4.9.0
[INFO][bump][main]: Revision: 03
[INFO][bump][main]: Platform version: 2.13.0
[INFO][bump][main]: Package manifest: /home/tostti/src/wazuh-dashboard-plugins/plugins/main/package.json
[INFO][bump][main]: Plugin manifest: /home/tostti/src/wazuh-dashboard-plugins/plugins/main/opensearch_dashboards.json
[INFO][bump][main]: This will update the manifest files: package and platform plugin.
[INFO][bump][main]: Updated /home/tostti/src/wazuh-dashboard-plugins/plugins/main/package.json
[INFO][bump][main]: Updated /home/tostti/src/wazuh-dashboard-plugins/plugins/main/opensearch_dashboards.json
[INFO][bump][main]: Calling to specific bump script
[INFO][bump][main][specific]: Run command: cd /home/tostti/src/wazuh-dashboard-plugins/plugins/main && yarn generate:api-data --spec https://raw.githubusercontent.com/wazuh/wazuh/4.9.0/api/api/spec/spec.yaml
{
displayConfiguration: true,
displayExamples: false,
displayHelp: false,
format: 'plugin',
output: 'file',
spec: 'https://raw.githubusercontent.com/wazuh/wazuh/4.9.0/api/api/spec/spec.yaml',
outputDirectory: '/home/tostti/src/wazuh-dashboard-plugins/plugins/main/common/api-info'
}
yarn run v1.22.22
$ node scripts/generate-api-data.js --spec https://raw.githubusercontent.com/wazuh/wazuh/$(node -e "console.log(require('./package.json').version)")/api/api/spec/spec.yaml --output file --output-directory common/api-info --display-configuration --spec https://raw.githubusercontent.com/wazuh/wazuh/4.9.0/api/api/spec/spec.yaml
File was created! Path: /home/tostti/src/wazuh-dashboard-plugins/plugins/main/common/api-info/security-actions.json
File was created! Path: /home/tostti/src/wazuh-dashboard-plugins/plugins/main/common/api-info/endpoints.json
Done in 0.91s.
[INFO][bump][wazuh-check-updates]: Version: 4.9.0
[INFO][bump][wazuh-check-updates]: Revision: 03
[INFO][bump][wazuh-check-updates]: Platform version: 2.13.0
[INFO][bump][wazuh-check-updates]: Package manifest: /home/tostti/src/wazuh-dashboard-plugins/plugins/wazuh-check-updates/package.json
[INFO][bump][wazuh-check-updates]: Plugin manifest: /home/tostti/src/wazuh-dashboard-plugins/plugins/wazuh-check-updates/opensearch_dashboards.json
[INFO][bump][wazuh-check-updates]: This will update the manifest files: package and platform plugin.
[INFO][bump][wazuh-check-updates]: Updated /home/tostti/src/wazuh-dashboard-plugins/plugins/wazuh-check-updates/package.json
[INFO][bump][wazuh-check-updates]: Updated /home/tostti/src/wazuh-dashboard-plugins/plugins/wazuh-check-updates/opensearch_dashboards.json
[INFO][bump][wazuh-core]: Version: 4.9.0
[INFO][bump][wazuh-core]: Revision: 03
[INFO][bump][wazuh-core]: Platform version: 2.13.0
[INFO][bump][wazuh-core]: Package manifest: /home/tostti/src/wazuh-dashboard-plugins/plugins/wazuh-core/package.json
[INFO][bump][wazuh-core]: Plugin manifest: /home/tostti/src/wazuh-dashboard-plugins/plugins/wazuh-core/opensearch_dashboards.json
[INFO][bump][wazuh-core]: This will update the manifest files: package and platform plugin.
[INFO][bump][wazuh-core]: Updated /home/tostti/src/wazuh-dashboard-plugins/plugins/wazuh-core/package.json
[INFO][bump][wazuh-core]: Updated /home/tostti/src/wazuh-dashboard-plugins/plugins/wazuh-core/opensearch_dashboards.json
[INFO][bump]: Updated ./CHANGELOG.md
Review the changes done with the bump. y (continue), d (list changes: git diff), f (list modified files: git diff --name-only), N/n (cancel) y
[INFO][tag]: Run command: git diff --exit-code --no-patch;echo -n $?
[INFO][tag]: There are changes to commit.
[INFO][tag]: Run command: git diff --name-only
CHANGELOG.md
plugins/main/opensearch_dashboards.json
plugins/main/package.json
plugins/wazuh-check-updates/opensearch_dashboards.json
plugins/wazuh-check-updates/package.json
plugins/wazuh-core/opensearch_dashboards.json
plugins/wazuh-core/package.json
[INFO][tag]: Run command: git commit -S -am "Bump v4.9.0-removeSigned"
[INFO][tag]: Commited
[INFO][tag]: Run command: git tag -s -m "Wazuh plugins for Wazuh dashboard v4.9.0-removeSigned" -a v4.9.0-removeSigned
[INFO][tag]: Created tag: v4.9.0-removeSigned
[INFO][tag]: Run command: git push origin v4.9.0-removeSigned
To github.com:wazuh/wazuh-dashboard-plugins.git
* [new tag] v4.9.0-removeSigned -> v4.9.0-removeSigned
[INFO][tag]: Pushed tag v4.9.0-removeSigned to remote
[INFO][tag]: Run command: git reset --hard origin/4.9.0
[INFO][tag]: Undone changes.
[WARN][tag]: A commit was added to the tag, but the branch 4.9.0 was reset to the state of the remote.
CR ✅
TEST ✅
LGTM
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This pull request move the sign and annotation of tag created by the releasing tool to optional.
This causes the default tag is not signed or annotated to solve a problem with incompatibility of signed or annotated tags with the building process of Wazuh dashboard using a reusable workflow of plugins repository.
Issues Resolved
#6795
Evidence
Test
Legend:
⚫: none
🟢: pass
🟡: warning
🔴: fail
⚪: not applicable
Other
Details
⚫ Create a tag without signing or annotating through the tag releasing tool
Check List
yarn test:jest