Skip to content

Commit

Permalink
ci: upgrade localstack to v3.3.0 (#2390)
Browse files Browse the repository at this point in the history
There are performance improvements in recent releases of localstack.

1) install localstack via "pip install" and requires python 3.11
2) also pull a recently pushed localstack docker image to ghcr.io

Signed-off-by: Ramkumar Chinchani <[email protected]>
  • Loading branch information
rchincha authored Apr 19, 2024
1 parent 6898b31 commit 7146826
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 6 deletions.
7 changes: 5 additions & 2 deletions .github/actions/setup-localstack/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,14 @@ runs:
registry: ghcr.io
username: ${{ inputs.username }}
password: ${{ inputs.password }}
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- shell: bash
run: |
pip install localstack==2.3.1 # Install LocalStack cli
pip install localstack==3.3.0 # Install LocalStack cli
# Below image was copied manually from localstack/localstack:2.2 and uploaded to ghcr
docker pull ghcr.io/project-zot/ci-images/localstack:2.3.1 # Make sure to pull a working version of the image
docker pull ghcr.io/project-zot/ci-images/localstack:3.3.0 # Make sure to pull a working version of the image
localstack start -d # Start LocalStack in the background
echo "Waiting for LocalStack startup..." # Wait 30 seconds for the LocalStack container
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/ecosystem-tools.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,14 @@ jobs:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install localstack
run: |
pip install --upgrade pyopenssl
pip install localstack==2.3.1 awscli-local[ver1] # install LocalStack cli and awslocal
docker pull ghcr.io/project-zot/ci-images/localstack:2.3.1 # Make sure to pull a working version of the image
pip install localstack==3.3.0 awscli-local[ver1] # install LocalStack cli and awslocal
docker pull ghcr.io/project-zot/ci-images/localstack:3.3.0 # Make sure to pull a working version of the image
localstack start -d # Start LocalStack in the background
echo "Waiting for LocalStack startup..." # Wait 30 seconds for the LocalStack container
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,14 @@ jobs:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install localstack
run: |
pip install --upgrade pyopenssl
pip install localstack==2.3.1 awscli-local[ver1] # install LocalStack cli and awslocal
docker pull ghcr.io/project-zot/ci-images/localstack:2.3.1 # Make sure to pull the latest version of the image
pip install localstack==3.3.0 awscli-local[ver1] # install LocalStack cli and awslocal
docker pull ghcr.io/project-zot/ci-images/localstack:3.3.0 # Make sure to pull the latest version of the image
localstack start -d # Start LocalStack in the background
echo "Waiting for LocalStack startup..." # Wait 30 seconds for the LocalStack container
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/sync-3rdparty-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,26 @@ jobs:
run: |
oras login -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }} ghcr.io
oras copy ghcr.io/aquasecurity/trivy-db:2 ghcr.io/${{ github.repository_owner }}/trivy-db:2
sync-localstack:
name: 'localstack'
permissions:
contents: read
packages: write
strategy:
matrix:
localstack_version:
- "3.3.0"
runs-on: ubuntu-latest
steps:
- name: Log in to GitHub Docker Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Tag and push localstack to ghcr
run: |
docker trust inspect localstack:${{ matrix.localstack_version }}
docker pull localstack:${{ matrix.localstack_version }}
docker tag localstack:${{ matrix.localstack_version }} ghcr.io/${{ github.repository_owner }}/ci-images/localstack:${{ matrix.localstack_version }}
docker push ghcr.io/${{ github.repository_owner }}/ci-images/localstack:${{ matrix.localstack_version }}

0 comments on commit 7146826

Please sign in to comment.