-
Notifications
You must be signed in to change notification settings - Fork 39
Enable windows support #105
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
Closed
Closed
Conversation
This file contains hidden or 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
38c0664 to
8172824
Compare
As ncc uses commonjs bundle type and we import `install-cli-action` which is also commonjs, we should not set `type: module` in the package.json so it doesn't break the load-secrets-action bundle. Therefore, we can safely remove it at all. Revert package.json
d9322b4 to
6b6b0dc
Compare
76c4552 to
b47da94
Compare
b47da94 to
9de1130
Compare
b156b4f to
552bcb3
Compare
552bcb3 to
44eaa0c
Compare
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.
This PR brings Windows runners support.
(!!!Currently pipeline fails as Service Account reaches the rate limit as of extensive testing of the updated pipeline)
Closes: TODO
Thoughts process
Changes to use
"@1password/install-cli-action"Currently this action is uses bash script to install 1Password CLI. It works on Lunix and MacOS runners, but to support Windows, we need to write separate script for Windows.
As this is brings additional complexity, decided to use latest 1Password's install-cli-action which already supports Windows runners and is written in Typescript. With that,
"@1password/install-cli-action"is added as dependency inpackage.json.To avoid the need to publish and maintain another NPM package for 1Password team,
"@1password/install-cli-action"is installed directly from github repo and not from NPM. (Currently it points to a feature branch, but will point to the specific version v2.0.1 as soon as it's merged and published)To be able successfully import
"@1password/install-cli-action"and use in the core, the type of the package is changed frommoduletocommonjsinpackage.json. This is required in order to make a bundle (npm run build) that works on runners.Also, you can find that
config/jest.config.jsexport was changed tomodule.exports, this is because now the package type iscommonjs.Possibility to provide cli version via
versioninput paramAs a benefit of using
"@1password/install-cli-action"package, now users will be able to passversioninput param to install specific 1Password CLI version. It defaults tolateststable if not provided.Make testing pipeline work on Windows runners
To make testing pipeline work on Windows runners the
configureaction was re-written in JS instead of bash. And therefore you can find additionalnpm run build:configurecommand inpackage.json, which makes bundle forconfigureaction.Update test pipelines to test on different CLI versions
Test pipeline were updated to be able to test on different CLI versions.
Also additional step was added to make sure that
configureaction properly sets env vars (OP_HOST/TOKEN and OP_SERVICE_ACCOUNT_TOKEN).And another one step, to verify that installed CLI version matches the one provided as input param.