make avro dependencies more clear. #372
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Main Version | |
on: | |
push: | |
branches: | |
- main | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
with: | |
submodules: recursive | |
- name: Set up npm for linting | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18.x' | |
- name: Lint Markdown | |
run: npm ci && npm run mdlint | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to Quay.io Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: registry.puzzle.ch | |
username: ${{ secrets.PUZZLE_REG_USERNAME }} | |
password: ${{ secrets.PUZZLE_REG_TOKEN }} | |
- name: Build Puzzle Version | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: ./Dockerfile | |
push: true | |
tags: | | |
registry.puzzle.ch/puzzle/quarkus-techlab:latest | |
- name: Run vulnerability scanner | |
uses: aquasecurity/trivy-action@master | |
with: | |
image-ref: 'registry.puzzle.ch/puzzle/quarkus-techlab:latest' | |
format: 'table' | |
output: 'trivy-results.txt' | |
exit-code: '0' | |
ignore-unfixed: true | |
vuln-type: 'os' | |
severity: 'CRITICAL,HIGH' | |
- name: Archive vulnerability scan results | |
uses: actions/upload-artifact@v3 | |
with: | |
name: trivy-results-main | |
path: trivy-results.txt | |
- name: Build Mobi Version | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: ./Dockerfile | |
build-args: | | |
TRAINING_HUGO_ENV=mobi | |
push: true | |
tags: | | |
registry.puzzle.ch/puzzle/quarkus-techlab:latest-mobi | |
- name: 'Install Helm' | |
uses: azure/setup-helm@v3 | |
with: | |
version: v3.6.2 | |
- name: Install Kubectl | |
uses: azure/setup-kubectl@v3 | |
with: | |
version: v1.21.2 | |
- name: Create KUBECONFIG | |
env: | |
KUBE_CONFIG: '${{ secrets.KUBECONFIG_PROD_AV2 }}' | |
run: | | |
mkdir -p $HOME/.kube | |
echo "$KUBE_CONFIG" > $HOME/.kube/config | |
- name: Deploy Helm Release | |
env: | |
TRAINING_HELM_RELEASE: 'latest' | |
TRAINING_NAMESPACE: 'pitc-cicd-quarkus-techlab-prod' | |
TRAINING_VERSION: '${{ github.sha }}' | |
run: | | |
helm upgrade $TRAINING_HELM_RELEASE acend-training-chart --install --wait \ | |
--kubeconfig $HOME/.kube/config \ | |
--namespace=$TRAINING_NAMESPACE \ | |
--set=app.name=$HELM_RELEASE \ | |
--set=app.version=$TRAINING_VERSION \ | |
--repo=https://acend.github.io/helm-charts/ \ | |
--values=helm-chart/values.yaml \ | |
--set-string=acendTraining.deployments[0].ingress.labels.public=true \ | |
--atomic | |
- name: Redeploy Deployments | |
env: | |
TRAINING_HELM_RELEASE: 'latest' | |
TRAINING_NAMESPACE: 'pitc-cicd-quarkus-techlab-prod' | |
run: | | |
kubectl rollout restart deployment/$TRAINING_HELM_RELEASE-quarkus-techlab-puzzle \ | |
--kubeconfig $HOME/.kube/config \ | |
--namespace $TRAINING_NAMESPACE | |
kubectl rollout restart deployment/$TRAINING_HELM_RELEASE-quarkus-techlab-mobi \ | |
--kubeconfig $HOME/.kube/config \ | |
--namespace $TRAINING_NAMESPACE | |
- | |
name: Create acend KUBECONFIG | |
env: | |
KUBE_CONFIG: '${{ secrets.KUBECONFIG_K8S_ACEND }}' | |
run: | | |
mkdir -p $HOME/.kube | |
echo "$KUBE_CONFIG" > $HOME/.kube/config | |
- | |
name: Deploy acend mobi Helm Release | |
env: | |
TRAINING_HELM_RELEASE: 'latest' | |
TRAINING_NAMESPACE: 'acend-quarkus-training-prod' | |
TRAINING_VERSION: '${{ github.sha }}' | |
run: | | |
helm upgrade $TRAINING_HELM_RELEASE acend-training-chart --install --wait --kubeconfig $HOME/.kube/config --namespace=$TRAINING_NAMESPACE --set=app.name=$HELM_RELEASE --set=app.version=$TRAINING_VERSION --repo=https://acend.github.io/helm-charts/ --values=helm-chart/values-acend.yaml --atomic | |
- | |
name: Redeploy acend mobi Deployments | |
env: | |
TRAINING_HELM_RELEASE: 'latest' | |
TRAINING_HELM_NAME: 'quarkus-techlab' | |
TRAINING_NAMESPACE: 'acend-quarkus-training-prod' | |
run: | | |
kubectl rollout restart deployment/${TRAINING_HELM_RELEASE}-${TRAINING_HELM_NAME}-mobi --kubeconfig $HOME/.kube/config --namespace $TRAINING_NAMESPACE | |