ci: add Alchemy and Infura credentials in CI

Depends on: https://github.com/status-im/status-jenkins-lib/pull/64

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2023-05-09 17:45:09 +02:00
parent 5655efa448
commit 78131c1028
No known key found for this signature in database
GPG Key ID: FE65CD384D5BF7B4
12 changed files with 26 additions and 13 deletions

View File

@ -1,4 +1,4 @@
library 'status-jenkins-lib@v1.7.2'
library 'status-jenkins-lib@v1.7.3'
/* Options section can't access functions in objects. */
def isPRBuild = utils.isPRBuild()

View File

@ -1,4 +1,4 @@
library 'status-jenkins-lib@v1.7.2'
library 'status-jenkins-lib@v1.7.3'
pipeline {
agent { label 'linux' }

View File

@ -1,4 +1,4 @@
library 'status-jenkins-lib@v1.7.2'
library 'status-jenkins-lib@v1.7.3'
/* Options section can't access functions in objects. */
def isPRBuild = utils.isPRBuild()

View File

@ -1,4 +1,4 @@
library 'status-jenkins-lib@v1.7.2'
library 'status-jenkins-lib@v1.7.3'
pipeline {
agent { label params.AGENT_LABEL }

View File

@ -1,4 +1,4 @@
library 'status-jenkins-lib@v1.7.2'
library 'status-jenkins-lib@v1.7.3'
/* Options section can't access functions in objects. */
def isPRBuild = utils.isPRBuild()

View File

@ -1,4 +1,4 @@
library 'status-jenkins-lib@v1.7.2'
library 'status-jenkins-lib@v1.7.3'
pipeline {

View File

@ -1,4 +1,4 @@
library 'status-jenkins-lib@v1.7.2'
library 'status-jenkins-lib@v1.7.3'
pipeline {

View File

@ -1,4 +1,4 @@
library 'status-jenkins-lib@v1.7.2'
library 'status-jenkins-lib@v1.7.3'
pipeline {

View File

@ -1,4 +1,4 @@
library 'status-jenkins-lib@v1.7.2'
library 'status-jenkins-lib@v1.7.3'
pipeline {
agent { label 'macos' }

View File

@ -1,4 +1,4 @@
library 'status-jenkins-lib@v1.7.2'
library 'status-jenkins-lib@v1.7.3'
pipeline {
agent { label 'linux' }

View File

@ -1,4 +1,4 @@
library 'status-jenkins-lib@v1.7.2'
library 'status-jenkins-lib@v1.7.3'
pipeline {
agent {

View File

@ -39,9 +39,22 @@ chmod 644 ${SECRETS_FILE_PATH}
# If secrets file was created we want to remove it.
trap "rm -vf ${SECRETS_FILE_PATH}" EXIT ERR INT QUIT
# Names of variables containing secrets to save in env file.
SECRETS_ENV_VARS=(
'ALCHEMY_ARBITRUM_GOERLI_TOKEN'
'ALCHEMY_ARBITRUM_MAINNET_TOKEN'
'ALCHEMY_OPTIMISM_GOERLI_TOKEN'
'ALCHEMY_OPTIMISM_MAINNET_TOKEN'
'INFURA_TOKEN'
'INFURA_TOKEN_SECRET'
'OPENSEA_API_KEY'
'POKT_TOKEN'
)
# Secrets like this can't be passed via args or they end up in derivation.
if [[ -n "${POKT_TOKEN}" ]]; then append_env_export 'POKT_TOKEN'; fi
if [[ -n "${OPENSEA_API_KEY}" ]]; then append_env_export 'OPENSEA_API_KEY'; fi
for SECRET_VAR_NAME in "${SECRETS_ENV_VARS[@]}"; do
[[ -n "${!SECRET_VAR_NAME}" ]] && append_env_export "${SECRET_VAR_NAME}"
done
# If no secrets were passed there's no need to pass the 'secretsFile'.
if [[ -s "${SECRETS_FILE_PATH}" ]]; then