From 7a789ad0d03f6936fef2fdd1fa0d18057da7b5d6 Mon Sep 17 00:00:00 2001 From: Mahendra Date: Wed, 3 Apr 2024 10:41:41 +0530 Subject: [PATCH] feat: added oci release flow (#7) --- .github/workflows/ci.yml | 67 +++++++++++++++ .github/workflows/release.yml | 81 +++++++++++++++++++ .../.github}/workflows/ci.yml.tmpl | 0 .../.github}/workflows/release.yml.tmpl | 0 Dockerfile.tmpl => code/Dockerfile.tmpl | 0 .../Application/Application.csproj.tmpl | 0 .../CreateResourceNameCommand.cs.tmpl | 0 .../DeleteResourceNameCommand.cs.tmpl | 0 .../UpdateResourceNameCommand.cs.tmpl | 0 .../ResourceNameNotFoundException.cs.tmpl | 0 .../Extensions/ServiceRegistration.cs.tmpl | 0 .../CreateResourceNameCommandHandler.cs.tmpl | 0 .../DeleteResourceNameCommandHandler.cs.tmpl | 0 .../GetAllResourceNamesQueryHandler.cs.tmpl | 0 .../GetResourceNameByIdQueryHandler.cs.tmpl | 0 .../UpdateResourceNameCommandHandler.cs.tmpl | 0 .../Mappers/MappingProfile.cs.tmpl | 0 .../GetAllResourceNamesQuery.cs.tmpl | 0 .../GetResourceNameByIdQuery.cs.tmpl | 0 .../Responses/ResourceNameResponse.cs.tmpl | 0 .../Core/Common/EntityBase.cs.tmpl | 0 .../Core/Core.csproj.tmpl | 0 .../Core/Entities/ResourceName.cs.tmpl | 0 .../Repositories/IAsyncRepository.cs.tmpl | 0 .../IResourceNameRepository.cs.tmpl | 0 .../Data/DatabaseContext.cs.tmpl | 0 .../Data/DatabaseContextFactory.cs.tmpl | 0 .../OpenTelemetryRegistration.cs.tmpl | 0 .../ServicesCollectionExtensions.cs.tmpl | 0 .../Infrastructure/Infrastructure.csproj.tmpl | 0 .../Repositories/RepositoryBase.cs.tmpl | 0 .../ResourceNameRepository.cs.tmpl | 0 .../MicroServiceName.sln.tmpl | 0 .../ResourceNameServiceController.cs.tmpl | 0 .../MicroServiceName.csproj.tmpl | 0 .../MicroServiceName.csproj.user.tmpl | 0 .../MicroServiceName/Program.cs.tmpl | 0 .../Properties/launchSettings.json.tmpl | 0 .../appsettings.Development.json.tmpl | 0 .../MicroServiceName/appsettings.json.tmpl | 0 .../Application.Tests.csproj.tmpl | 0 .../Application.Tests/GlobalUsings.cs.tmpl | 0 ...ateResourceNameCommandHandlerTests.cs.tmpl | 0 ...eteResourceNameCommandHandlerTests.cs.tmpl | 0 ...tAllResourceNamesQueryHandlerTests.cs.tmpl | 0 ...tResourceNameByIdQueryHandlerTests.cs.tmpl | 0 ...ateResourceNameCommandHandlerTests.cs.tmpl | 0 .../kubernetes}/deployment.yaml.tmpl | 0 .../kubernetes}/service.yaml.tmpl | 0 49 files changed, 148 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/release.yml rename {.github => code/.github}/workflows/ci.yml.tmpl (100%) rename {.github => code/.github}/workflows/release.yml.tmpl (100%) rename Dockerfile.tmpl => code/Dockerfile.tmpl (100%) rename {frameworks => code/frameworks}/dotnet-clean-architecture/Application/Application.csproj.tmpl (100%) rename {frameworks => code/frameworks}/dotnet-clean-architecture/Application/Commands/ResourceNameService/CreateResourceNameCommand.cs.tmpl (100%) rename {frameworks => code/frameworks}/dotnet-clean-architecture/Application/Commands/ResourceNameService/DeleteResourceNameCommand.cs.tmpl (100%) rename {frameworks => code/frameworks}/dotnet-clean-architecture/Application/Commands/ResourceNameService/UpdateResourceNameCommand.cs.tmpl (100%) rename {frameworks => code/frameworks}/dotnet-clean-architecture/Application/Exceptions/ResourceNameNotFoundException.cs.tmpl (100%) rename {frameworks => code/frameworks}/dotnet-clean-architecture/Application/Extensions/ServiceRegistration.cs.tmpl (100%) rename {frameworks => code/frameworks}/dotnet-clean-architecture/Application/Handlers/ResourceNameService/CreateResourceNameCommandHandler.cs.tmpl (100%) rename {frameworks => code/frameworks}/dotnet-clean-architecture/Application/Handlers/ResourceNameService/DeleteResourceNameCommandHandler.cs.tmpl (100%) rename {frameworks => code/frameworks}/dotnet-clean-architecture/Application/Handlers/ResourceNameService/GetAllResourceNamesQueryHandler.cs.tmpl (100%) rename {frameworks => code/frameworks}/dotnet-clean-architecture/Application/Handlers/ResourceNameService/GetResourceNameByIdQueryHandler.cs.tmpl (100%) rename {frameworks => code/frameworks}/dotnet-clean-architecture/Application/Handlers/ResourceNameService/UpdateResourceNameCommandHandler.cs.tmpl (100%) rename {frameworks => code/frameworks}/dotnet-clean-architecture/Application/Mappers/MappingProfile.cs.tmpl (100%) rename {frameworks => code/frameworks}/dotnet-clean-architecture/Application/Queries/ResourceNameService/GetAllResourceNamesQuery.cs.tmpl (100%) rename {frameworks => code/frameworks}/dotnet-clean-architecture/Application/Queries/ResourceNameService/GetResourceNameByIdQuery.cs.tmpl (100%) rename {frameworks => code/frameworks}/dotnet-clean-architecture/Application/Responses/ResourceNameResponse.cs.tmpl (100%) rename {frameworks => code/frameworks}/dotnet-clean-architecture/Core/Common/EntityBase.cs.tmpl (100%) rename {frameworks => code/frameworks}/dotnet-clean-architecture/Core/Core.csproj.tmpl (100%) rename {frameworks => code/frameworks}/dotnet-clean-architecture/Core/Entities/ResourceName.cs.tmpl (100%) rename {frameworks => code/frameworks}/dotnet-clean-architecture/Core/Repositories/IAsyncRepository.cs.tmpl (100%) rename {frameworks => code/frameworks}/dotnet-clean-architecture/Core/Repositories/IResourceNameRepository.cs.tmpl (100%) rename {frameworks => code/frameworks}/dotnet-clean-architecture/Infrastructure/Data/DatabaseContext.cs.tmpl (100%) rename {frameworks => code/frameworks}/dotnet-clean-architecture/Infrastructure/Data/DatabaseContextFactory.cs.tmpl (100%) rename {frameworks => code/frameworks}/dotnet-clean-architecture/Infrastructure/Extensions/OpenTelemetryRegistration.cs.tmpl (100%) rename {frameworks => code/frameworks}/dotnet-clean-architecture/Infrastructure/Extensions/ServicesCollectionExtensions.cs.tmpl (100%) rename {frameworks => code/frameworks}/dotnet-clean-architecture/Infrastructure/Infrastructure.csproj.tmpl (100%) rename {frameworks => code/frameworks}/dotnet-clean-architecture/Infrastructure/Repositories/RepositoryBase.cs.tmpl (100%) rename {frameworks => code/frameworks}/dotnet-clean-architecture/Infrastructure/Repositories/ResourceNameRepository.cs.tmpl (100%) rename {frameworks => code/frameworks}/dotnet-clean-architecture/MicroServiceName.sln.tmpl (100%) rename {frameworks => code/frameworks}/dotnet-clean-architecture/MicroServiceName/Controllers/ResourceNameServiceController.cs.tmpl (100%) rename {frameworks => code/frameworks}/dotnet-clean-architecture/MicroServiceName/MicroServiceName.csproj.tmpl (100%) rename {frameworks => code/frameworks}/dotnet-clean-architecture/MicroServiceName/MicroServiceName.csproj.user.tmpl (100%) rename {frameworks => code/frameworks}/dotnet-clean-architecture/MicroServiceName/Program.cs.tmpl (100%) rename {frameworks => code/frameworks}/dotnet-clean-architecture/MicroServiceName/Properties/launchSettings.json.tmpl (100%) rename {frameworks => code/frameworks}/dotnet-clean-architecture/MicroServiceName/appsettings.Development.json.tmpl (100%) rename {frameworks => code/frameworks}/dotnet-clean-architecture/MicroServiceName/appsettings.json.tmpl (100%) rename {frameworks => code/frameworks}/dotnet-clean-architecture/Tests/Application.Tests/Application.Tests.csproj.tmpl (100%) rename {frameworks => code/frameworks}/dotnet-clean-architecture/Tests/Application.Tests/GlobalUsings.cs.tmpl (100%) rename {frameworks => code/frameworks}/dotnet-clean-architecture/Tests/Application.Tests/Handlers/ResourceNameService/CreateResourceNameCommandHandlerTests.cs.tmpl (100%) rename {frameworks => code/frameworks}/dotnet-clean-architecture/Tests/Application.Tests/Handlers/ResourceNameService/DeleteResourceNameCommandHandlerTests.cs.tmpl (100%) rename {frameworks => code/frameworks}/dotnet-clean-architecture/Tests/Application.Tests/Handlers/ResourceNameService/GetAllResourceNamesQueryHandlerTests.cs.tmpl (100%) rename {frameworks => code/frameworks}/dotnet-clean-architecture/Tests/Application.Tests/Handlers/ResourceNameService/GetResourceNameByIdQueryHandlerTests.cs.tmpl (100%) rename {frameworks => code/frameworks}/dotnet-clean-architecture/Tests/Application.Tests/Handlers/ResourceNameService/UpdateResourceNameCommandHandlerTests.cs.tmpl (100%) rename {kubernetes => code/kubernetes}/deployment.yaml.tmpl (100%) rename {kubernetes => code/kubernetes}/service.yaml.tmpl (100%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..60fa2b1 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,67 @@ +name: compage-template-dotnet-ci +on: + push: + branches: + - main +jobs: + build-and-push: + permissions: + id-token: write # Required for keyless signing + contents: read + runs-on: ubuntu-latest + env: + REGISTRY: ghcr.io + GH_URL: https://github.com + steps: + - name: Check out the repo + uses: actions/checkout@v4 + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GH_TOKEN }} + - name: Create JSON file + run: | + cat < /tmp/annotations.json + { + "\$manifest": { + "org.opencontainers.image.authors": "${{ github.actor }}", + "org.opencontainers.image.url": "${{ env.REGISTRY }}/${{ github.repository }}", + "org.opencontainers.image.source": "https://github.com/intelops/compage-template-dotnet", + "org.opencontainers.image.version": "${{ github.run_id }}", + "org.opencontainers.image.vendor": "Intelops Inc.", + "org.opencontainers.image.licenses": "Apache License Version 2.0", + "org.opencontainers.image.title": "compage-template-dotnet", + "org.opencontainers.image.description": "The compage-template-dotnet template has templates for Dotnet" + } + } + EOF + - uses: oras-project/setup-oras@v1 + with: + version: 1.1.0 + - run: | + oras push --annotation-file /tmp/annotations.json ${{ env.REGISTRY }}/${{ github.repository }}:${{ github.run_id }} ./:application/vnd.compage.template.go.layer.v1+tar + + - name: Install Cosign + uses: sigstore/cosign-installer@v3.3.0 + - name: Check install! + run: cosign version + - name: Sign the images + run: | + cosign sign -y ${{ env.REGISTRY }}/${{ github.repository }}:${{ github.run_id }} + env: + COSIGN_EXPERIMENTAL: 1 + - name: Verify the pushed tags + run: | + cosign verify ${{ env.REGISTRY }}/${{ github.repository }}:${{ github.run_id }} --certificate-identity ${{ env.GH_URL }}/${{ github.repository }}/.github/workflows/ci.yml@refs/heads/main --certificate-oidc-issuer https://token.actions.githubusercontent.com + env: + COSIGN_EXPERIMENTAL: 1 + - name: Run Trivy in GitHub SBOM mode and submit results to Dependency Graph + uses: aquasecurity/trivy-action@master + with: + scan-type: 'fs' + format: 'github' + output: 'dependency-results.sbom.json' + image-ref: '.' + github-pat: ${{ secrets.GH_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..8492610 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,81 @@ +name: compage-template-dotnet-release +on: + push: + tags: + - "v*.*.*" +permissions: + contents: write # needed to write releases + id-token: write # needed for keyless signing + packages: write # needed for ghcr access + +jobs: + push_to_registry: + name: Build and push oci image to github container registry. + runs-on: ubuntu-20.04 + permissions: + packages: write + id-token: write + contents: read + actions: read + security-events: write + env: + REGISTRY: ghcr.io + GH_URL: https://github.com + steps: + - name: Set environment variable + run: | + echo "RELEASE_VERSION=${GITHUB_REF:10}" >> $GITHUB_ENV + - name: Test environment variable + run: echo ${{ env.RELEASE_VERSION }} + - name: Check out the repo + uses: actions/checkout@v4 + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GH_TOKEN }} + - name: Create JSON file + run: | + cat < /tmp/annotations.json + { + "\$manifest": { + "org.opencontainers.image.authors": "${{ github.actor }}", + "org.opencontainers.image.url": "${{ env.REGISTRY }}/${{ github.repository }}", + "org.opencontainers.image.source": "https://github.com/intelops/compage-template-dotnet", + "org.opencontainers.image.version": "${{ github.run_id }}", + "org.opencontainers.image.vendor": "Intelops Inc.", + "org.opencontainers.image.licenses": "Apache License Version 2.0", + "org.opencontainers.image.title": "compage-template-dotnet", + "org.opencontainers.image.description": "The compage-template-dotnet template has templates for Dotnet" + } + } + EOF + - uses: oras-project/setup-oras@v1 + with: + version: 1.1.0 + - run: | + oras push --annotation-file /tmp/annotations.json ${{ env.REGISTRY }}/${{ github.repository }}:${{ env.RELEASE_VERSION }} ./:application/vnd.compage.template.go.layer.v1+tar + + - name: Install Cosign + uses: sigstore/cosign-installer@v3.3.0 + - name: Check install! + run: cosign version + - name: Sign the images + run: | + cosign sign -y ${{ env.REGISTRY }}/${{ github.repository }}:${{ env.RELEASE_VERSION }} + env: + COSIGN_EXPERIMENTAL: 1 + - name: Verify the pushed tags + run: | + cosign verify ${{ env.REGISTRY }}/${{ github.repository }}:${{ env.RELEASE_VERSION }} --certificate-identity ${{ env.GH_URL }}/${{ github.repository }}/.github/workflows/release.yml@refs/tags/${{ env.RELEASE_VERSION }} --certificate-oidc-issuer https://token.actions.githubusercontent.com + env: + COSIGN_EXPERIMENTAL: 1 + - name: Run Trivy in GitHub SBOM mode and submit results to Dependency Graph + uses: aquasecurity/trivy-action@master + with: + scan-type: 'fs' + format: 'github' + output: 'dependency-results.sbom.json' + image-ref: '.' + github-pat: ${{ secrets.GH_TOKEN }} diff --git a/.github/workflows/ci.yml.tmpl b/code/.github/workflows/ci.yml.tmpl similarity index 100% rename from .github/workflows/ci.yml.tmpl rename to code/.github/workflows/ci.yml.tmpl diff --git a/.github/workflows/release.yml.tmpl b/code/.github/workflows/release.yml.tmpl similarity index 100% rename from .github/workflows/release.yml.tmpl rename to code/.github/workflows/release.yml.tmpl diff --git a/Dockerfile.tmpl b/code/Dockerfile.tmpl similarity index 100% rename from Dockerfile.tmpl rename to code/Dockerfile.tmpl diff --git a/frameworks/dotnet-clean-architecture/Application/Application.csproj.tmpl b/code/frameworks/dotnet-clean-architecture/Application/Application.csproj.tmpl similarity index 100% rename from frameworks/dotnet-clean-architecture/Application/Application.csproj.tmpl rename to code/frameworks/dotnet-clean-architecture/Application/Application.csproj.tmpl diff --git a/frameworks/dotnet-clean-architecture/Application/Commands/ResourceNameService/CreateResourceNameCommand.cs.tmpl b/code/frameworks/dotnet-clean-architecture/Application/Commands/ResourceNameService/CreateResourceNameCommand.cs.tmpl similarity index 100% rename from frameworks/dotnet-clean-architecture/Application/Commands/ResourceNameService/CreateResourceNameCommand.cs.tmpl rename to code/frameworks/dotnet-clean-architecture/Application/Commands/ResourceNameService/CreateResourceNameCommand.cs.tmpl diff --git a/frameworks/dotnet-clean-architecture/Application/Commands/ResourceNameService/DeleteResourceNameCommand.cs.tmpl b/code/frameworks/dotnet-clean-architecture/Application/Commands/ResourceNameService/DeleteResourceNameCommand.cs.tmpl similarity index 100% rename from frameworks/dotnet-clean-architecture/Application/Commands/ResourceNameService/DeleteResourceNameCommand.cs.tmpl rename to code/frameworks/dotnet-clean-architecture/Application/Commands/ResourceNameService/DeleteResourceNameCommand.cs.tmpl diff --git a/frameworks/dotnet-clean-architecture/Application/Commands/ResourceNameService/UpdateResourceNameCommand.cs.tmpl b/code/frameworks/dotnet-clean-architecture/Application/Commands/ResourceNameService/UpdateResourceNameCommand.cs.tmpl similarity index 100% rename from frameworks/dotnet-clean-architecture/Application/Commands/ResourceNameService/UpdateResourceNameCommand.cs.tmpl rename to code/frameworks/dotnet-clean-architecture/Application/Commands/ResourceNameService/UpdateResourceNameCommand.cs.tmpl diff --git a/frameworks/dotnet-clean-architecture/Application/Exceptions/ResourceNameNotFoundException.cs.tmpl b/code/frameworks/dotnet-clean-architecture/Application/Exceptions/ResourceNameNotFoundException.cs.tmpl similarity index 100% rename from frameworks/dotnet-clean-architecture/Application/Exceptions/ResourceNameNotFoundException.cs.tmpl rename to code/frameworks/dotnet-clean-architecture/Application/Exceptions/ResourceNameNotFoundException.cs.tmpl diff --git a/frameworks/dotnet-clean-architecture/Application/Extensions/ServiceRegistration.cs.tmpl b/code/frameworks/dotnet-clean-architecture/Application/Extensions/ServiceRegistration.cs.tmpl similarity index 100% rename from frameworks/dotnet-clean-architecture/Application/Extensions/ServiceRegistration.cs.tmpl rename to code/frameworks/dotnet-clean-architecture/Application/Extensions/ServiceRegistration.cs.tmpl diff --git a/frameworks/dotnet-clean-architecture/Application/Handlers/ResourceNameService/CreateResourceNameCommandHandler.cs.tmpl b/code/frameworks/dotnet-clean-architecture/Application/Handlers/ResourceNameService/CreateResourceNameCommandHandler.cs.tmpl similarity index 100% rename from frameworks/dotnet-clean-architecture/Application/Handlers/ResourceNameService/CreateResourceNameCommandHandler.cs.tmpl rename to code/frameworks/dotnet-clean-architecture/Application/Handlers/ResourceNameService/CreateResourceNameCommandHandler.cs.tmpl diff --git a/frameworks/dotnet-clean-architecture/Application/Handlers/ResourceNameService/DeleteResourceNameCommandHandler.cs.tmpl b/code/frameworks/dotnet-clean-architecture/Application/Handlers/ResourceNameService/DeleteResourceNameCommandHandler.cs.tmpl similarity index 100% rename from frameworks/dotnet-clean-architecture/Application/Handlers/ResourceNameService/DeleteResourceNameCommandHandler.cs.tmpl rename to code/frameworks/dotnet-clean-architecture/Application/Handlers/ResourceNameService/DeleteResourceNameCommandHandler.cs.tmpl diff --git a/frameworks/dotnet-clean-architecture/Application/Handlers/ResourceNameService/GetAllResourceNamesQueryHandler.cs.tmpl b/code/frameworks/dotnet-clean-architecture/Application/Handlers/ResourceNameService/GetAllResourceNamesQueryHandler.cs.tmpl similarity index 100% rename from frameworks/dotnet-clean-architecture/Application/Handlers/ResourceNameService/GetAllResourceNamesQueryHandler.cs.tmpl rename to code/frameworks/dotnet-clean-architecture/Application/Handlers/ResourceNameService/GetAllResourceNamesQueryHandler.cs.tmpl diff --git a/frameworks/dotnet-clean-architecture/Application/Handlers/ResourceNameService/GetResourceNameByIdQueryHandler.cs.tmpl b/code/frameworks/dotnet-clean-architecture/Application/Handlers/ResourceNameService/GetResourceNameByIdQueryHandler.cs.tmpl similarity index 100% rename from frameworks/dotnet-clean-architecture/Application/Handlers/ResourceNameService/GetResourceNameByIdQueryHandler.cs.tmpl rename to code/frameworks/dotnet-clean-architecture/Application/Handlers/ResourceNameService/GetResourceNameByIdQueryHandler.cs.tmpl diff --git a/frameworks/dotnet-clean-architecture/Application/Handlers/ResourceNameService/UpdateResourceNameCommandHandler.cs.tmpl b/code/frameworks/dotnet-clean-architecture/Application/Handlers/ResourceNameService/UpdateResourceNameCommandHandler.cs.tmpl similarity index 100% rename from frameworks/dotnet-clean-architecture/Application/Handlers/ResourceNameService/UpdateResourceNameCommandHandler.cs.tmpl rename to code/frameworks/dotnet-clean-architecture/Application/Handlers/ResourceNameService/UpdateResourceNameCommandHandler.cs.tmpl diff --git a/frameworks/dotnet-clean-architecture/Application/Mappers/MappingProfile.cs.tmpl b/code/frameworks/dotnet-clean-architecture/Application/Mappers/MappingProfile.cs.tmpl similarity index 100% rename from frameworks/dotnet-clean-architecture/Application/Mappers/MappingProfile.cs.tmpl rename to code/frameworks/dotnet-clean-architecture/Application/Mappers/MappingProfile.cs.tmpl diff --git a/frameworks/dotnet-clean-architecture/Application/Queries/ResourceNameService/GetAllResourceNamesQuery.cs.tmpl b/code/frameworks/dotnet-clean-architecture/Application/Queries/ResourceNameService/GetAllResourceNamesQuery.cs.tmpl similarity index 100% rename from frameworks/dotnet-clean-architecture/Application/Queries/ResourceNameService/GetAllResourceNamesQuery.cs.tmpl rename to code/frameworks/dotnet-clean-architecture/Application/Queries/ResourceNameService/GetAllResourceNamesQuery.cs.tmpl diff --git a/frameworks/dotnet-clean-architecture/Application/Queries/ResourceNameService/GetResourceNameByIdQuery.cs.tmpl b/code/frameworks/dotnet-clean-architecture/Application/Queries/ResourceNameService/GetResourceNameByIdQuery.cs.tmpl similarity index 100% rename from frameworks/dotnet-clean-architecture/Application/Queries/ResourceNameService/GetResourceNameByIdQuery.cs.tmpl rename to code/frameworks/dotnet-clean-architecture/Application/Queries/ResourceNameService/GetResourceNameByIdQuery.cs.tmpl diff --git a/frameworks/dotnet-clean-architecture/Application/Responses/ResourceNameResponse.cs.tmpl b/code/frameworks/dotnet-clean-architecture/Application/Responses/ResourceNameResponse.cs.tmpl similarity index 100% rename from frameworks/dotnet-clean-architecture/Application/Responses/ResourceNameResponse.cs.tmpl rename to code/frameworks/dotnet-clean-architecture/Application/Responses/ResourceNameResponse.cs.tmpl diff --git a/frameworks/dotnet-clean-architecture/Core/Common/EntityBase.cs.tmpl b/code/frameworks/dotnet-clean-architecture/Core/Common/EntityBase.cs.tmpl similarity index 100% rename from frameworks/dotnet-clean-architecture/Core/Common/EntityBase.cs.tmpl rename to code/frameworks/dotnet-clean-architecture/Core/Common/EntityBase.cs.tmpl diff --git a/frameworks/dotnet-clean-architecture/Core/Core.csproj.tmpl b/code/frameworks/dotnet-clean-architecture/Core/Core.csproj.tmpl similarity index 100% rename from frameworks/dotnet-clean-architecture/Core/Core.csproj.tmpl rename to code/frameworks/dotnet-clean-architecture/Core/Core.csproj.tmpl diff --git a/frameworks/dotnet-clean-architecture/Core/Entities/ResourceName.cs.tmpl b/code/frameworks/dotnet-clean-architecture/Core/Entities/ResourceName.cs.tmpl similarity index 100% rename from frameworks/dotnet-clean-architecture/Core/Entities/ResourceName.cs.tmpl rename to code/frameworks/dotnet-clean-architecture/Core/Entities/ResourceName.cs.tmpl diff --git a/frameworks/dotnet-clean-architecture/Core/Repositories/IAsyncRepository.cs.tmpl b/code/frameworks/dotnet-clean-architecture/Core/Repositories/IAsyncRepository.cs.tmpl similarity index 100% rename from frameworks/dotnet-clean-architecture/Core/Repositories/IAsyncRepository.cs.tmpl rename to code/frameworks/dotnet-clean-architecture/Core/Repositories/IAsyncRepository.cs.tmpl diff --git a/frameworks/dotnet-clean-architecture/Core/Repositories/IResourceNameRepository.cs.tmpl b/code/frameworks/dotnet-clean-architecture/Core/Repositories/IResourceNameRepository.cs.tmpl similarity index 100% rename from frameworks/dotnet-clean-architecture/Core/Repositories/IResourceNameRepository.cs.tmpl rename to code/frameworks/dotnet-clean-architecture/Core/Repositories/IResourceNameRepository.cs.tmpl diff --git a/frameworks/dotnet-clean-architecture/Infrastructure/Data/DatabaseContext.cs.tmpl b/code/frameworks/dotnet-clean-architecture/Infrastructure/Data/DatabaseContext.cs.tmpl similarity index 100% rename from frameworks/dotnet-clean-architecture/Infrastructure/Data/DatabaseContext.cs.tmpl rename to code/frameworks/dotnet-clean-architecture/Infrastructure/Data/DatabaseContext.cs.tmpl diff --git a/frameworks/dotnet-clean-architecture/Infrastructure/Data/DatabaseContextFactory.cs.tmpl b/code/frameworks/dotnet-clean-architecture/Infrastructure/Data/DatabaseContextFactory.cs.tmpl similarity index 100% rename from frameworks/dotnet-clean-architecture/Infrastructure/Data/DatabaseContextFactory.cs.tmpl rename to code/frameworks/dotnet-clean-architecture/Infrastructure/Data/DatabaseContextFactory.cs.tmpl diff --git a/frameworks/dotnet-clean-architecture/Infrastructure/Extensions/OpenTelemetryRegistration.cs.tmpl b/code/frameworks/dotnet-clean-architecture/Infrastructure/Extensions/OpenTelemetryRegistration.cs.tmpl similarity index 100% rename from frameworks/dotnet-clean-architecture/Infrastructure/Extensions/OpenTelemetryRegistration.cs.tmpl rename to code/frameworks/dotnet-clean-architecture/Infrastructure/Extensions/OpenTelemetryRegistration.cs.tmpl diff --git a/frameworks/dotnet-clean-architecture/Infrastructure/Extensions/ServicesCollectionExtensions.cs.tmpl b/code/frameworks/dotnet-clean-architecture/Infrastructure/Extensions/ServicesCollectionExtensions.cs.tmpl similarity index 100% rename from frameworks/dotnet-clean-architecture/Infrastructure/Extensions/ServicesCollectionExtensions.cs.tmpl rename to code/frameworks/dotnet-clean-architecture/Infrastructure/Extensions/ServicesCollectionExtensions.cs.tmpl diff --git a/frameworks/dotnet-clean-architecture/Infrastructure/Infrastructure.csproj.tmpl b/code/frameworks/dotnet-clean-architecture/Infrastructure/Infrastructure.csproj.tmpl similarity index 100% rename from frameworks/dotnet-clean-architecture/Infrastructure/Infrastructure.csproj.tmpl rename to code/frameworks/dotnet-clean-architecture/Infrastructure/Infrastructure.csproj.tmpl diff --git a/frameworks/dotnet-clean-architecture/Infrastructure/Repositories/RepositoryBase.cs.tmpl b/code/frameworks/dotnet-clean-architecture/Infrastructure/Repositories/RepositoryBase.cs.tmpl similarity index 100% rename from frameworks/dotnet-clean-architecture/Infrastructure/Repositories/RepositoryBase.cs.tmpl rename to code/frameworks/dotnet-clean-architecture/Infrastructure/Repositories/RepositoryBase.cs.tmpl diff --git a/frameworks/dotnet-clean-architecture/Infrastructure/Repositories/ResourceNameRepository.cs.tmpl b/code/frameworks/dotnet-clean-architecture/Infrastructure/Repositories/ResourceNameRepository.cs.tmpl similarity index 100% rename from frameworks/dotnet-clean-architecture/Infrastructure/Repositories/ResourceNameRepository.cs.tmpl rename to code/frameworks/dotnet-clean-architecture/Infrastructure/Repositories/ResourceNameRepository.cs.tmpl diff --git a/frameworks/dotnet-clean-architecture/MicroServiceName.sln.tmpl b/code/frameworks/dotnet-clean-architecture/MicroServiceName.sln.tmpl similarity index 100% rename from frameworks/dotnet-clean-architecture/MicroServiceName.sln.tmpl rename to code/frameworks/dotnet-clean-architecture/MicroServiceName.sln.tmpl diff --git a/frameworks/dotnet-clean-architecture/MicroServiceName/Controllers/ResourceNameServiceController.cs.tmpl b/code/frameworks/dotnet-clean-architecture/MicroServiceName/Controllers/ResourceNameServiceController.cs.tmpl similarity index 100% rename from frameworks/dotnet-clean-architecture/MicroServiceName/Controllers/ResourceNameServiceController.cs.tmpl rename to code/frameworks/dotnet-clean-architecture/MicroServiceName/Controllers/ResourceNameServiceController.cs.tmpl diff --git a/frameworks/dotnet-clean-architecture/MicroServiceName/MicroServiceName.csproj.tmpl b/code/frameworks/dotnet-clean-architecture/MicroServiceName/MicroServiceName.csproj.tmpl similarity index 100% rename from frameworks/dotnet-clean-architecture/MicroServiceName/MicroServiceName.csproj.tmpl rename to code/frameworks/dotnet-clean-architecture/MicroServiceName/MicroServiceName.csproj.tmpl diff --git a/frameworks/dotnet-clean-architecture/MicroServiceName/MicroServiceName.csproj.user.tmpl b/code/frameworks/dotnet-clean-architecture/MicroServiceName/MicroServiceName.csproj.user.tmpl similarity index 100% rename from frameworks/dotnet-clean-architecture/MicroServiceName/MicroServiceName.csproj.user.tmpl rename to code/frameworks/dotnet-clean-architecture/MicroServiceName/MicroServiceName.csproj.user.tmpl diff --git a/frameworks/dotnet-clean-architecture/MicroServiceName/Program.cs.tmpl b/code/frameworks/dotnet-clean-architecture/MicroServiceName/Program.cs.tmpl similarity index 100% rename from frameworks/dotnet-clean-architecture/MicroServiceName/Program.cs.tmpl rename to code/frameworks/dotnet-clean-architecture/MicroServiceName/Program.cs.tmpl diff --git a/frameworks/dotnet-clean-architecture/MicroServiceName/Properties/launchSettings.json.tmpl b/code/frameworks/dotnet-clean-architecture/MicroServiceName/Properties/launchSettings.json.tmpl similarity index 100% rename from frameworks/dotnet-clean-architecture/MicroServiceName/Properties/launchSettings.json.tmpl rename to code/frameworks/dotnet-clean-architecture/MicroServiceName/Properties/launchSettings.json.tmpl diff --git a/frameworks/dotnet-clean-architecture/MicroServiceName/appsettings.Development.json.tmpl b/code/frameworks/dotnet-clean-architecture/MicroServiceName/appsettings.Development.json.tmpl similarity index 100% rename from frameworks/dotnet-clean-architecture/MicroServiceName/appsettings.Development.json.tmpl rename to code/frameworks/dotnet-clean-architecture/MicroServiceName/appsettings.Development.json.tmpl diff --git a/frameworks/dotnet-clean-architecture/MicroServiceName/appsettings.json.tmpl b/code/frameworks/dotnet-clean-architecture/MicroServiceName/appsettings.json.tmpl similarity index 100% rename from frameworks/dotnet-clean-architecture/MicroServiceName/appsettings.json.tmpl rename to code/frameworks/dotnet-clean-architecture/MicroServiceName/appsettings.json.tmpl diff --git a/frameworks/dotnet-clean-architecture/Tests/Application.Tests/Application.Tests.csproj.tmpl b/code/frameworks/dotnet-clean-architecture/Tests/Application.Tests/Application.Tests.csproj.tmpl similarity index 100% rename from frameworks/dotnet-clean-architecture/Tests/Application.Tests/Application.Tests.csproj.tmpl rename to code/frameworks/dotnet-clean-architecture/Tests/Application.Tests/Application.Tests.csproj.tmpl diff --git a/frameworks/dotnet-clean-architecture/Tests/Application.Tests/GlobalUsings.cs.tmpl b/code/frameworks/dotnet-clean-architecture/Tests/Application.Tests/GlobalUsings.cs.tmpl similarity index 100% rename from frameworks/dotnet-clean-architecture/Tests/Application.Tests/GlobalUsings.cs.tmpl rename to code/frameworks/dotnet-clean-architecture/Tests/Application.Tests/GlobalUsings.cs.tmpl diff --git a/frameworks/dotnet-clean-architecture/Tests/Application.Tests/Handlers/ResourceNameService/CreateResourceNameCommandHandlerTests.cs.tmpl b/code/frameworks/dotnet-clean-architecture/Tests/Application.Tests/Handlers/ResourceNameService/CreateResourceNameCommandHandlerTests.cs.tmpl similarity index 100% rename from frameworks/dotnet-clean-architecture/Tests/Application.Tests/Handlers/ResourceNameService/CreateResourceNameCommandHandlerTests.cs.tmpl rename to code/frameworks/dotnet-clean-architecture/Tests/Application.Tests/Handlers/ResourceNameService/CreateResourceNameCommandHandlerTests.cs.tmpl diff --git a/frameworks/dotnet-clean-architecture/Tests/Application.Tests/Handlers/ResourceNameService/DeleteResourceNameCommandHandlerTests.cs.tmpl b/code/frameworks/dotnet-clean-architecture/Tests/Application.Tests/Handlers/ResourceNameService/DeleteResourceNameCommandHandlerTests.cs.tmpl similarity index 100% rename from frameworks/dotnet-clean-architecture/Tests/Application.Tests/Handlers/ResourceNameService/DeleteResourceNameCommandHandlerTests.cs.tmpl rename to code/frameworks/dotnet-clean-architecture/Tests/Application.Tests/Handlers/ResourceNameService/DeleteResourceNameCommandHandlerTests.cs.tmpl diff --git a/frameworks/dotnet-clean-architecture/Tests/Application.Tests/Handlers/ResourceNameService/GetAllResourceNamesQueryHandlerTests.cs.tmpl b/code/frameworks/dotnet-clean-architecture/Tests/Application.Tests/Handlers/ResourceNameService/GetAllResourceNamesQueryHandlerTests.cs.tmpl similarity index 100% rename from frameworks/dotnet-clean-architecture/Tests/Application.Tests/Handlers/ResourceNameService/GetAllResourceNamesQueryHandlerTests.cs.tmpl rename to code/frameworks/dotnet-clean-architecture/Tests/Application.Tests/Handlers/ResourceNameService/GetAllResourceNamesQueryHandlerTests.cs.tmpl diff --git a/frameworks/dotnet-clean-architecture/Tests/Application.Tests/Handlers/ResourceNameService/GetResourceNameByIdQueryHandlerTests.cs.tmpl b/code/frameworks/dotnet-clean-architecture/Tests/Application.Tests/Handlers/ResourceNameService/GetResourceNameByIdQueryHandlerTests.cs.tmpl similarity index 100% rename from frameworks/dotnet-clean-architecture/Tests/Application.Tests/Handlers/ResourceNameService/GetResourceNameByIdQueryHandlerTests.cs.tmpl rename to code/frameworks/dotnet-clean-architecture/Tests/Application.Tests/Handlers/ResourceNameService/GetResourceNameByIdQueryHandlerTests.cs.tmpl diff --git a/frameworks/dotnet-clean-architecture/Tests/Application.Tests/Handlers/ResourceNameService/UpdateResourceNameCommandHandlerTests.cs.tmpl b/code/frameworks/dotnet-clean-architecture/Tests/Application.Tests/Handlers/ResourceNameService/UpdateResourceNameCommandHandlerTests.cs.tmpl similarity index 100% rename from frameworks/dotnet-clean-architecture/Tests/Application.Tests/Handlers/ResourceNameService/UpdateResourceNameCommandHandlerTests.cs.tmpl rename to code/frameworks/dotnet-clean-architecture/Tests/Application.Tests/Handlers/ResourceNameService/UpdateResourceNameCommandHandlerTests.cs.tmpl diff --git a/kubernetes/deployment.yaml.tmpl b/code/kubernetes/deployment.yaml.tmpl similarity index 100% rename from kubernetes/deployment.yaml.tmpl rename to code/kubernetes/deployment.yaml.tmpl diff --git a/kubernetes/service.yaml.tmpl b/code/kubernetes/service.yaml.tmpl similarity index 100% rename from kubernetes/service.yaml.tmpl rename to code/kubernetes/service.yaml.tmpl