Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
blank_issues_enabled: true
contact_links:
- name: 📚 Documentation
url: https://cloud-pi-native.fr
url: https://pas.encore.de.site
about: Cet outil de suivi des problèmes n'est pas destiné aux problèmes de documentation. Veuillez ouvrir un ticket sur le dépôt de documentation.
- name: 🚀 Déploiement
url: https://github.com/cloud-pi-native/socle
url: https://github.com/Kontainer/socle
about: Cet outil de suivi des problèmes n'est pas destiné aux problèmes de déploiement de la plateforme. Veuillez ouvrir un ticket sur le dépôt de socle.
28 changes: 22 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,8 @@ on:
default: ghcr.io
NAMESPACE:
description: Target namespace to the given registry
required: true
required: false
type: string
default: cloud-pi-native/console
BUILD_AMD64:
description: Build for amd64
required: true
Expand All @@ -69,6 +68,21 @@ on:
type: number

jobs:
expose-vars:
runs-on: ubuntu-latest
if: ${{ !github.event.pull_request.draft }}
outputs:
REGISTRY_NAMESPACE: ${{ steps.set-default.outputs.REGISTRY_NAMESPACE }}
steps:
- name: Set Default Repository Name
id: set-default
run: |
REGISTRY_NAMESPACE=${{ inputs.NAMESPACE }}
if [[ -z "$REGISTRY_NAMESPACE" ]]; then
REGISTRY_NAMESPACE="${{ github.repository }}"
fi
echo "REGISTRY_NAMESPACE=$REGISTRY_NAMESPACE" >> $GITHUB_OUTPUT

matrix:
name: Generate matrix
runs-on: ubuntu-latest
Expand All @@ -94,6 +108,7 @@ jobs:
runs-on: ${{ matrix.runners }}
needs:
- matrix
- expose-vars
strategy:
matrix:
runners: ${{ (inputs.BUILD_AMD64 && inputs.BUILD_ARM64 && !inputs.USE_QEMU && fromJson('["ubuntu-latest", "ARM64"]')) || (inputs.BUILD_ARM64 && !inputs.USE_QEMU && fromJson('["ARM64"]')) || fromJson('["ubuntu-latest"]') }}
Expand Down Expand Up @@ -138,7 +153,7 @@ jobs:
file: ${{ matrix.images.build.dockerfile }}
provenance: false
platforms: ${{ (inputs.BUILD_AMD64 && inputs.BUILD_ARM64 && inputs.USE_QEMU && 'linux/amd64,linux/arm64') || (inputs.BUILD_ARM64 && 'linux/arm64') || (inputs.BUILD_AMD64 && 'linux/amd64') }}
outputs: type=image,name=${{ inputs.REGISTRY }}/${{ inputs.NAMESPACE }}/${{ matrix.images.name }},push-by-digest=true,name-canonical=true,push=true
outputs: type=image,name=${{ inputs.REGISTRY }}/${{ needs.expose-vars.outputs.REGISTRY_NAMESPACE }}/${{ matrix.images.name }},push-by-digest=true,name-canonical=true,push=true
build-args: |
APP_VERSION=${{ inputs.TAG || steps.short-sha.outputs.SHORT_SHA }}
# cache-from: type=gha
Expand Down Expand Up @@ -174,6 +189,7 @@ jobs:
needs:
- matrix
- build
- expose-vars
strategy:
matrix:
images: ${{ fromJSON(needs.matrix.outputs.build-matrix) }}
Expand All @@ -192,7 +208,7 @@ jobs:
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ inputs.REGISTRY }}/${{ inputs.NAMESPACE }}/${{ matrix.images.name }}
images: ${{ inputs.REGISTRY }}/${{ needs.expose-vars.outputs.REGISTRY_NAMESPACE }}/${{ matrix.images.name }}
tags: |
type=raw,value=${{ needs.matrix.outputs.lower-branch }},enable=${{ github.head_ref != 'main' }}
type=raw,value=${{ inputs.TAG }},enable=${{ inputs.TAG != '' }}
Expand All @@ -212,11 +228,11 @@ jobs:
working-directory: /tmp/digests/${{ matrix.images.name }}
run: |
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
$(printf '${{ inputs.REGISTRY }}/${{ inputs.NAMESPACE }}/${{ matrix.images.name }}@sha256:%s ' *)
$(printf '${{ inputs.REGISTRY }}/${{ needs.expose-vars.outputs.REGISTRY_NAMESPACE }}/${{ matrix.images.name }}@sha256:%s ' *)

- name: Inspect image
run: |
docker buildx imagetools inspect ${{ inputs.REGISTRY }}/${{ inputs.NAMESPACE }}/${{ matrix.images.name }}:${{ steps.meta.outputs.version }}
docker buildx imagetools inspect ${{ inputs.REGISTRY }}/${{ needs.expose-vars.outputs.REGISTRY_NAMESPACE }}/${{ matrix.images.name }}:${{ steps.meta.outputs.version }}

