Skip to content

Commit 0b0fc39

Browse files
authored
Update config.yml
1 parent bc87851 commit 0b0fc39

File tree

1 file changed

+28
-2
lines changed

1 file changed

+28
-2
lines changed

.circleci/config.yml

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,22 @@ jobs:
2424
- run:
2525
name: Install LocalStack CLI + awslocal
2626
command: |
27-
pip3 localstack awscli-local[ver1]
27+
python3 -m pip install --user --upgrade pip
28+
python3 -m pip install --user localstack awscli-local[ver1]
2829
echo 'export PATH=$HOME/.local/bin:$PATH' >> "$BASH_ENV"
2930
31+
- run:
32+
name: Verify and configure LocalStack token
33+
command: |
34+
source "$BASH_ENV"
35+
if [ -z "${LOCALSTACK_AUTH_TOKEN:-}" ]; then
36+
echo "LOCALSTACK_AUTH_TOKEN is not set in this job."
37+
echo "Set it in CircleCI Project Settings > Environment Variables or via Context."
38+
exit 1
39+
fi
40+
echo "LOCALSTACK_AUTH_TOKEN is present (length=${#LOCALSTACK_AUTH_TOKEN})"
41+
localstack auth set-token "$LOCALSTACK_AUTH_TOKEN"
42+
3043
- run:
3144
name: Start LocalStack
3245
command: |
@@ -84,9 +97,22 @@ jobs:
8497
- run:
8598
name: Install LocalStack CLI + awslocal
8699
command: |
87-
pip3 install localstack awscli-local[ver1]
100+
python3 -m pip install --user --upgrade pip
101+
python3 -m pip install --user localstack awscli-local[ver1]
88102
echo 'export PATH=$HOME/.local/bin:$PATH' >> "$BASH_ENV"
89103
104+
- run:
105+
name: Verify and configure LocalStack token
106+
command: |
107+
source "$BASH_ENV"
108+
if [ -z "${LOCALSTACK_AUTH_TOKEN:-}" ]; then
109+
echo "LOCALSTACK_AUTH_TOKEN is not set in this job."
110+
echo "Set it in CircleCI Project Settings > Environment Variables or via Context."
111+
exit 1
112+
fi
113+
echo "LOCALSTACK_AUTH_TOKEN is present (length=${#LOCALSTACK_AUTH_TOKEN})"
114+
localstack auth set-token "$LOCALSTACK_AUTH_TOKEN"
115+
90116
- run:
91117
name: Start LocalStack
92118
command: |

0 commit comments

Comments
 (0)