-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: update branch name from 'staging' to 'demo' and 'atj' to 'forms…
…' (TCKT-000) (#444) * feat: update branch names from 'staging' to 'demo' and 'atj' to 'forms' (TCKT-000) * STAGING -> DEMO * Add management command to bulk set secrets (used to rename the deployment prefixes) --------- Co-authored-by: Khayal Alasgarov <[email protected]> Co-authored-by: Daniel Naab <[email protected]>
- Loading branch information
1 parent
8150660
commit b24ea3a
Showing
21 changed files
with
107 additions
and
46 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
name: Create PR from main to staging | ||
name: Create PR from main to demo | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
create-pr-to-staging: | ||
create-pr-to-demo: | ||
uses: ./.github/workflows/_pr-create.yml | ||
secrets: inherit | ||
with: | ||
base: staging | ||
base: demo |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ on: | |
push: | ||
branches: | ||
- main | ||
- staging | ||
- demo | ||
workflow_dispatch: | ||
|
||
jobs: | ||
|
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
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
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
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { describe, expect, it } from 'vitest'; | ||
|
||
import { setSecrets } from './set-secrets.js'; | ||
import { createInMemorySecretsVault } from '../lib/index.js'; | ||
|
||
const getTestVault = (vaultData: any) => { | ||
const result = createInMemorySecretsVault(JSON.stringify(vaultData)); | ||
if (result.success) { | ||
return result.data; | ||
} else { | ||
throw new Error('Error creating in-memory test vault'); | ||
} | ||
}; | ||
|
||
describe('set-secret command', () => { | ||
it('sets secret values', async () => { | ||
const vault = getTestVault({ | ||
'secret-key-1': 'value-1', | ||
}); | ||
await setSecrets(vault, { | ||
'secret-key-1': 'secret-value1-updated', | ||
'secret-key-2': 'secret-value2-updated', | ||
}); | ||
expect(await vault.getSecrets(await vault.getSecretKeys())).toEqual({ | ||
'secret-key-1': 'secret-value1-updated', | ||
'secret-key-2': 'secret-value2-updated', | ||
}); | ||
}); | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { type SecretsVault } from '../lib/types.js'; | ||
|
||
/** | ||
* Sets a secret in a specified secrets vault. | ||
*/ | ||
export const setSecrets = async ( | ||
vault: SecretsVault, | ||
secrets: Record<string, string> | ||
) => { | ||
for (const key in secrets) { | ||
await vault.setSecret(key, secrets[key]); | ||
} | ||
}; |
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
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
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
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
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
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