Skip to content

[frontend] Disable matrix selector if it has too many cells #1683

[frontend] Disable matrix selector if it has too many cells

[frontend] Disable matrix selector if it has too many cells #1683

Workflow file for this run

name: Build, publish and deploy
# Run on everything. We conditionally skip deployment, but this way the build
# is only run once. Testing could be a different workflow, but then the github
# runners would need to build it twice, wasting resources.
on: [push]
env:
IMAGE_NAME: velcom-server
UID: 1004
jobs:
# Build the frontend
build-frontend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2-beta
with:
node-version: '19'
- name: "Build frontend (location independent)"
run: "./scripts/build-frontend --env production"
- name: "Upload frontend artifacts (location independent)"
uses: actions/upload-artifact@v2
with:
name: frontend-artifacts
path: frontend/dist
# Build the shared backend
build-backend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: '11'
- uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: "Build backend"
run: "./scripts/build-backend"
- name: "Upload backend/backend artifact"
uses: actions/upload-artifact@v2
with:
name: backend-artifacts
path: backend/backend/target/backend.jar
- name: "Upload aspectjweaver artifact"
uses: actions/upload-artifact@v2
with:
name: aspectjweaver-artifact
path: backend/backend/target/dependency/aspectjweaver.jar
- name: "Upload backend/runner artifacts"
uses: actions/upload-artifact@v2
with:
name: backend-artifacts
path: backend/runner/target/runner.jar
# Push location independent image to GitHub Packages.
push-docker-image:
# Ensure build job passes before pushing image.
needs: [build-frontend, build-backend]
runs-on: ubuntu-latest
if: "github.event_name == 'push' && github.ref == 'refs/heads/main'"
steps:
# SETUP
- uses: actions/checkout@v2
- name: "Download frontend artifacts"
uses: actions/download-artifact@v2
with:
name: frontend-artifacts
path: dist
- name: "Download backend artifact"
uses: actions/download-artifact@v2
with:
name: backend-artifacts
- name: "Download aspectjweaver artifact"
uses: actions/download-artifact@v2
with:
name: aspectjweaver-artifact
# BUILDING
- name: "Build image"
run: "./scripts/docker/build-docker --uid $UID --metrics CI"
- name: "Log into registry"
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin
- name: Push image
run: |
IMAGE_ID=docker.pkg.github.com/${{ github.repository }}/$IMAGE_NAME
# MUST change all uppercase to lowercase for Docker
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
# Offer the image as latest
docker tag $IMAGE_NAME $IMAGE_ID:latest
docker push $IMAGE_ID:latest
# Deploy master branch to speedcenter.informatik.kit.edu
deploy-kit:
# Ensure build job passes before pushing image.
needs: [push-docker-image]
runs-on: ubuntu-latest
if: "github.event_name == 'push' && github.ref == 'refs/heads/main'"
env:
ENDPOINT: ${{ secrets.KIT_DEPLOY_ENDPOINT }}
DEPLOY_SECRET: ${{ secrets.KIT_DEPLOY_SECRET }}
GITHUB_NAME: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_RUN_ID: ${{ github.run_id }}
steps:
- uses: actions/checkout@v2
- name: "Download backend artifacts"
uses: actions/download-artifact@v2
with:
name: backend-artifacts
- name: "Call deploy script"
run: "bash scripts/deploy-kit/deploy.sh"
# Deploy main branch to velcom.aaaaaaah.de
deploy-aaaaaaah:
# Ensure build job passes before pushing image.
needs: [push-docker-image]
runs-on: ubuntu-latest
if: "github.event_name == 'push' && github.ref == 'refs/heads/main'"
steps:
- uses: actions/checkout@v2
- name: "Call deploy script"
run: 'curl -H "Authorization: Bearer ${{ secrets.AAAAAAAH_PING_TOKEN }}" ${{ secrets.AAAAAAAH_PING_ENDPOINT }} || echo "We only need the ping, not the response."'