From 6b82d78609ce8cf5b837c8dd6f74063779409e1a Mon Sep 17 00:00:00 2001 From: Hans Christian Winther-Sorensen Date: Fri, 19 Apr 2024 22:34:06 +0200 Subject: [PATCH] TEST-1234 Remove or comment out unused deploy steps --- .github/workflows/backend-ci.yml | 40 +----------------- .github/workflows/deploy-cd.yml | 70 ++++++++++++-------------------- 2 files changed, 27 insertions(+), 83 deletions(-) diff --git a/.github/workflows/backend-ci.yml b/.github/workflows/backend-ci.yml index 9bac1d01..6bd880b9 100644 --- a/.github/workflows/backend-ci.yml +++ b/.github/workflows/backend-ci.yml @@ -33,7 +33,7 @@ concurrency: cancel-in-progress: true env: - DOTNET_VERSION: "7.0.x" + DOTNET_VERSION: "8.0.x" BACKEND_SOLUTION_PATH: "src/backend" jobs: @@ -65,41 +65,3 @@ jobs: - name: dotnet build run: dotnet build -c Release --no-restore - - deploy: - # if: contains(github.ref, inputs.repo_name) - if: ${{ contains(github.ref, 'main') || startsWith(github.ref, 'refs/tags/v') }} - needs: [build] - runs-on: ubuntu-latest - defaults: - run: - working-directory: ${{ env.BACKEND_SOLUTION_PATH }} - # environment: ${{ inputs.deploy_target }} - environment: "prod" - steps: - - name: checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 # used by GitVersion to find the most recent tag outside of this branch - - - name: Setup .NET - uses: actions/setup-dotnet@v4 - with: - dotnet-version: ${{ env.DOTNET_VERSION }} - - - uses: actions/cache@v4 - id: nuget-cache - with: - path: ~/.nuget/packages - key: nuget-${{ hashFiles('**/packages.lock.json') }} - - - name: dotnet restore - run: dotnet restore --locked-mode - - - name: dotnet build - run: | - dotnet build -c Release --no-restore - - # To see the version we would have deployed: - dotnet tool install --global GitVersion.Tool - dotnet gitversion diff --git a/.github/workflows/deploy-cd.yml b/.github/workflows/deploy-cd.yml index 63a0ad75..e31c46d6 100644 --- a/.github/workflows/deploy-cd.yml +++ b/.github/workflows/deploy-cd.yml @@ -82,31 +82,13 @@ jobs: echo "INFORMATIONAL_VERSION=$INFORMATIONAL_VERSION" >> $GITHUB_OUTPUT echo "version.outputs.v-version=${{ steps.version.outputs.v-version }}" - - name: Deploy platform via terraform - uses: ./.github/actions/platform-deploy - with: - deploy_target: ${{ inputs.deploy_target }} - working_directory: "./templates/terraform/" - config_path: "./config/conf-${{ inputs.deploy_target }}.conf" - var_path: "./variables/${{ inputs.deploy_target }}.tfvars" - - - name: Deploy PowerApps - BASIL - uses: ./.github/actions/powerapps-deploy - if: ${{ inputs.deploy_target != 'dev' }} - with: - deploy_target: ${{ inputs.deploy_target }} - solution_name: "basilgsi" - solution_folder: "src/PowerApps/Basil" - environment_file: "src/PowerApps/Basil-environment.json" - - - name: Deploy PowerApps - GSI - uses: ./.github/actions/powerapps-deploy - if: ${{ inputs.deploy_target != 'dev' }} - with: - deploy_target: ${{ inputs.deploy_target }} - solution_name: "gsi" - solution_folder: "src/PowerApps/Gsi" - environment_file: "src/PowerApps/Gsi-environment.json" + # - name: Deploy platform via terraform + # uses: ./.github/actions/platform-deploy + # with: + # deploy_target: ${{ inputs.deploy_target }} + # working_directory: "./templates/terraform/" + # config_path: "./config/conf-${{ inputs.deploy_target }}.conf" + # var_path: "./variables/${{ inputs.deploy_target }}.tfvars" - name: "Set version environment variables" shell: bash @@ -133,25 +115,25 @@ jobs: dotnet restore --locked-mode dotnet tool restore - - name: Update database via entity framework - working-directory: ${{ env.BACKEND_SOLUTION_PATH }} - env: - TestConnectionString: ${{ secrets.SQL_BASIL_CONNECTION_STRING }} - run: | - dotnet ef database update --project Test.Common --context TestDbContext + # - name: Update database via entity framework + # working-directory: ${{ env.BACKEND_SOLUTION_PATH }} + # env: + # TestConnectionString: ${{ secrets.SQL_BASIL_CONNECTION_STRING }} + # run: | + # dotnet ef database update --project Test.Common --context TestDbContext - - name: Deploy TEST function app - uses: ./.github/actions/backend-deploy - with: - deploy_target: ${{ inputs.deploy_target }} - repo_name: ${{ inputs.repo_name }} - labels: ${{ inputs.labels }} - base_name: functions - project_type: function - dockerfile_path: "Test.Functions/Dockerfile" - docker_image_name: "functions" - azure_resource_name: "func-functions-${{ inputs.deploy_target }}-ne" - skip_setup: true + # - name: Deploy TEST function app + # uses: ./.github/actions/backend-deploy + # with: + # deploy_target: ${{ inputs.deploy_target }} + # repo_name: ${{ inputs.repo_name }} + # labels: ${{ inputs.labels }} + # base_name: functions + # project_type: function + # dockerfile_path: "Test.Functions/Dockerfile" + # docker_image_name: "functions" + # azure_resource_name: "func-functions-${{ inputs.deploy_target }}-ne" + # skip_setup: true - name: Deploy TEST api uses: ./.github/actions/backend-deploy @@ -161,7 +143,7 @@ jobs: labels: ${{ inputs.labels }} base_name: login project_type: app - dockerfile_path: "Test.Api/Dockerfile" + dockerfile_path: "WebApi/Dockerfile" docker_image_name: "api" azure_resource_name: "app-api-${{ inputs.deploy_target }}-ne" skip_setup: true