id | title | hide_title | sidebar_label | description | keywords | url | site_name | slug | ||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
tas-configurations-managing-secrets |
Managing Secrets |
true |
Managing Secrets |
Managing secrets in TAS. |
|
LambdaTest |
tas-configurations-managing-secrets/ |
You can add environment variables in TAS to securely use sensitive information such as username, passwords, api keys etc. We securely encrypt and store the secrets on our end. The secrets have scope limited to the repository.
- While configuring .tas.yml
- Click on the
Manage secrets
option located at the bottom - You can add secrets in this section and use them while configuring the
.tas.yml
(steps mentioned below.)
- Open a the repository and navigate to the Settings section.
- Select Environment Variables from the sidebar.
- Add Secret Name, Secret Value and click on Add Secret.
- In case of TAS Self Hosted mode, you need to define your secrets in the .synapse.json file. See more details
- You can use the secrets added in TAS portal inside your
.tas.yml
using${secret_name}
parameter - The following sample file demonstates how we can refer secrets inside
.tas.yml
.
framework: mocha
blocklist:
- "src/test/api1.js##this is a test-suite"
preRun:
command:
- npm ci
postMerge:
env:
REPONAME: nexe
AWS_KEY: ${{ secrets.AWS_KEY }} #Using secrets inside Yml <--------
pattern:
- "./test/**/*.spec.ts"
preMerge:
pattern:
- "./test/**/*.spec.ts"
postRun:
command:
- node --version
version: 1.0