Skip to content

Commit

Permalink
TEST-1234 Remove or comment out unused deploy steps
Browse files Browse the repository at this point in the history
  • Loading branch information
hwinther committed Apr 19, 2024
1 parent 0182be3 commit 6b82d78
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 83 deletions.
40 changes: 1 addition & 39 deletions .github/workflows/backend-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
70 changes: 26 additions & 44 deletions .github/workflows/deploy-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 6b82d78

Please sign in to comment.