10BC0 v2 pipeline changes by alexrashed · Pull Request #7927 · localstack/localstack · GitHub
[go: up one dir, main page]

Skip to content
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
103 changes: 33 additions & 70 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -228,35 +228,17 @@ jobs:
type: string
machine:
image: << parameters.machine_image >>
# TODO re-enable docker layer caching after file system problems are fixed
# docker_layer_caching: true
resource_class: << parameters.resource_class >>
working_directory: /tmp/workspace/repo
steps:
- attach_workspace:
at: /tmp/workspace
- run:
name: Build full docker image
command: make docker-build-full
- run:
name: Build community docker image
command: make docker-build
- run:
name: Build light docker image
command: make docker-build-light
- run:
name: Build pro docker image
command: make docker-build-pro
- run:
name: Save docker images
command: PLATFORM="<< parameters.platform >>" make docker-save-images
- when:
condition:
equal: [ master, << pipeline.git.branch >> ]
steps:
- run:
name: Run pre-release smoke tests
command: echo "make ci-pro-smoke-tests"
name: Save docker image
command: PLATFORM="<< parameters.platform >>" make docker-save-image
- persist_to_workspace:
root:
/tmp/workspace
Expand Down Expand Up @@ -286,8 +268,8 @@ jobs:
- attach_workspace:
at: /tmp/workspace
- run:
name: Load docker localstack-full image
command: docker load -i target/localstack-docker-images-<< parameters.platform >>.tar
name: Load docker image
command: docker load -i target/localstack-docker-image-<< parameters.platform >>.tar
- run:
name: Run integration tests
# circleci split returns newline separated list, so `tr` is necessary to prevent problems in the Makefile
Expand All @@ -308,31 +290,25 @@ jobs:
- repo/target/metric_reports

capture-not-implemented:
parameters:
pro:
description: "Run tests against Pro?"
default: false
type: boolean
executor: ubuntu-machine-amd64
working_directory: /tmp/workspace/repo
steps:
- attach_workspace:
at: /tmp/workspace
- run:
name: Load docker localstack-full image
command: docker load -i target/localstack-docker-images-amd64.tar
name: Load docker image
command: docker load -i target/localstack-docker-image-amd64.tar
- run:
name: Run localstack
command: |
<<#parameters.pro>>LOCALSTACK_API_KEY=$TEST_LOCALSTACK_API_KEY<</parameters.pro>> DEBUG=1 DISABLE_EVENTS="1" IMAGE_NAME="localstack/localstack-full:latest" bin/localstack start -d
DEBUG=1 DISABLE_EVENTS="1" IMAGE_NAME="localstack/localstack:latest" bin/localstack start -d
bin/localstack wait -t 120 || (bin/localstack logs && false)
- run:
name: Run capture-not-implemented
command: |
source .venv/bin/activate
cd scripts
<<#parameters.pro>>mkdir -p pro<</parameters.pro>>
python -m capture_notimplemented_responses <<#parameters.pro>>./pro<</parameters.pro>>
python -m capture_notimplemented_responses
- run:
name: Print the logs
command: |
Expand All @@ -347,8 +323,8 @@ jobs:
root:
/tmp/workspace
paths:
- repo/scripts/<<#parameters.pro>>pro/<</parameters.pro>>implementation_coverage_aggregated.csv
- repo/scripts/<<#parameters.pro>>pro/<</parameters.pro>>implementation_coverage_full.csv
- repo/scripts/implementation_coverage_aggregated.csv
- repo/scripts/implementation_coverage_full.csv

report:
executor: ubuntu-machine-amd64
Expand Down Expand Up @@ -383,7 +359,6 @@ jobs:
METRIC_REPORT_FILE=$(find parity_metrics -type f -iname "metric-report-raw-data-all-*.csv")
METRIC_REPORT_PATH=$METRIC_REPORT_FILE \
COMMUNITY_IMPL_COV_PATH=scripts/implementation_coverage_full.csv \
PRO_IMPL_COV_PATH=scripts/pro/implementation_coverage_full.csv \
python -m scripts.tinybird.upload_raw_test_metrics_and_coverage
- store_artifacts:
path: parity_metrics/
Expand All @@ -393,62 +368,56 @@ jobs:
- store_artifacts:
path: scripts/implementation_coverage_full.csv
destination: community/implementation_coverage_full.csv
- store_artifacts:
path: scripts/pro/implementation_coverage_aggregated.csv
destination: pro/implementation_coverage_aggregated.csv
- store_artifacts:
path: scripts/pro/implementation_coverage_full.csv
destination: pro/implementation_coverage_full.csv

