diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 00000000..bd006cbe --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,86 @@ +name: CI Docker + +on: + push: + branches: + - 'main' + tags: + - 'v[0-9]+' + pull_request: + paths: + - docker-compose/** + - k8s/resources/**/config/** + +env: + GRIDSUITE_DATABASES: /tmp/gs_db + +jobs: + verify_docker: + runs-on: ubuntu-latest + defaults: + run: + working-directory: docker-compose + steps: + - id: checkout + name: Checkout sources + uses: actions/checkout@v4 + with: + sparse-checkout: | + .github + docker-compose + k8s + #- name: Install buildx + # uses: docker/setup-buildx-action@v3 + # with: + # version: v0.9.1 # Buildx version + - name: mkdir + run: mkdir -v ./build + - name: Debug version + run: docker version --format '{{json .}}' | jq | tee ./build/docker_version.json + - name: List Docker compose profiles + working-directory: docker-compose/explicit-profiles + run: docker compose config --profiles | tee ../build/docker-compose-profiles.txt + - name: List Docker compose environment + working-directory: docker-compose/explicit-profiles + run: docker compose config --environment | tee ../build/docker-compose-environment.yml + - name: List Docker compose variables + working-directory: docker-compose/explicit-profiles + run: docker compose config --variables | tee ../build/docker-compose-variables.yml + - name: List Docker compose volumes + working-directory: docker-compose/explicit-profiles + run: docker compose config --volumes | tee ../build/docker-compose-volumes.txt + - name: List Docker compose services + working-directory: docker-compose/explicit-profiles + run: docker compose --profile all config --services | tee ../build/docker-compose-services.txt + - name: Build Docker compose for no profile + working-directory: docker-compose/explicit-profiles + run: docker compose config --output ../build/docker-compose.yml + - name: Build Docker compose for each profiles + working-directory: docker-compose/explicit-profiles + run: docker compose config --profiles | xargs -t -L 1 -I{} docker compose --profile {} config --output ../build/docker-compose.{}.yml + #- name: Verify Docker compose images + # working-directory: docker-compose/explicit-profiles + # run: docker compose --profile all config --resolve-image-digests --output ../build/docker-compose_digest.yml + - name: Build old docker-compose dynamic-mapping + working-directory: docker-compose/dynamic-mapping + run: docker compose config --output ../build/dynamic-mapping.yml + - name: Build old docker-compose merging + working-directory: docker-compose/merging + run: docker compose config --output ../build/merging.yml + - name: Build old docker-compose study + working-directory: docker-compose/study + run: docker compose config --output ../build/study.yml + - name: Build old docker-compose suite + working-directory: docker-compose/suite + run: docker compose config --output ../build/suite.yml + - name: Build old docker-compose technical + working-directory: docker-compose/technical + run: docker compose config --output ../build/technical.yml + - id: upload-artifacts + name: Save builds + uses: actions/upload-artifact@v4 + with: + name: docker_builds + path: docker-compose/build/* + compression-level: 9 + if-no-files-found: error diff --git a/.github/workflows/k8s.yml b/.github/workflows/k8s.yml new file mode 100644 index 00000000..970f94f3 --- /dev/null +++ b/.github/workflows/k8s.yml @@ -0,0 +1,52 @@ +name: CI k8s + +on: + push: + branches: + - 'main' + tags: + - 'v[0-9]+' + pull_request: + paths: + - k8s/** + +jobs: + verify_k8s: + runs-on: ubuntu-latest + steps: + - id: install + name: Set up kubectl + uses: azure/setup-kubectl@v4 + with: + version: latest + - id: checkout + name: Checkout sources + uses: actions/checkout@v4 + with: + sparse-checkout: | + .github + k8s + - name: mkdir + run: mkdir -v ./build + - name: Debug version + run: kubectl version --client=true --output=json | tee ./build/kubectl_version.json + - id: bake-local + name: Bake manifest of local + #uses: azure/k8s-bake@v3 + run: kubectl kustomize ./k8s/live/local/ -o build/k8s-local.yml + - id: bake-azure-dev + name: Bake manifest of azure-dev + run: kubectl kustomize ./k8s/live/azure-dev/ -o build/k8s-azure-dev.yml + - id: bake-azure-integ + name: Bake manifest of azure-integ + run: kubectl kustomize ./k8s/live/azure-integ/ -o build/k8s-azure-integ.yml + # https://github.com/actions/upload-artifact/issues/3#issuecomment-620722206 + # Until k8s not let us download files undividually, we upload all builds in one go + - id: upload-artifacts + name: Save builds + uses: actions/upload-artifact@v4 + with: + name: kustomize_builds + path: build/* + compression-level: 9 + if-no-files-found: error