Add initialization-block to tycho runner, fix docker and improve docs

This commit is contained in:
Thales
2024-08-01 01:35:55 -03:00
committed by tvinagre
parent 67f10e777a
commit 11619bf8be
9 changed files with 60 additions and 8 deletions

26
testing/pre_build.sh Executable file
View File

@@ -0,0 +1,26 @@
#!/bin/bash
# Enable automatic export of all defined variables
set -a
# Source the .env file
source .env
# Disable automatic export (optional, if you want to stop exporting variables)
set +a
# Check if DOMAIN_OWNER is set
if [ -z "$DOMAIN_OWNER" ]; then
echo "DOMAIN_OWNER environment variable is not set."
exit 1
fi
# Fetch the CODEARTIFACT_AUTH_TOKEN
CODEARTIFACT_AUTH_TOKEN=$(aws --region eu-central-1 codeartifact get-authorization-token --domain propeller --domain-owner $DOMAIN_OWNER --query authorizationToken --output text --duration 1800)
# Set the PIP_INDEX_URL
PIP_INDEX_URL="https://aws:${CODEARTIFACT_AUTH_TOKEN}@propeller-${DOMAIN_OWNER}.d.codeartifact.eu-central-1.amazonaws.com/pypi/protosim/simple/"
# Export the variables
export CODEARTIFACT_AUTH_TOKEN
export PIP_INDEX_URL