Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(localstack): pin localstack python package to 2.2.0 and pull container image from ghcr #1867

Merged
merged 1 commit into from
Sep 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 21 additions & 5 deletions .github/actions/setup-localstack/action.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,32 @@
name: 'Setup localstack service'
description: 'Download & run localstack container'
inputs:
# inputs for https://github.com/docker/login-action
username:
description: 'Username used to log against the github registry'
required: false
default: ${{ github.actor }}
password:
description: 'Password or personal access token used to log against the github registry'
required: false
default: ${{ github.token }}
runs:
using: "composite"
steps:
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ inputs.username }}
password: ${{ inputs.password }}
- shell: bash
run: |
pip install localstack # Install LocalStack cli
docker pull localstack/localstack:2.2 # Make sure to pull the latest version of the image
localstack start -d # Start LocalStack in the background
pip install localstack==2.2.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.2 # 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
localstack wait -t 30 # to become ready before timing out
echo "Waiting for LocalStack startup..." # Wait 30 seconds for the LocalStack container
localstack wait -t 30 # to become ready before timing out
echo "Startup complete"

aws dynamodb --endpoint-url http://localhost:4566 --region "us-east-2" create-table --table-name BlobTable --attribute-definitions AttributeName=Digest,AttributeType=S --key-schema AttributeName=Digest,KeyType=HASH --provisioned-throughput ReadCapacityUnits=10,WriteCapacityUnits=5
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/ecosystem-tools.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,17 @@ jobs:
- name: Run CI tests
run: |
make run-blackbox-ci
- name: Log in to GitHub Docker Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Install localstack
run: |
pip install --upgrade pyopenssl
pip install localstack awscli-local[ver1] # install LocalStack cli and awslocal
docker pull localstack/localstack:2.2 # Make sure to pull the latest version of the image
pip install localstack==2.2.0 awscli-local[ver1] # install LocalStack cli and awslocal
docker pull ghcr.io/project-zot/ci-images/localstack:2.2 # 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
10 changes: 8 additions & 2 deletions .github/workflows/nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,17 @@ jobs:
make bin/skopeo
sudo cp bin/skopeo /usr/bin
skopeo -v
- name: Log in to GitHub Docker Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Install localstack
run: |
pip install --upgrade pyopenssl
pip install localstack awscli-local[ver1] # install LocalStack cli and awslocal
docker pull localstack/localstack:2.2 # Make sure to pull the latest version of the image
pip install localstack==2.2.0 awscli-local[ver1] # install LocalStack cli and awslocal
docker pull ghcr.io/project-zot/ci-images/localstack:2.2 # 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
Loading