updated workflows
This commit is contained in:
Родитель
3086e0cefe
Коммит
eda9d22c35
|
@ -6,6 +6,7 @@ trigger:
|
|||
- main
|
||||
paths:
|
||||
include:
|
||||
- infra/ArtifactStorage/*
|
||||
- infra/VirtualNetwork/*
|
||||
- infra/Firewall/*
|
||||
- infra/FirewallPolicy/*
|
||||
|
@ -32,20 +33,20 @@ stages:
|
|||
vmImage: 'ubuntu-latest'
|
||||
|
||||
steps:
|
||||
# Checkout code
|
||||
# Checkout Repository
|
||||
- checkout: self
|
||||
name: checkout_repository
|
||||
displayName: 'Checkout repository'
|
||||
displayName: Checkout Repository
|
||||
submodules: true
|
||||
lfs: false
|
||||
clean: true
|
||||
continueOnError: false
|
||||
enabled: true
|
||||
|
||||
# Deploy vnet - validation
|
||||
# Deploy Vnet - validation
|
||||
- task: AzureResourceManagerTemplateDeployment@3
|
||||
name: vnet_validation
|
||||
displayName: Deploy vnet - validation
|
||||
displayName: Deploy Vnet - validation
|
||||
enabled: true
|
||||
continueOnError: false
|
||||
inputs:
|
||||
|
@ -57,13 +58,13 @@ stages:
|
|||
location: '$(AZURE_LOCATION)'
|
||||
templateLocation: 'Linked artifact'
|
||||
csmFile: '$(System.DefaultWorkingDirectory)/infra/VirtualNetwork/deploy.vnet.json'
|
||||
csmParametersFile: '$(System.DefaultWorkingDirectory)/infra/VirtualNetwork/params.vnet.json'
|
||||
csmParametersFile: '$(System.DefaultWorkingDirectory)/infra/VirtualNetwork/params.vnet001.json'
|
||||
deploymentMode: 'Validation'
|
||||
|
||||
# Deploy storage account 001 - validation
|
||||
# Deploy Artifact Storage Account 001 - validation
|
||||
- task: AzureResourceManagerTemplateDeployment@3
|
||||
name: storage_account_001_validation
|
||||
displayName: Deploy storage account 001 - validation
|
||||
name: artifact_storage_001_validation
|
||||
displayName: Deploy Artifact Storage Account 001 - validation
|
||||
enabled: true
|
||||
continueOnError: false
|
||||
inputs:
|
||||
|
@ -74,8 +75,8 @@ stages:
|
|||
resourceGroupName: '$(AZURE_RESOURCE_GROUP_NAME_NETWORK)'
|
||||
location: '$(AZURE_LOCATION)'
|
||||
templateLocation: 'Linked artifact'
|
||||
csmFile: '$(System.DefaultWorkingDirectory)/infra/Storage/deploy.storage.json'
|
||||
csmParametersFile: '$(System.DefaultWorkingDirectory)/infra/Storage/params.storage001.json'
|
||||
csmFile: '$(System.DefaultWorkingDirectory)/infra/ArtifactStorage/deploy.storage.json'
|
||||
csmParametersFile: '$(System.DefaultWorkingDirectory)/infra/ArtifactStorage/params.storage001.json'
|
||||
deploymentMode: 'Validation'
|
||||
|
||||
# Deploy Firewall Policy 001 - validation
|
||||
|
@ -180,20 +181,20 @@ stages:
|
|||
vmImage: 'vs2017-win2016'
|
||||
|
||||
steps:
|
||||
# Checkout repository
|
||||
# Checkout Repository
|
||||
- checkout: self
|
||||
name: checkout_repository
|
||||
displayName: 'Checkout repository'
|
||||
displayName: Checkout Repository
|
||||
submodules: true
|
||||
lfs: false
|
||||
clean: true
|
||||
continueOnError: false
|
||||
enabled: true
|
||||
|
||||
# Deploy vnet
|
||||
# Deploy Vnet
|
||||
- task: AzureResourceManagerTemplateDeployment@3
|
||||
name: vnet_deployment
|
||||
displayName: Deploy vnet
|
||||
displayName: Deploy Vnet
|
||||
enabled: true
|
||||
continueOnError: false
|
||||
inputs:
|
||||
|
@ -205,13 +206,13 @@ stages:
|
|||
location: '$(AZURE_LOCATION)'
|
||||
templateLocation: 'Linked artifact'
|
||||
csmFile: '$(System.DefaultWorkingDirectory)/infra/VirtualNetwork/deploy.vnet.json'
|
||||
csmParametersFile: '$(System.DefaultWorkingDirectory)/infra/VirtualNetwork/params.vnet.json'
|
||||
csmParametersFile: '$(System.DefaultWorkingDirectory)/infra/VirtualNetwork/params.vnet001.json'
|
||||
deploymentMode: 'Incremental'
|
||||
|
||||
# Deploy storage account 001
|
||||
# Deploy Artifact Storage Account 001
|
||||
- task: AzureResourceManagerTemplateDeployment@3
|
||||
name: storage_account_001_deployment
|
||||
displayName: Deploy storage account 001
|
||||
name: artifact_storage_001_deployment
|
||||
displayName: Deploy Artifact Storage Account 001
|
||||
enabled: true
|
||||
continueOnError: false
|
||||
inputs:
|
||||
|
@ -222,8 +223,8 @@ stages:
|
|||
resourceGroupName: '$(AZURE_RESOURCE_GROUP_NAME_NETWORK)'
|
||||
location: '$(AZURE_LOCATION)'
|
||||
templateLocation: 'Linked artifact'
|
||||
csmFile: '$(System.DefaultWorkingDirectory)/infra/Storage/deploy.storage.json'
|
||||
csmParametersFile: '$(System.DefaultWorkingDirectory)/infra/Storage/params.storage001.json'
|
||||
csmFile: '$(System.DefaultWorkingDirectory)/infra/ArtifactStorage/deploy.storage.json'
|
||||
csmParametersFile: '$(System.DefaultWorkingDirectory)/infra/ArtifactStorage/params.storage001.json'
|
||||
deploymentMode: 'Incremental'
|
||||
deploymentOutputs: 'storageDetails'
|
||||
|
||||
|
|
|
@ -10,14 +10,6 @@ on:
|
|||
- 'infra/SynapsePrivateLinkHub/**'
|
||||
- '.github/workflows/dataHubDeployment.yml'
|
||||
- 'code/GeneratePassword.ps1'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'infra/ContainerRegistry/**'
|
||||
- 'infra/KeyVault/**'
|
||||
- 'infra/Purview/**'
|
||||
- 'infra/SynapsePrivateLinkHub/**'
|
||||
- '.github/workflows/dataHubDeployment.yml'
|
||||
- 'code/GeneratePassword.ps1'
|
||||
|
||||
env:
|
||||
AZURE_SUBSCRIPTION_ID: '4060c03e-0d2e-44b7-82a3-da9376fe50b2'
|
||||
|
|
|
@ -4,15 +4,7 @@ on:
|
|||
push:
|
||||
branches: [ main ]
|
||||
paths:
|
||||
- 'infra/DnsForwarder/**'
|
||||
- 'infra/Firewall/**'
|
||||
- 'infra/FirewallPolicy/**'
|
||||
- 'infra/PrivateDns/**'
|
||||
- 'infra/VirtualNetwork/**'
|
||||
- 'infra/VirtualNetworkPeering/**'
|
||||
- '.github/workflows/networkDeployment.yml'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'infra/ArtifactStorage/**'
|
||||
- 'infra/DnsForwarder/**'
|
||||
- 'infra/Firewall/**'
|
||||
- 'infra/FirewallPolicy/**'
|
||||
|
@ -106,20 +98,20 @@ jobs:
|
|||
resourceGroupName: ${{ env.AZURE_RESOURCE_GROUP_NAME_NETWORK }}
|
||||
region: ${{ env.AZURE_LOCATION }}
|
||||
template: ${{ github.workspace }}/infra/VirtualNetwork/deploy.vnet.json
|
||||
parameters: ${{ github.workspace }}/infra/VirtualNetwork/params.vnet.json
|
||||
parameters: ${{ github.workspace }}/infra/VirtualNetwork/params.vnet001.json
|
||||
deploymentMode: Validate
|
||||
|
||||
# Deploy Storage Account - validation
|
||||
- name: Deploy Storage Account 001 - validation
|
||||
id: storage_001_validation
|
||||
# Deploy Artifact Storage Account 001 - validation
|
||||
- name: Deploy Artifact Storage Account 001 - validation
|
||||
id: artifact_storage_001_validation
|
||||
uses: azure/arm-deploy@v1
|
||||
with:
|
||||
scope: resourcegroup
|
||||
subscriptionId: ${{ env.AZURE_SUBSCRIPTION_ID }}
|
||||
resourceGroupName: ${{ env.AZURE_RESOURCE_GROUP_NAME_NETWORK }}
|
||||
region: ${{ env.AZURE_LOCATION }}
|
||||
template: ${{ github.workspace }}/infra/Storage/deploy.storage.json
|
||||
parameters: ${{ github.workspace }}/infra/Storage/params.storage001.json
|
||||
template: ${{ github.workspace }}/infra/ArtifactStorage/deploy.storage.json
|
||||
parameters: ${{ github.workspace }}/infra/ArtifactStorage/params.storage001.json
|
||||
deploymentMode: Validate
|
||||
|
||||
# Deploy Firewall Policy 001 - validation
|
||||
|
@ -225,20 +217,20 @@ jobs:
|
|||
resourceGroupName: ${{ env.AZURE_RESOURCE_GROUP_NAME_NETWORK }}
|
||||
region: ${{ env.AZURE_LOCATION }}
|
||||
template: ${{ github.workspace }}/infra/VirtualNetwork/deploy.vnet.json
|
||||
parameters: ${{ github.workspace }}/infra/VirtualNetwork/params.vnet.json
|
||||
parameters: ${{ github.workspace }}/infra/VirtualNetwork/params.vnet001.json
|
||||
deploymentMode: Incremental
|
||||
|
||||
# Deploy Storage Account
|
||||
- name: Deploy Storage Account 001
|
||||
id: storage_001_deployment
|
||||
# Deploy Artifact Storage Account 001
|
||||
- name: Deploy Artifact Storage Account 001
|
||||
id: artifact_storage_001_deployment
|
||||
uses: azure/arm-deploy@v1
|
||||
with:
|
||||
scope: resourcegroup
|
||||
subscriptionId: ${{ env.AZURE_SUBSCRIPTION_ID }}
|
||||
resourceGroupName: ${{ env.AZURE_RESOURCE_GROUP_NAME_NETWORK }}
|
||||
region: ${{ env.AZURE_LOCATION }}
|
||||
template: ${{ github.workspace }}/infra/Storage/deploy.storage.json
|
||||
parameters: ${{ github.workspace }}/infra/Storage/params.storage001.json
|
||||
template: ${{ github.workspace }}/infra/ArtifactStorage/deploy.storage.json
|
||||
parameters: ${{ github.workspace }}/infra/ArtifactStorage/params.storage001.json
|
||||
deploymentMode: Incremental
|
||||
|
||||
# Upload file to Storage Account 001
|
||||
|
@ -249,9 +241,9 @@ jobs:
|
|||
azPSVersion: latest
|
||||
inlineScript: |
|
||||
"Uploading file to Storage Account 001"
|
||||
$storageAccount = Get-AzStorageAccount -ResourceGroupName "${{ env.AZURE_RESOURCE_GROUP_NAME_NETWORK }}" -Name "${{ steps.storage_001_deployment.outputs.storageAccountName }}"
|
||||
$storageAccount = Get-AzStorageAccount -ResourceGroupName "${{ env.AZURE_RESOURCE_GROUP_NAME_NETWORK }}" -Name "${{ steps.artifact_storage_001_deployment.outputs.storageAccountName }}"
|
||||
$ctx = $storageAccount.Context
|
||||
Set-AzStorageBlobContent -Context $ctx -Container "${{ steps.storage_001_deployment.outputs.storageAccountContainerName }}" -File "infra/DnsForwarder/forwarderSetup.sh" -Blob "forwarderSetup.sh" -Force
|
||||
Set-AzStorageBlobContent -Context $ctx -Container "${{ steps.artifact_storage_001_deployment.outputs.storageAccountContainerName }}" -File "infra/DnsForwarder/forwarderSetup.sh" -Blob "forwarderSetup.sh" -Force
|
||||
|
||||
# Deploy Firewall Policy 001
|
||||
- name: Deploy Firewall Policy 001
|
||||
|
|
|
@ -0,0 +1,62 @@
|
|||
name: Update Parameter Files
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'configs/**'
|
||||
- '.github/workflows/updateParameters.yml'
|
||||
|
||||
env:
|
||||
MANAGEMENT_SUBSCRIPTION_ID: '<my-management-subscription-id>'
|
||||
GLOBAL_DNS_RG_NAME: '<my-global-dns-resource-group-name>'
|
||||
DATA_HUB_SUBSCRIPTION_ID: '<my-data-hub-subscription-id>'
|
||||
DATA_HUB_NAME: '<my-data-hub-name>'
|
||||
LOCATION: '<my-region>'
|
||||
SYNAPSE_STORAGE_ACCOUNT_NAME: '<my-synapse-storage-account-name>'
|
||||
SYNAPSE_STORAGE_ACCOUNT_FILE_SYSTEM_NAME: '<my-synapse-storage-account-file-system-name>'
|
||||
AZURE_RESOURCE_MANAGER_CONNECTION_NAME: '<my-resource-manager-connection-name>'
|
||||
NODE_VNET_ID: '<my-hub-vnet-id>'
|
||||
|
||||
jobs:
|
||||
renaming:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- name: Check Out Repository
|
||||
id: checkout_repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
# Install Required Packages
|
||||
- name: Install Required Modules
|
||||
id: install_modules
|
||||
run: |
|
||||
echo "Install Modules"
|
||||
pwsh -Command "Set-PSRepository -Name "PSGallery" -InstallationPolicy Trusted"
|
||||
pwsh -Command "Install-Module -Name powershell-yaml"
|
||||
|
||||
# Update Parameters
|
||||
- name: Update Parameters
|
||||
id: update_parameters
|
||||
run: |
|
||||
echo "Updating Parameters"
|
||||
pwsh $GITHUB_WORKSPACE/configs/UpdateParameters.ps1 \
|
||||
-ConfigurationFilePath 'configs/config.json' \
|
||||
-ManagementSubscriptionId '${{ env.MANAGEMENT_SUBSCRIPTION_ID }}' \
|
||||
-GlobalDnsRgName '${{ env.GLOBAL_DNS_RG_NAME }}' \
|
||||
-DataLandingZoneSubscriptionId '${{ env.DATA_LANDING_ZONE_SUBSCRIPTION_ID }}' \
|
||||
-DataLandingZoneName '${{ env.DATA_LANDING_ZONE_NAME }}' \
|
||||
-Location '${{ env.LOCATION }}' \
|
||||
-SynapseStorageAccountName '${{ env.SYNAPSE_STORAGE_ACCOUNT_NAME }}' \
|
||||
-SynapseStorageAccountFileSystemName '${{ env.SYNAPSE_STORAGE_ACCOUNT_FILE_SYSTEM_NAME }}'
|
||||
|
||||
# Create Pull Request
|
||||
- name: Create Pull Request
|
||||
id: create_pull_request
|
||||
uses: peter-evans/create-pull-request@v3
|
||||
with:
|
||||
commit-message: 'Updated Parameters'
|
||||
branch: 'parameter_update_${{ github.run_id }}'
|
||||
title: 'Updated Parameters with GitHub Workflow Run ID ${{ github.run_id }}'
|
||||
body: 'One last step to complete. Please Update the GitHub Workflow environment variables in <a href="/.github/workflows/dataNodeDeployment.yml">`/.github/workflows/dataNodeDeployment.yml`</a> (AZURE_SUBSCRIPTION_ID, AZURE_RESOURCE_GROUP_NAME, AZURE_LOCATION, etc.) as described [here]().'
|
Загрузка…
Ссылка в новой задаче