ci: push customer images with docker buildx
Some checks failed
CI/CD Pipeline / Run Tests (push) Failing after 11m26s
CI/CD Pipeline / Code Quality Checks (push) Failing after 15m13s
CI/CD Pipeline / Build Docker Images (push) Has been skipped
CI/CD Pipeline / Push to Gitea Registry (push) Has been cancelled
CI/CD Pipeline / Deploy to Server (push) Has been cancelled
CI/CD Pipeline / Run Tests (pull_request) Failing after 7m21s
CI/CD Pipeline / Code Quality Checks (pull_request) Failing after 13m37s
CI/CD Pipeline / Build Docker Images (pull_request) Has been skipped
CI/CD Pipeline / Push to Gitea Registry (pull_request) Has been skipped
CI/CD Pipeline / Deploy to Server (pull_request) Has been skipped
Some checks failed
CI/CD Pipeline / Run Tests (push) Failing after 11m26s
CI/CD Pipeline / Code Quality Checks (push) Failing after 15m13s
CI/CD Pipeline / Build Docker Images (push) Has been skipped
CI/CD Pipeline / Push to Gitea Registry (push) Has been cancelled
CI/CD Pipeline / Deploy to Server (push) Has been cancelled
CI/CD Pipeline / Run Tests (pull_request) Failing after 7m21s
CI/CD Pipeline / Code Quality Checks (pull_request) Failing after 13m37s
CI/CD Pipeline / Build Docker Images (pull_request) Has been skipped
CI/CD Pipeline / Push to Gitea Registry (pull_request) Has been skipped
CI/CD Pipeline / Deploy to Server (pull_request) Has been skipped
This commit is contained in:
@@ -78,12 +78,15 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Install crane
|
- name: Setup Docker Buildx
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
curl -fsSL https://github.com/google/go-containerregistry/releases/download/v0.19.0/go-containerregistry_Linux_x86_64.tar.gz \
|
if ! docker buildx inspect customer-builder >/dev/null 2>&1; then
|
||||||
| tar xz crane
|
docker buildx create --name customer-builder --driver docker-container --use
|
||||||
chmod +x crane
|
else
|
||||||
|
docker buildx use customer-builder
|
||||||
|
fi
|
||||||
|
docker buildx inspect --bootstrap
|
||||||
|
|
||||||
- name: Build and push customer images
|
- name: Build and push customer images
|
||||||
env:
|
env:
|
||||||
@@ -103,31 +106,29 @@ jobs:
|
|||||||
celery_ref="${registry_path}/${CUSTOMER_CELERY_IMAGE}"
|
celery_ref="${registry_path}/${CUSTOMER_CELERY_IMAGE}"
|
||||||
|
|
||||||
printf '%s' "${registry_password}" \
|
printf '%s' "${registry_password}" \
|
||||||
| ./crane auth login "${CUSTOMER_REGISTRY_HOST}" \
|
| docker login "${CUSTOMER_REGISTRY_HOST}" \
|
||||||
-u "${registry_user}" \
|
-u "${registry_user}" \
|
||||||
--password-stdin
|
--password-stdin
|
||||||
|
|
||||||
docker build \
|
docker buildx build \
|
||||||
--platform linux/amd64 \
|
--platform linux/amd64 \
|
||||||
-f ./docker/Dockerfile \
|
-f ./docker/Dockerfile \
|
||||||
--target runtime-web \
|
--target runtime-web \
|
||||||
--build-arg INSTALL_DEV=false \
|
--build-arg INSTALL_DEV=false \
|
||||||
-t customer-state-corp-backend-web:local \
|
--push \
|
||||||
|
-t "${web_ref}:latest" \
|
||||||
|
-t "${web_ref}:${sha_short}" \
|
||||||
.
|
.
|
||||||
docker save customer-state-corp-backend-web:local -o /tmp/customer-state-corp-backend-web.tar
|
|
||||||
./crane push /tmp/customer-state-corp-backend-web.tar "${web_ref}:latest"
|
|
||||||
./crane push /tmp/customer-state-corp-backend-web.tar "${web_ref}:${sha_short}"
|
|
||||||
|
|
||||||
docker build \
|
docker buildx build \
|
||||||
--platform linux/amd64 \
|
--platform linux/amd64 \
|
||||||
-f ./docker/Dockerfile \
|
-f ./docker/Dockerfile \
|
||||||
--target runtime-celery \
|
--target runtime-celery \
|
||||||
--build-arg INSTALL_DEV=false \
|
--build-arg INSTALL_DEV=false \
|
||||||
-t customer-state-corp-backend-celery:local \
|
--push \
|
||||||
|
-t "${celery_ref}:latest" \
|
||||||
|
-t "${celery_ref}:${sha_short}" \
|
||||||
.
|
.
|
||||||
docker save customer-state-corp-backend-celery:local -o /tmp/customer-state-corp-backend-celery.tar
|
|
||||||
./crane push /tmp/customer-state-corp-backend-celery.tar "${celery_ref}:latest"
|
|
||||||
./crane push /tmp/customer-state-corp-backend-celery.tar "${celery_ref}:${sha_short}"
|
|
||||||
|
|
||||||
- name: Deploy customer stack
|
- name: Deploy customer stack
|
||||||
env:
|
env:
|
||||||
|
|||||||
Reference in New Issue
Block a user