docker-push:
push:
executor: ubuntu-machine-amd64
working_directory: /tmp/workspace/repo
steps:
- attach_workspace:
at: /tmp/workspace
- run:
name: Load docker images - amd64
name: Load docker image - amd64
command: |
# Load all images for AMD64
docker load -i target/localstack-docker-images-amd64.tar
# Load all image for AMD64
docker load -i target/localstack-docker-image-amd64.tar
- run:
name: Log in to ECR registry
command: aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws
- run:
name: Push docker images - amd64
name: Push docker image - amd64
command: |
# Push to Docker Hub
PLATFORM="amd64" make docker-push-master-all
PLATFORM="amd64" make docker-push-master
# Push to Amazon Public ECR
PLATFORM="amd64" SOURCE_IMAGE_NAME="localstack/localstack" TARGET_IMAGE_NAME="public.ecr.aws/localstack/localstack" make docker-push-master
PLATFORM="amd64" SOURCE_IMAGE_NAME="localstack/localstack-pro" TARGET_IMAGE_NAME="public.ecr.aws/localstack/localstack-pro" make docker-push-master
# Load and push per architecture (load overwrites the previous ones)
- run:
name: Load docker image - arm64
command: |
# Load all images for AMD64
docker load -i target/localstack-docker-images-arm64.tar
# Load all image for AMD64
docker load -i target/localstack-docker-image-arm64.tar
- run:
name: Push docker images - arm64
name: Push docker image - arm64
command: |
# Push to Docker Hub
PLATFORM="arm64" make docker-push-master-all
PLATFORM="arm64" make docker-push-master
# Push to Amazon Public ECR
PLATFORM="arm64" SOURCE_IMAGE_NAME="localstack/localstack" TARGET_IMAGE_NAME="public.ecr.aws/localstack/localstack" make docker-push-master
PLATFORM="arm64" SOURCE_IMAGE_NAME="localstack/localstack-pro" TARGET_IMAGE_NAME="public.ecr.aws/localstack/localstack-pro" make docker-push-master
- run:
name: Create multi-platform manifests - full
name: Create multi-platform manifests
command: |
# Push to Docker Hub
MANIFEST_IMAGE_NAME="localstack/localstack-full" make docker-create-push-manifests
- run:
name: Create multi-platform manifests - light
command: |
# Push to Docker Hub
make docker-create-push-manifests-light
make docker-create-push-manifests
# Push to Amazon Public ECR
MANIFEST_IMAGE_NAME="public.ecr.aws/localstack/localstack" make docker-create-push-manifests
MANIFEST_IMAGE_NAME="public.ecr.aws/localstack/localstack-pro" make docker-create-push-manifests
- run:
name: Publish a dev release
command: |
source .venv/bin/activate
bin/release-helper.sh set-ver $(bin/release-helper.sh next-dev-ver)
make publish



workflows:
main:
Expand Down Expand Up @@ -503,12 +472,7 @@ workflows:
requires:
- docker-build-amd64
- capture-not-implemented:
name: collect-not-implemented-community
requires:
- docker-build-amd64
- capture-not-implemented:
name: collect-not-implemented-pro
pro: true
name: collect-not-implemented
requires:
- docker-build-amd64
- report:
Expand All @@ -519,10 +483,9 @@ workflows:
- itest-sfn-v2-provider
- docker-test-amd64
- docker-test-arm64
- collect-not-implemented-community
- collect-not-implemented-pro
- collect-not-implemented
- unit-tests
- docker-push:
- push:
filters:
branches:
only: master
Expand Down
17 changes: 10 additions & 7 deletions .github/workflows/asf-updates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Open Source
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

Expand All @@ -21,12 +21,12 @@ jobs:

- name: Set up Python 3.8
id: setup-python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: '3.10'

- name: Cache LocalStack community dependencies (venv)
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: .venv
key: ${{ runner.os }}-python-${{ steps.setup-python.outputs.python-version }}-venv-${{ hashFiles('setup.cfg') }}
Expand All @@ -52,10 +52,12 @@ jobs:
# Store the result in target/diff-check.log and store the diff count in the GitHub Action output "diff-count"
mkdir -p target
(git diff --name-only origin/asf-auto-updates localstack/aws/api/ 2>/dev/null || git diff --name-only origin/master localstack/aws/api/ 2>/dev/null) | tee target/diff-check.log
echo "::set-output name=diff-count::$(cat target/diff-check.log | wc -l)"
echo "diff-count=$(cat target/diff-check.log | wc -l)" >> $GITHUB_OUTPUT

# Store a (multiline-sanitized) list of changed services (compared to the master) in the GitHub Action output "changed-services"
echo "::set-output name=changed-services::$(git diff --name-only origin/master localstack/aws/api/ | sed 's#localstack/aws/api/#- #g' | sed 's#/__init__.py##g' | sed 's/_/-/g' | sed -z 's/\n/%0A/g' | sed -z 's/\r/%0D/g')"
echo "changed-services<<EOF" >> $GITHUB_OUTPUT
echo "$(git diff --name-only origin/master localstack/aws/api/ | sed 's#localstack/aws/api/#- #g' | sed 's#/__init__.py##g' | sed 's/_/-/g' | sed -z 's/\n/%0A/g' | sed -z 's/\r/%0D/g')" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT

- name: Read PR markdown template
if: ${{ success() && steps.check-for-changes.outputs.diff-count != '0' && steps.check-for-changes.outputs.diff-count != '' }}
Expand All @@ -67,14 +69,15 @@ jobs:
- name: Add changed services to template
if: ${{ success() && steps.check-for-changes.outputs.diff-count != '0' && steps.check-for-changes.outputs.diff-count != '' }}
id: markdown
# TODO upgrade after https://github.com/mad9000/actions-find-and-replace-string/pull/11 has been released
uses: mad9000/actions-find-and-replace-string@2
with:
source: ${{ steps.template.outputs.content }}
45C0 find: '{{ SERVICES }}'
replace: ${{ steps.check-for-changes.outputs.changed-services }}

- name: Create PR
uses: peter-evans/create-pull-request@v3
uses: peter-evans/create-pull-request@v4
if: ${{ success() && steps.check-for-changes.outputs.diff-count != '0' && steps.check-for-changes.outputs.diff-count != '' }}
with:
title: "Update ASF APIs"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/cli-tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: cli-tests
name: CLI Tests
on:
workflow_dispatch:
pull_request:
Expand Down Expand Up @@ -44,10 +44,10 @@ jobs:
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up Python
id: setup-python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install CLI test dependencies
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/pro-integration.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: integration-tests-against-pro
name: Community Integration Tests against Pro
on:
workflow_dispatch:
inputs:
Expand Down Expand Up @@ -108,19 +108,19 @@ jobs:
console.log("Ext repo does not have a companion ref. Using default: ", DEFAULT_REF)
return DEFAULT_REF
- name: Checkout Pro
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: localstack/localstack-ext
ref: ${{steps.determine-companion-ref.outputs.result}}
token: ${{ secrets.PRO_ACCESS_TOKEN }}
path: localstack-ext
- name: Checkout Open Source
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: localstack
- name: Set up Python 3.10
id: setup-python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Set up Node 14.x
Expand All @@ -140,15 +140,15 @@ jobs:
sudo apt-get update
sudo apt-get install -y --allow-downgrades libsasl2-dev jq postgresql-14=14.7-0ubuntu0.22.04.1 postgresql-client postgresql-plpython3
- name: Cache LocalStack-ext dependencies (venv)
uses: actions/cache@v2
uses: actions/cache@v3
id: ext-cache
with:
path: localstack-ext/.venv
key: ${{ runner.os }}-python-${{ steps.setup-python.outputs.python-version }}-venv-${{ hashFiles('localstack-ext/setup.cfg', 'localstack-ext/pyproject.toml', 'localstack/localstack/services/install.py', 'localstack/setup.cfg', 'localstack/localstack/constants.py') }}
- name: Install Python Dependencies for LocalStack Pro
run: make install
- name: Cache LocalStack community dependencies (venv, static libs)
uses: actions/cache@v2
uses: actions/cache@v3
id: os-cache
with:
path: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rebase-release-prs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Rebase release PRs
name: Rebase Release PRs
on:
push:
branches:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rebase-release-targeting-prs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Rebase PRs targeting release branches
name: Rebase PRs targeting Release Branches
on:
push:
branches:
Expand Down
34 changes: 0 additions & 34 deletions .github/workflows/rh-support.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/stale-bot.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Triage Stale issues"
name: Triage Stale Issues

on:
schedule:
Expand Down
Loading
0