From 6c27b42b6cac68dbd75c76e4888c676845e52ab9 Mon Sep 17 00:00:00 2001 From: Mathias Thierbach Date: Tue, 28 Nov 2023 19:40:47 +0000 Subject: [PATCH] Manifest updates --- .github/workflows/deploy-dev.yml | 4 +- .github/workflows/deploy-production.yml | 50 +++++++++++++++++++++++++ .github/workflows/deploy-uat.yml | 50 +++++++++++++++++++++++++ .pbixproj.json | 23 ++++++++---- 4 files changed, 118 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/deploy-production.yml create mode 100644 .github/workflows/deploy-uat.yml diff --git a/.github/workflows/deploy-dev.yml b/.github/workflows/deploy-dev.yml index c30d98d..c5c9508 100644 --- a/.github/workflows/deploy-dev.yml +++ b/.github/workflows/deploy-dev.yml @@ -4,7 +4,7 @@ name: Deploy-DEV on: pull_request: branches: - - 'release/*' + - 'Release/*' # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -23,7 +23,7 @@ jobs: runs-on: ubuntu-latest environment: Development container: - image: ghcr.io/pbi-tools/pbi-tools-core:1.0.0-rc.2_preview.3 + image: ghcr.io/pbi-tools/pbi-tools-core:1.0.0-rc.6 steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it diff --git a/.github/workflows/deploy-production.yml b/.github/workflows/deploy-production.yml new file mode 100644 index 0000000..d1a1827 --- /dev/null +++ b/.github/workflows/deploy-production.yml @@ -0,0 +1,50 @@ +name: Deploy-PROD + +# Controls when the workflow will run +on: + schedule: + - cron: '0/10 * * * *' + # GITHUB_REF: Default branch + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + inputs: + whatIf: + description: 'Enable WhatIf Mode' + type: boolean + required: true + default: true + +env: + PROFILE: Contoso + +jobs: + Deployment: + runs-on: ubuntu-latest + environment: Production + container: + image: ghcr.io/pbi-tools/pbi-tools-core:1.0.0-rc.6 + + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v3 + + - name: pbi-tools info + run: | + /app/pbi-tools/pbi-tools.core info + + - name: pbi-tools deploy (WhatIf) + if: ${{ github.event.inputs.whatIf == 'true' }} + run: | + /app/pbi-tools/pbi-tools.core deploy . "$PROFILE" Production -whatIf + env: + PBI_CLIENT_SECRET: ${{ secrets.PBI_CLIENT_SECRET }} + SQL_PWD: ${{ secrets.SQL_PWD }} + + - name: pbi-tools deploy + if: ${{ github.event.inputs.whatIf != 'true' }} + run: | + /app/pbi-tools/pbi-tools.core deploy . "$PROFILE" Production + env: + PBI_CLIENT_SECRET: ${{ secrets.PBI_CLIENT_SECRET }} + SQL_PWD: ${{ secrets.SQL_PWD }} diff --git a/.github/workflows/deploy-uat.yml b/.github/workflows/deploy-uat.yml new file mode 100644 index 0000000..b12877e --- /dev/null +++ b/.github/workflows/deploy-uat.yml @@ -0,0 +1,50 @@ +name: Deploy-UAT + +# Controls when the workflow will run +on: + push: + branches: + - 'Release/*' + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + inputs: + whatIf: + description: 'Enable WhatIf Mode' + type: boolean + required: true + default: true + +env: + PROFILE: Contoso + +jobs: + Deployment: + runs-on: ubuntu-latest + environment: UAT + container: + image: ghcr.io/pbi-tools/pbi-tools-core:1.0.0-rc.6 + + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v3 + + - name: pbi-tools info + run: | + /app/pbi-tools/pbi-tools.core info + + - name: pbi-tools deploy (WhatIf) + if: ${{ github.event.inputs.whatIf == 'true' }} + run: | + /app/pbi-tools/pbi-tools.core deploy . "$PROFILE" UAT -whatIf + env: + PBI_CLIENT_SECRET: ${{ secrets.PBI_CLIENT_SECRET }} + SQL_PWD: ${{ secrets.SQL_PWD }} + + - name: pbi-tools deploy + if: ${{ github.event.inputs.whatIf != 'true' }} + run: | + /app/pbi-tools/pbi-tools.core deploy . "$PROFILE" UAT + env: + PBI_CLIENT_SECRET: ${{ secrets.PBI_CLIENT_SECRET }} + SQL_PWD: ${{ secrets.SQL_PWD }} diff --git a/.pbixproj.json b/.pbixproj.json index bcbc1ef..51927e3 100644 --- a/.pbixproj.json +++ b/.pbixproj.json @@ -19,7 +19,7 @@ }, "refresh": { "enabled": true, - "skipNewDataset": false, + "skipNewDataset": true, "type": "Full", "objects": { "Date": "Automatic", @@ -50,10 +50,7 @@ "dataset": { "replaceParameters": true, "deployEmbeddedReport": true, - "gateway": { - "discoverGateways": true, - "gatewayId": "564ec649-a76b-4a47-b878-6c00c8b77b6f" - } + "setCredentials": false }, "sqlScripts": { "enabled": true, @@ -70,6 +67,7 @@ }, "parameters": { "[Version]": "1.0.0", + "WORKSPACE": "Calgary-Demo", "[SQL Schema]": "PowerBI--{{ENVIRONMENT}}--Contoso@1.0.0", "SCHEMA_BASE_NAME": "PowerBI--{{ENVIRONMENT}}--Contoso", "[SQL Server]": "pbitools-demo-01.database.windows.net", @@ -82,11 +80,22 @@ }, "environments": { "Development": { - "workspace": "Preview-3", + "workspace": "{{WORKSPACE}}", + "displayName": "{{PBIXPROJ_FOLDER}} [DEV]", "refresh": { - "objects": {} + "type": "Automatic", + "objects": { + "Info": "Full" + } }, "parameters": {} + }, + "UAT": { + "workspace": "{{WORKSPACE}}", + "displayName": "{{PBIXPROJ_FOLDER}} [UAT]" + }, + "Production": { + "workspace": "{{WORKSPACE}}" } } }