-
Notifications
You must be signed in to change notification settings - Fork 15
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
ci(frontend): workflow to auto-deploy frontend in staging [GIX-3078] #2700
base: main
Are you sure you want to change the base?
ci(frontend): workflow to auto-deploy frontend in staging [GIX-3078] #2700
Conversation
@inc-man will take over this PR Have a look at @lmuntaner 's suggestion: they are doing something similar here: |
adjusted deploy command, styling.
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.
Looks good to me, thanks!
key_pem=$(mktemp) | ||
printenv "DFX_DEPLOY_STAGING_KEY" > "$key_pem" | ||
dfx identity import --disable-encryption --force default "$key_pem" |
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.
key_pem=$(mktemp) | |
printenv "DFX_DEPLOY_STAGING_KEY" > "$key_pem" | |
dfx identity import --disable-encryption --force default "$key_pem" | |
dfx identity import --storage-mode=plaintext --force default <(printenv DFX_DEPLOY_STAGING_KEY) |
--disable-encryption
has been deprecated and replaced with--storage-mode=plaintext
- If you like (not obligatory) you can use a herefile as shown. Normally when dealing with key material one avoids letting it touch disk, but in this case the key material is landing in plaintext on disk anyway so it's a moot point.
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.
I see that Internet Identity still uses --disable-encryption
. We should do a scan of all our repositories and update them all. I'll add a Jira ticket to do that.
- name: Deploy to Staging | ||
env: | ||
ENV: staging | ||
run: dfx deploy frontend --network staging |
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.
I think we probably want to deploy the backend as well, however we can do that in another PR. That could be in this or another workflow. Here is an example of a workflow that deploys another project with 2 canisters to a test environment. It has a checklist for which canisters to deploy:
workflow_dispatch:
inputs:
mode:
type: choice
description: "The dfx canister install mode. See `dfx canister install --help` for details."
options:
- upgrade
- reinstall
- install
- auto
canisters:
type: choice
description: Which canisters to install
options:
- all
- nns-dapp
- sns_aggregator
push: | ||
branches: | ||
- main | ||
workflow_dispatch: |
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.
For workflow dispatch it would be nice to be able to choose the target network, so that this can also be used to deploy to the mainnet test canisters test_fe_1..4 But this can be done in another PR.
Motivation
As discussed off-line, we aim to make Staging env up-to-date with the latest main commit, in order to make it a "real" staging env.
Changes