Skip to content

Commit

Permalink
fix auth token handling for binary builds (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexrashed committed Nov 16, 2023
1 parent 2461d94 commit 3b9a241
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/build.yml
Expand Up @@ -71,7 +71,9 @@ jobs:
# Install docker and start Colima on MacOS (except it's the large runner)
# GitHub xlarge MacOS runner cannot run Docker containers:
# - https://docs.github.com/en/actions/using-github-hosted-runners/about-larger-runners/
if: matrix.os == 'darwin' && matrix.runner != 'macos-13-xlarge'
# if: matrix.os == 'darwin' && matrix.runner != 'macos-13-xlarge'
# TODO re-enable when mac11 docker gets more stable
if: ${{ false }}
run: |
brew install docker
colima start
Expand Down Expand Up @@ -103,7 +105,8 @@ jobs:
# GitHub Windows and xlarge MacOS runner cannot run Docker containers:
# - https://github.com/orgs/community/discussions/25491
# - https://docs.github.com/en/actions/using-github-hosted-runners/about-larger-runners/
if: matrix.os != 'windows' && matrix.runner != 'macos-13-xlarge'
# TODO re-enable for mac when mac11 docker gets more stable
if: matrix.os != 'windows' && matrix.os != 'darwin'
run: |
# Pull images to avoid making smoke tests vulnerable to system behavior (docker pull speed)
docker pull localstack/localstack
Expand All @@ -121,7 +124,8 @@ jobs:
# - https://github.com/orgs/community/discussions/25491
# - https://docs.github.com/en/actions/using-github-hosted-runners/about-larger-runners/
# Skip these checks for forks (forks do not have access to the LocalStack Pro API key)
if: matrix.os != 'windows' && matrix.runner != 'macos-13-xlarge' && !github.event.pull_request.head.repo.fork
# TODO re-enable for mac when mac11 docker gets more stable
if: matrix.os != 'windows' && matrix.os != 'darwin' && !github.event.pull_request.head.repo.fork
run: |
# Pull images to avoid making smoke tests vulnerable to system behavior (docker pull speed)
docker pull localstack/localstack-pro
Expand All @@ -132,6 +136,11 @@ jobs:
./localstack status services --format plain
./localstack status services --format plain | grep "xray=available"
./localstack stop
LOCALSTACK_AUTH_TOKEN=${{ secrets.TEST_LOCALSTACK_AUTH_TOKEN }} ./localstack start -d
./localstack wait -t 180
./localstack status services --format plain
./localstack status services --format plain | grep "xray=available"
./localstack stop
- name: Set CLI version output
id: cli_version
Expand Down
2 changes: 2 additions & 0 deletions Makefile
Expand Up @@ -26,6 +26,8 @@ dist-bin/localstack build: $(VENV_ACTIVATE) main.py
--hidden-import cookiecutter.main \
--hidden-import cookiecutter.extensions \
--hidden-import localstack_ext.cli.localstack \
--hidden-import localstack_ext.plugins \
--hidden-import localstack_ext.extensions.plugins \
--additional-hooks-dir hooks

dist-dir/localstack: PYINSTALLER_ARGS=--distpath=dist-dir
Expand Down
4 changes: 2 additions & 2 deletions hooks/hook-localstack_ext.py
@@ -1,4 +1,4 @@
from PyInstaller.utils.hooks import copy_metadata
from PyInstaller.utils.hooks import copy_metadata, collect_data_files

# make sure to add the entrypoints data for localstack-ext
datas = copy_metadata('localstack_ext')
datas = copy_metadata('localstack_ext') + collect_data_files('localstack_ext')
2 changes: 1 addition & 1 deletion requirements.txt
@@ -1,3 +1,3 @@
pyinstaller
localstack==3.0.0.post2
localstack==3.0.0.post4
cookiecutter

0 comments on commit 3b9a241

Please sign in to comment.