preview:
name: Redeploy preview app
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,4 @@ jobs:
env:
GH_TOKEN: ${{ secrets.HELM_CHART_TOKEN }}
run: |
gh workflow --repo cloud-pi-native/helm-charts run update-chart.yaml -f APP_VERSION=${{ needs.release.outputs.major-tag }}.${{ needs.release.outputs.minor-tag }}.${{ needs.release.outputs.patch-tag }} -f CHART_NAME=dso-console
gh workflow --repo ${{ github.repository_owner }}/helm-charts run update-chart.yaml -f APP_VERSION=${{ needs.release.outputs.major-tag }}.${{ needs.release.outputs.minor-tag }}.${{ needs.release.outputs.patch-tag }} -f CHART_NAME=dso-console
23 changes: 19 additions & 4 deletions .github/workflows/scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,30 @@ on:
default: ghcr.io
NAMESPACE:
description: Target namespace to the given registry
required: true
required: false
type: string
default: cloud-pi-native/console
TAG:
description: Tag used to scan images
required: true
type: string
default: latest

jobs:
expose-vars:
runs-on: ubuntu-latest
if: ${{ !github.event.pull_request.draft }}
outputs:
REGISTRY_NAMESPACE: ${{ steps.set-default.outputs.REGISTRY_NAMESPACE }}
steps:
- name: Set Default Repository Name
id: set-default
run: |
REGISTRY_NAMESPACE=${{ inputs.NAMESPACE }}
if [[ -z "$REGISTRY_NAMESPACE" ]]; then
REGISTRY_NAMESPACE="${{ github.repository }}"
fi
echo "REGISTRY_NAMESPACE=$REGISTRY_NAMESPACE" >> $GITHUB_OUTPUT

matrix:
name: Generate matrix
runs-on: ubuntu-latest
Expand All @@ -50,6 +64,7 @@ jobs:
runs-on: ubuntu-latest
needs:
- matrix
- expose-vars
strategy:
matrix:
images: ${{ fromJSON(needs.matrix.outputs.build-matrix) }}
Expand All @@ -60,7 +75,7 @@ jobs:
- name: Run Trivy vulnerability scanner on images
uses: aquasecurity/trivy-action@master
with:
image-ref: "${{ inputs.REGISTRY }}/${{ inputs.NAMESPACE }}/${{ matrix.images.name }}:${{ inputs.TAG }}"
image-ref: "${{ inputs.REGISTRY }}/${{ needs.expose-vars.outputs.REGISTRY_NAMESPACE }}/${{ matrix.images.name }}:${{ inputs.TAG }}"
format: template
template: "@/contrib/sarif.tpl"
vuln-type: "os,library"
Expand All @@ -78,7 +93,7 @@ jobs:
- name: Warn about error
if: failure()
run: |
echo ":warning: The Trivy scan report for image `${{ inputs.REGISTRY }}/${{ inputs.NAMESPACE }}/${{ matrix.images.name }}:${{ inputs.TAG }}` was not successfully completed and could not be uploaded to the Github Security Panel." >> $GITHUB_STEP_SUMMARY
echo ":warning: The Trivy scan report for image `${{ inputs.REGISTRY }}/${{ needs.expose-vars.outputs.REGISTRY_NAMESPACE }}/${{ matrix.images.name }}:${{ inputs.TAG }}` was not successfully completed and could not be uploaded to the Github Security Panel." >> $GITHUB_STEP_SUMMARY

config-scan:
name: Scan config files vulnerabilities
Expand Down
4 changes: 2 additions & 2 deletions ci/scripts/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ if [ "$RUN_E2E_TESTS" == "true" ]; then
npm run kube:e2e-ci -- --cache-dir=.turbo/cache --log-order=stream $BROWSER_ARGS
else
if [[ -n "$TAG" ]]; then
docker pull ghcr.io/cloud-pi-native/console/server:$TAG && docker tag ghcr.io/cloud-pi-native/console/server:$TAG dso-console/server:prod
docker pull ghcr.io/cloud-pi-native/console/client:$TAG && docker tag ghcr.io/cloud-pi-native/console/client:$TAG dso-console/client:prod
docker pull ghcr.io/kontainerizr/console/server:$TAG && docker tag ghcr.io/kontainerizr/console/server:$TAG dso-console/server:prod
docker pull ghcr.io/kontainerizr/console/client:$TAG && docker tag ghcr.io/kontainerizr/console/client:$TAG dso-console/client:prod
fi
npm run docker:e2e-ci -- --cache-dir=.turbo/cache --log-order=stream $BROWSER_ARGS
fi
Expand Down
Loading