diff --git a/.github/workflows/anubis-eval-cd.yaml b/.github/workflows/anubis-eval-cd.yaml deleted file mode 100644 index 740194f..0000000 --- a/.github/workflows/anubis-eval-cd.yaml +++ /dev/null @@ -1,94 +0,0 @@ -name: Anubis - Build Docker image and publish to GitHub Packages - -on: - push: - tags: - - "v*.*.*" - -# branches: -# - develop - - paths: - - "anubis-eval/**" - - ".github/workflows/anubis-eval-cd.yaml" - -# pull_request: -# branches: -# - develop -# -# paths: -# - "anubis-eval/**" -# - ".github/workflows/anubis-eval-cd.yaml" - -env: - REGISTRY: ghcr.io - IMAGE_NAME: anubis-eval - -jobs: - build: - runs-on: ubuntu-latest - defaults: - run: - working-directory: anubis-eval - - steps: - - uses: actions/checkout@v4 - - - name: Run docker-compose - uses: hoverkraft-tech/compose-action@v2.0.1 - with: - compose-file: "./anubis-eval/tests-setup/docker-compose.yaml" - up-flags: "--build -d" - - - name: Setup rust - uses: hecrj/setup-rust-action@v2 - with: - rust-version: '1.72.0' - - - name: Install cargo-nextest - uses: baptiste0928/cargo-install@v3 - with: - crate: cargo-nextest - version: '0.9.64' - locked: true - - - name: Build - run: cargo build --release - - - name: Test - run: cargo nextest run --all-features --profile ci - - deploy: - runs-on: ubuntu-latest - needs: build - - permissions: - contents: read - packages: write - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Log in to the Container registry - uses: docker/login-action@v3 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.TOKEN }} - - - name: Extract metadata (tags, labels) for Docker - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }} - tags: | - type=semver,pattern={{version}} - - - name: Build and push Docker image - uses: docker/build-push-action@v6 - with: - context: anubis-eval - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} diff --git a/.github/workflows/anubis-eval-ci.yaml b/.github/workflows/anubis-eval-ci.yaml new file mode 100644 index 0000000..c5ec8eb --- /dev/null +++ b/.github/workflows/anubis-eval-ci.yaml @@ -0,0 +1,62 @@ +name: Anubis - Build Docker image and publish to GHCR and Docker Hub + +on: + push: + tags: + - "anubis/**" + +env: + NAMESPACE: pantheonix + REPOSITORY: anubis + IMAGE_NAME: anubis-eval + BUILD_CONTEXT: anubis-eval + +jobs: + build: + name: Build and Test Anubis Eval Microservice + runs-on: ubuntu-latest + defaults: + run: + working-directory: anubis-eval + + steps: + - uses: actions/checkout@v4 + + - name: Run docker-compose + uses: hoverkraft-tech/compose-action@v2.0.1 + with: + compose-file: "./anubis-eval/tests-setup/docker-compose.yaml" + up-flags: "--build -d" + + - name: Setup rust + uses: hecrj/setup-rust-action@v2 + with: + rust-version: '1.72.0' + + - name: Install cargo-nextest + uses: baptiste0928/cargo-install@v3 + with: + crate: cargo-nextest + version: '0.9.64' + locked: true + + - name: Build + run: cargo build --release + + - name: Test + run: cargo nextest run --all-features --profile ci + + deploy_to_ghcr: + needs: build + uses: ./.github/workflows/step-deploy-to-ghcr.yaml + with: + image_name: ${{ env.IMAGE_NAME }} + build_context: ${{ env.BUILD_CONTEXT }} + + deploy_to_docker_hub: + needs: build + uses: ./.github/workflows/step-deploy-to-docker-hub.yaml + with: + namespace: ${{ env.NAMESPACE }} + repository: ${{ env.REPOSITORY }} + build_context: ${{ env.BUILD_CONTEXT }} diff --git a/.github/workflows/dapr-config-ci.yaml b/.github/workflows/dapr-config-ci.yaml new file mode 100644 index 0000000..d656457 --- /dev/null +++ b/.github/workflows/dapr-config-ci.yaml @@ -0,0 +1,26 @@ +name: Dapr - Build Docker image and publish to GHCR and Docker Hub + +on: + push: + tags: + - "dapr/**" + +env: + NAMESPACE: pantheonix + REPOSITORY: asgard-dapr + IMAGE_NAME: asgard-dapr-config + BUILD_CONTEXT: dapr + +jobs: + deploy_to_ghcr: + uses: ./.github/workflows/step-deploy-to-ghcr.yaml + with: + image_name: ${{ env.IMAGE_NAME }} + build_context: ${{ env.BUILD_CONTEXT }} + + deploy_to_docker_hub: + uses: ./.github/workflows/step-deploy-to-docker-hub.yaml + with: + namespace: ${{ env.NAMESPACE }} + repository: ${{ env.REPOSITORY }} + build_context: ${{ env.BUILD_CONTEXT }} \ No newline at end of file diff --git a/.github/workflows/dapr-config.yaml b/.github/workflows/dapr-config.yaml deleted file mode 100644 index 21f18d3..0000000 --- a/.github/workflows/dapr-config.yaml +++ /dev/null @@ -1,60 +0,0 @@ -name: Dapr - Build Docker image and publish to GitHub Packages - -on: - push: - tags: - - "v*.*.*" - -# branches: -# - develop - - paths: - - "dapr/**" - - ".github/workflows/dapr-config.yaml" - -# pull_request: -# branches: -# - develop -# -# paths: -# - "dapr-config/**" -# - ".github/workflows/dapr-config.yaml" - -env: - REGISTRY: ghcr.io - IMAGE_NAME: asgard-dapr-config - -jobs: - build: - runs-on: ubuntu-latest - - permissions: - contents: read - packages: write - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Log in to the Container registry - uses: docker/login-action@v3 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.TOKEN }} - - - name: Extract metadata (tags, labels) for Docker - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }} - tags: | - type=semver,pattern={{version}} - - - name: Build and push Docker image - uses: docker/build-push-action@v5 - with: - context: dapr - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} diff --git a/.github/workflows/enki-problems-cd.yaml b/.github/workflows/enki-problems-cd.yaml deleted file mode 100644 index 685b2b0..0000000 --- a/.github/workflows/enki-problems-cd.yaml +++ /dev/null @@ -1,81 +0,0 @@ -name: Enki - Build Docker image and publish to GitHub Packages - -on: - push: - tags: - - "v*.*.*" - -# branches: -# - develop - - paths: - - "enki-problems/**" - - ".github/workflows/enki-problems-cd.yaml" - -# pull_request: -# branches: -# - develop -# -# paths: -# - "enki-problems/**" -# - ".github/workflows/enki-problems-cd.yaml" - -env: - REGISTRY: ghcr.io - IMAGE_NAME: enki-problems - -jobs: - build: - runs-on: ubuntu-latest - defaults: - run: - working-directory: enki-problems - - steps: - - uses: actions/checkout@v4 - - name: Setup dotnet - uses: actions/setup-dotnet@v4 - with: - dotnet-version: '7.0.x' - - name: Build - run: | - dotnet restore "src/EnkiProblems.HttpApi.Host/EnkiProblems.HttpApi.Host.csproj" - dotnet restore "test/EnkiProblems.Application.Tests/EnkiProblems.Application.Tests.csproj" - dotnet build --no-restore - - name: Test - run: dotnet test -e DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false - - deploy: - runs-on: ubuntu-latest - needs: build - - permissions: - contents: read - packages: write - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Log in to the Container registry - uses: docker/login-action@v3 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.TOKEN }} - - - name: Extract metadata (tags, labels) for Docker - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }} - tags: | - type=semver,pattern={{version}} - - - name: Build and push Docker image - uses: docker/build-push-action@v6 - with: - context: enki-problems - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} diff --git a/.github/workflows/enki-problems-ci.yaml b/.github/workflows/enki-problems-ci.yaml new file mode 100644 index 0000000..7d5d0ed --- /dev/null +++ b/.github/workflows/enki-problems-ci.yaml @@ -0,0 +1,49 @@ +name: Enki - Build Docker image and publish to GHCR and Docker Hub + +on: + push: + tags: + - "enki/**" + +env: + NAMESPACE: pantheonix + REPOSITORY: enki + IMAGE_NAME: enki-problems + BUILD_CONTEXT: enki-problems + +jobs: + build: + name: Build and Test Enki Problems Microservice + runs-on: ubuntu-latest + defaults: + run: + working-directory: enki-problems + + steps: + - uses: actions/checkout@v4 + - name: Setup dotnet + uses: actions/setup-dotnet@v4 + with: + dotnet-version: '7.0.x' + - name: Build + run: | + dotnet restore "src/EnkiProblems.HttpApi.Host/EnkiProblems.HttpApi.Host.csproj" + dotnet restore "test/EnkiProblems.Application.Tests/EnkiProblems.Application.Tests.csproj" + dotnet build --no-restore + - name: Test + run: dotnet test -e DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false + + deploy_to_ghcr: + needs: build + uses: ./.github/workflows/step-deploy-to-ghcr.yaml + with: + image_name: ${{ env.IMAGE_NAME }} + build_context: ${{ env.BUILD_CONTEXT }} + + deploy_to_docker_hub: + needs: build + uses: ./.github/workflows/step-deploy-to-docker-hub.yaml + with: + namespace: ${{ env.NAMESPACE }} + repository: ${{ env.REPOSITORY }} + build_context: ${{ env.BUILD_CONTEXT }} diff --git a/.github/workflows/eval-lb-ci.yaml b/.github/workflows/eval-lb-ci.yaml new file mode 100644 index 0000000..1d184d0 --- /dev/null +++ b/.github/workflows/eval-lb-ci.yaml @@ -0,0 +1,26 @@ +name: Eval Nginx Load Balancer - Build Docker image and publish to GHCR and Docker Hub + +on: + push: + tags: + - "eval-lb/**" + +env: + NAMESPACE: pantheonix + REPOSITORY: eval-lb + IMAGE_NAME: asgard-eval-lb + BUILD_CONTEXT: anubis-eval/eval-lb + +jobs: + deploy_to_ghcr: + uses: ./.github/workflows/step-deploy-to-ghcr.yaml + with: + image_name: ${{ env.IMAGE_NAME }} + build_context: ${{ env.BUILD_CONTEXT }} + + deploy_to_docker_hub: + uses: ./.github/workflows/step-deploy-to-docker-hub.yaml + with: + namespace: ${{ env.NAMESPACE }} + repository: ${{ env.REPOSITORY }} + build_context: ${{ env.BUILD_CONTEXT }} diff --git a/.github/workflows/eval-lb.yaml b/.github/workflows/eval-lb.yaml deleted file mode 100644 index 58ca852..0000000 --- a/.github/workflows/eval-lb.yaml +++ /dev/null @@ -1,60 +0,0 @@ -name: Eval Nginx Load Balancer - Build Docker image and publish to GitHub Packages - -on: - push: - tags: - - "v*.*.*" - -# branches: -# - develop - - paths: - - "anubis-eval/eval-lb/**" - - ".github/workflows/eval-lb.yaml" - -# pull_request: -# branches: -# - develop -# -# paths: -# - "anubis-eval/eval-lb/**" -# - ".github/workflows/eval-lb.yaml" - -env: - REGISTRY: ghcr.io - IMAGE_NAME: asgard-eval-lb - -jobs: - build: - runs-on: ubuntu-latest - - permissions: - contents: read - packages: write - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Log in to the Container registry - uses: docker/login-action@v3 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.TOKEN }} - - - name: Extract metadata (tags, labels) for Docker - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }} - tags: | - type=semver,pattern={{version}} - - - name: Build and push Docker image - uses: docker/build-push-action@v5 - with: - context: anubis-eval/eval-lb - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} diff --git a/.github/workflows/hermes-tests-cd.yaml b/.github/workflows/hermes-tests-cd.yaml deleted file mode 100644 index 2f5dd99..0000000 --- a/.github/workflows/hermes-tests-cd.yaml +++ /dev/null @@ -1,87 +0,0 @@ -name: Hermes - Build Docker image and publish to GitHub Packages - -on: - push: - tags: - - "v*.*.*" - -# branches: -# - develop - - paths: - - "hermes-tests/**" - - ".github/workflows/hermes-tests-cd.yaml" - -# pull_request: -# branches: -# - develop -# -# paths: -# - "hermes-tests/**" -# - ".github/workflows/hermes-tests-cd.yaml" - -env: - REGISTRY: ghcr.io - IMAGE_NAME: hermes-tests - HERMES_CONFIG: ${{ secrets.HERMES_CONFIG }} - -jobs: - build: - runs-on: ubuntu-latest - defaults: - run: - working-directory: hermes-tests - - steps: - - uses: actions/checkout@v4 - - - name: Setup dart - uses: dart-lang/setup-dart@v1 - with: - sdk: 2.19.2 - - - name: Create logs/test.log file - run: | - mkdir -p logs - touch logs/test.log - - - name: Get dependencies - run: dart pub get - - - name: Test - run: dart test - - deploy: - runs-on: ubuntu-latest - needs: build - - permissions: - contents: read - packages: write - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Log in to the Container registry - uses: docker/login-action@v3 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.TOKEN }} - - - name: Extract metadata (tags, labels) for Docker - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }} - tags: | - type=semver,pattern={{version}} - - - name: Build and push Docker image - uses: docker/build-push-action@v6 - with: - context: hermes-tests - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} diff --git a/.github/workflows/hermes-tests-ci.yaml b/.github/workflows/hermes-tests-ci.yaml new file mode 100644 index 0000000..2ae8c98 --- /dev/null +++ b/.github/workflows/hermes-tests-ci.yaml @@ -0,0 +1,55 @@ +name: Hermes - Build Docker image and publish to GHCR and Docker Hub + +on: + push: + tags: + - "hermes/**" + +env: + NAMESPACE: pantheonix + REPOSITORY: hermes + IMAGE_NAME: hermes-tests + BUILD_CONTEXT: hermes-tests + HERMES_CONFIG: ${{ secrets.HERMES_CONFIG }} + +jobs: + build: + name: Build and Test Hermes Tests Microservice + runs-on: ubuntu-latest + defaults: + run: + working-directory: hermes-tests + + steps: + - uses: actions/checkout@v4 + + - name: Setup dart + uses: dart-lang/setup-dart@v1 + with: + sdk: 2.19.2 + + - name: Create logs/test.log file + run: | + mkdir -p logs + touch logs/test.log + + - name: Get dependencies + run: dart pub get + + - name: Test + run: dart test + + deploy_to_ghcr: + needs: build + uses: ./.github/workflows/step-deploy-to-ghcr.yaml + with: + image_name: ${{ env.IMAGE_NAME }} + build_context: ${{ env.BUILD_CONTEXT }} + + deploy_to_docker_hub: + needs: build + uses: ./.github/workflows/step-deploy-to-docker-hub.yaml + with: + namespace: ${{ env.NAMESPACE }} + repository: ${{ env.REPOSITORY }} + build_context: ${{ env.BUILD_CONTEXT }} diff --git a/.github/workflows/hermes-tests-pr-verify.yaml b/.github/workflows/hermes-tests-pr-verify.yaml index fbf5cd8..c1fcefd 100644 --- a/.github/workflows/hermes-tests-pr-verify.yaml +++ b/.github/workflows/hermes-tests-pr-verify.yaml @@ -36,4 +36,4 @@ jobs: run: dart pub get - name: Test - run: dart test + run: dart test \ No newline at end of file diff --git a/.github/workflows/odin-gateway-ci.yaml b/.github/workflows/odin-gateway-ci.yaml new file mode 100644 index 0000000..91d4c8b --- /dev/null +++ b/.github/workflows/odin-gateway-ci.yaml @@ -0,0 +1,27 @@ +name: Odin - Build Docker image and publish to GHCR and Docker Hub + +on: + push: + tags: + - "odin/**" + +env: + NAMESPACE: pantheonix + REPOSITORY: odin + IMAGE_NAME: odin-api-gateway + BUILD_CONTEXT: odin-gateway + +jobs: + deploy_to_ghcr: + uses: ./.github/workflows/step-deploy-to-ghcr.yaml + with: + image_name: ${{ env.IMAGE_NAME }} + build_context: ${{ env.BUILD_CONTEXT }} + + deploy_to_docker_hub: + uses: ./.github/workflows/step-deploy-to-docker-hub.yaml + with: + namespace: ${{ env.NAMESPACE }} + repository: ${{ env.REPOSITORY }} + build_context: ${{ env.BUILD_CONTEXT }} + diff --git a/.github/workflows/odin-gateway.yaml b/.github/workflows/odin-gateway.yaml deleted file mode 100644 index f2414bf..0000000 --- a/.github/workflows/odin-gateway.yaml +++ /dev/null @@ -1,60 +0,0 @@ -name: Odin - Build Docker image and publish to GitHub Packages - -on: - push: - tags: - - "v*.*.*" - -# branches: -# - develop - - paths: - - "odin-gateway/**" - - ".github/workflows/odin-gateway.yaml" - -# pull_request: -# branches: -# - develop -# -# paths: -# - "odin-gateway/**" -# - ".github/workflows/odin-gateway.yaml" - -env: - REGISTRY: ghcr.io - IMAGE_NAME: odin-api-gateway - -jobs: - build: - runs-on: ubuntu-latest - - permissions: - contents: read - packages: write - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Log in to the Container registry - uses: docker/login-action@v3 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.TOKEN }} - - - name: Extract metadata (tags, labels) for Docker - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }} - tags: | - type=semver,pattern={{version}} - - - name: Build and push Docker image - uses: docker/build-push-action@v5 - with: - context: odin-gateway - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} diff --git a/.github/workflows/quetzalcoatl-auth-cd.yaml b/.github/workflows/quetzalcoatl-auth-cd.yaml deleted file mode 100644 index 01af917..0000000 --- a/.github/workflows/quetzalcoatl-auth-cd.yaml +++ /dev/null @@ -1,81 +0,0 @@ -name: Quetzalcoatl - Build Docker image and publish to GitHub Packages - -on: - push: - tags: - - "v*.*.*" - -# branches: -# - develop - - paths: - - "quetzalcoatl-auth/**" - - ".github/workflows/quetzalcoatl-auth-cd.yaml" - -# pull_request: -# branches: -# - develop -# -# paths: -# - "quetzalcoatl-auth/**" -# - ".github/workflows/quetzalcoatl-auth-cd.yaml" - -env: - REGISTRY: ghcr.io - IMAGE_NAME: quetzalcoatl-auth - -jobs: - build: - runs-on: ubuntu-latest - defaults: - run: - working-directory: quetzalcoatl-auth - - steps: - - uses: actions/checkout@v4 - - name: Setup dotnet - uses: actions/setup-dotnet@v4 - with: - dotnet-version: '7.0.x' - - name: Build - run: | - dotnet restore "Bootstrapper/Bootstrapper.csproj" - dotnet restore "Tests.Integration/Tests.Integration.csproj" - dotnet build --no-restore - - name: Test - run: dotnet test -e ASPNETCORE_ENVIRONMENT=Testing "Tests.Integration/Tests.Integration.csproj" - - deploy: - runs-on: ubuntu-latest - needs: build - - permissions: - contents: read - packages: write - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Log in to the Container registry - uses: docker/login-action@v3 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.TOKEN }} - - - name: Extract metadata (tags, labels) for Docker - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }} - tags: | - type=semver,pattern={{version}} - - - name: Build and push Docker image - uses: docker/build-push-action@v6 - with: - context: quetzalcoatl-auth - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} diff --git a/.github/workflows/quetzalcoatl-auth-ci.yaml b/.github/workflows/quetzalcoatl-auth-ci.yaml new file mode 100644 index 0000000..f6f72c0 --- /dev/null +++ b/.github/workflows/quetzalcoatl-auth-ci.yaml @@ -0,0 +1,49 @@ +name: Quetzalcoatl - Build Docker image and publish to GHCR and Docker Hub + +on: + push: + tags: + - "quetzalcoatl/**" + +env: + NAMESPACE: pantheonix + REPOSITORY: quetzalcoatl + IMAGE_NAME: quetzalcoatl-auth + BUILD_CONTEXT: quetzalcoatl-auth + +jobs: + build: + name: Build and Test Quetzalcoatl Auth Microservice + runs-on: ubuntu-latest + defaults: + run: + working-directory: quetzalcoatl-auth + + steps: + - uses: actions/checkout@v4 + - name: Setup dotnet + uses: actions/setup-dotnet@v4 + with: + dotnet-version: '7.0.x' + - name: Build + run: | + dotnet restore "Bootstrapper/Bootstrapper.csproj" + dotnet restore "Tests.Integration/Tests.Integration.csproj" + dotnet build --no-restore + - name: Test + run: dotnet test -e ASPNETCORE_ENVIRONMENT=Testing "Tests.Integration/Tests.Integration.csproj" + + deploy_to_ghcr: + needs: build + uses: ./.github/workflows/step-deploy-to-ghcr.yaml + with: + image_name: ${{ env.IMAGE_NAME }} + build_context: ${{ env.BUILD_CONTEXT }} + + deploy_to_docker_hub: + needs: build + uses: ./.github/workflows/step-deploy-to-docker-hub.yaml + with: + namespace: ${{ env.NAMESPACE }} + repository: ${{ env.REPOSITORY }} + build_context: ${{ env.BUILD_CONTEXT }}