Dockerfile no longer builds client

This proved to be extremely slow on emulated hardware to build e.g. the linux/arm/v7 image.
Since the built client is architecture agnostic, it's instead now built on the native hardware and inserted into the docker image.
This commit is contained in:
Donkie
2023-12-17 22:53:17 +01:00
parent fe6422597f
commit 60b67ee758
2 changed files with 63 additions and 13 deletions

View File

@@ -35,14 +35,53 @@ jobs:
- name: Run pre-commit
run: pre-commit run --all-files
#
# Build native image for integration tests
# Build the Spoolman client for baking into the docker images
# This is done on native hardware to speed things up, vite is very slow on emulated hardware
#
build-amd64:
build-client:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install node
uses: actions/setup-node@v3
with:
node-version: '20'
- name: Install dependencies
run: |
cd client
npm ci
- name: Build
run: |
cd client
rm -f .env && echo "VITE_APIURL=/api/v1" > .env.production
npm run build
npm run build.zip
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: client
path: client/dist
#
# Build native image for integration tests
#
build-amd64:
needs: [build-client]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Download client
uses: actions/download-artifact@v3
with:
name: client
path: client/dist
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
@@ -158,11 +197,18 @@ jobs:
#
build-arm64:
if: ${{ github.event_name != 'pull_request' }}
needs: [build-client]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Download client
uses: actions/download-artifact@v3
with:
name: client
path: client/dist
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
@@ -190,11 +236,18 @@ jobs:
#
build-armv7:
if: ${{ github.event_name != 'pull_request' }}
needs: [build-client]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Download client
uses: actions/download-artifact@v3
with:
name: client
path: client/dist
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
@@ -221,12 +274,18 @@ jobs:
#
release:
if: ${{ github.event_name != 'pull_request' }}
needs: [test, build-amd64, build-arm64, build-armv7, style]
needs: [test, build-amd64, build-arm64, build-armv7, style, build-client]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Download client
uses: actions/download-artifact@v3
with:
name: client
path: client/dist
- name: Set up QEMU
uses: docker/setup-qemu-action@v2