Commit af7698f5 authored by harshit aggarwal's avatar harshit aggarwal
Browse files

adding separate stage

parent defca434
Pipeline #20357 failed with stages
in 2 minutes and 18 seconds
......@@ -64,4 +64,4 @@ include:
ref: 'master'
file: 'cloud-providers/osdu-gcp-cloudrun.yml'
- local: "/devops/azure/bootstrap.yaml"
- local: "/devops/azure/gitlab-bootstrap.yml"
parameters:
artifactName: 'drop'
serviceName: ''
providers: []
stages:
- ${{ each provider in parameters.providers }}:
- ${{ each environment in provider.environments }}:
- stage: 'Bootstrap_${{ provider.name }}_${{ environment }}'
variables:
- group: '${{ provider.name }} Target Env Secrets - ${{ environment }}'
- group: '${{ provider.name }} Target Env - ${{ environment }}'
- group: '${{ provider.name }} Service Release - ${{ parameters.serviceName }}'
- name: artifactName
value: 'drop'
jobs:
- deployment: Bootstrap
pool:
name: $(AGENT_POOL)
demands:
- maven
environment: ${{ environment }}
strategy:
runOnce:
deploy:
steps:
- download: none
- task: DownloadBuildArtifacts@0
displayName: 'Pull Build Artifacts'
inputs:
artifactName: '${{ variables.artifactName }}'
downloadPath: '$(System.DefaultWorkingDirectory)'
- task: UsePythonVersion@0
inputs:
versionSpec: '3.8'
addToPath: true
architecture: 'x64'
- task: Bash@3
displayName: 'Deploy Schemas'
inputs:
targetType: 'inline'
script: |
export AZURE_DEPLOYMENTS_SUBDIR=$(System.DefaultWorkingDirectory)/${{ parameters.artifactName }}/deployments/scripts/azure
export AZURE_TENANT_ID=$(AZURE_TENANT_ID)
export AZURE_AD_APP_RESOURCE_ID=$(AZURE_AD_APP_RESOURCE_ID)
export INTEGRATION_TESTER=$(INTEGRATION_TESTER)
export AZURE_TESTER_SERVICEPRINCIPAL_SECRET=$(AZURE_TESTER_SERVICEPRINCIPAL_SECRET)
export DATA_PARTITION=$(DATA_PARTITION_ID)
pip install -r $AZURE_DEPLOYMENTS_SUBDIR/requirements.txt
chmod +x $AZURE_DEPLOYMENTS_SUBDIR/bootstrap.sh
$AZURE_DEPLOYMENTS_SUBDIR/bootstrap.sh
......@@ -75,27 +75,6 @@ steps:
providerName: ${{ parameters.providerName }}
elasticEndpoint: ${{ parameters.elasticEndpoint }}
- task: UsePythonVersion@0
inputs:
versionSpec: '3.8'
addToPath: true
architecture: 'x64'
- task: Bash@3
displayName: 'Deploy Schemas'
inputs:
targetType: 'inline'
script: |
export AZURE_DEPLOYMENTS_SUBDIR=$(System.DefaultWorkingDirectory)/${{ parameters.artifactName }}/deployments/scripts/azure
export AZURE_TENANT_ID=$(AZURE_TENANT_ID)
export AZURE_AD_APP_RESOURCE_ID=$(AZURE_AD_APP_RESOURCE_ID)
export INTEGRATION_TESTER=$(INTEGRATION_TESTER)
export AZURE_TESTER_SERVICEPRINCIPAL_SECRET=$(AZURE_TESTER_SERVICEPRINCIPAL_SECRET)
export DATA_PARTITION=$(DATA_PARTITION_ID)
pip install -r $AZURE_DEPLOYMENTS_SUBDIR/requirements.txt
chmod +x $AZURE_DEPLOYMENTS_SUBDIR/bootstrap.sh
$AZURE_DEPLOYMENTS_SUBDIR/bootstrap.sh
- task: Maven@3
displayName: 'Maven build, test, and install ${{parameters.providerName}}-test-core'
condition: ne('${{ parameters.testCoreMavenPomFile }}', '')
......
......@@ -84,3 +84,9 @@ stages:
providers:
- name: Azure
environments: ['dev']
- template: bootstrap-task.yml
parameters:
serviceName: ${{ variables.serviceName }}
providers:
- name: Azure
environments: ['dev']
\ No newline at end of file
......@@ -84,3 +84,9 @@ stages:
providers:
- name: Azure
environments: ['demo']
- template: bootstrap-task.yml
parameters:
serviceName: ${{ variables.serviceName }}
providers:
- name: Azure
environments: ['demo']
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment