mirror of
https://github.com/apache/superset.git
synced 2026-04-18 23:55:00 +00:00
feat(docker): allow for docker release builds to be multi-platform (#27055)
This commit is contained in:
committed by
GitHub
parent
5951f6ceb6
commit
13915bbb54
16
.github/workflows/docker-release.yml
vendored
16
.github/workflows/docker-release.yml
vendored
@@ -2,7 +2,7 @@ name: Docker Publish Release
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
types: [published, edited]
|
||||
|
||||
# Can be triggered manually
|
||||
workflow_dispatch:
|
||||
@@ -43,14 +43,6 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
build_preset: ["dev", "lean", "py310", "websocket", "dockerize"]
|
||||
platform: ["linux/amd64", "linux/arm64"]
|
||||
exclude:
|
||||
# disabling because slow! no python wheels for arm/py39 and
|
||||
# QEMU is slow!
|
||||
- build_preset: "dev"
|
||||
platform: "linux/arm64"
|
||||
- build_preset: "lean"
|
||||
platform: "linux/arm64"
|
||||
fail-fast: false
|
||||
steps:
|
||||
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
|
||||
@@ -88,8 +80,10 @@ jobs:
|
||||
EVENT="release"
|
||||
fi
|
||||
pip install click
|
||||
# Make a multi-platform image
|
||||
./scripts/build_docker.py \
|
||||
${{ matrix.build_preset }} \
|
||||
"$EVENT" \
|
||||
--build_context_ref "$RELEASE" \
|
||||
--platform ${{ matrix.platform }} $FORCE_LATEST
|
||||
--build_context_ref "$RELEASE" $FORCE_LATEST \
|
||||
--platform "linux/arm64" \
|
||||
--platform "linux/amd64"
|
||||
|
||||
7
.github/workflows/ephemeral-env.yml
vendored
7
.github/workflows/ephemeral-env.yml
vendored
@@ -143,10 +143,9 @@ jobs:
|
||||
env:
|
||||
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
|
||||
ECR_REPOSITORY: superset-ci
|
||||
SHA: ${{ steps.get-sha.outputs.sha }}
|
||||
IMAGE_TAG: apache/superset:${{ steps.get-sha.outputs.sha }}-ci
|
||||
run: |
|
||||
docker tag $IMAGE_TAG $ECR_REGISTRY/$ECR_REPOSITORY:$SHA
|
||||
docker tag $IMAGE_TAG $ECR_REGISTRY/$ECR_REPOSITORY:pr-${{ github.event.issue.number }}-ci
|
||||
docker push -a $ECR_REGISTRY/$ECR_REPOSITORY
|
||||
|
||||
ephemeral-env-up:
|
||||
@@ -181,7 +180,7 @@ jobs:
|
||||
aws ecr describe-images \
|
||||
--registry-id $(echo "${{ steps.login-ecr.outputs.registry }}" | grep -Eo "^[0-9]+") \
|
||||
--repository-name superset-ci \
|
||||
--image-ids imageTag=${{ steps.get-sha.outputs.sha }}
|
||||
--image-ids imageTag=pr-${{ github.event.issue.number }}-ci
|
||||
|
||||
- name: Fail on missing container image
|
||||
if: steps.check-image.outcome == 'failure'
|
||||
@@ -204,7 +203,7 @@ jobs:
|
||||
with:
|
||||
task-definition: .github/workflows/ecs-task-definition.json
|
||||
container-name: superset-ci
|
||||
image: ${{ steps.login-ecr.outputs.registry }}/superset-ci:pr-${{ github.event.issue.number }}
|
||||
image: ${{ steps.login-ecr.outputs.registry }}/superset-ci:pr-${{ github.event.issue.number }}-ci
|
||||
|
||||
- name: Update env vars in the Amazon ECS task definition
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user