Commit f71d5be9 authored by Daniel Scholl's avatar Daniel Scholl
Browse files

Merge branch 'master' of...

Merge branch 'master' of community.opengroup.org:osdu/platform/deployment-and-operations/infra-azure-provisioning

* 'master' of community.opengroup.org:osdu/platform/deployment-and-operations/infra-azure-provisioning:
  Update kv-secrets.yaml
  Adding key for object id
  enhance devops to support maven validate, custom Dockerfile, and Python integration tests
parents 9d35450a 485a3e0a
......@@ -31,6 +31,8 @@ spec:
key: principal-clientid
- objectName: "app-dev-sp-password"
key: principal-clientpassword
- objectName: "app-dev-sp-id"
key: principal-objectid
- secretName: central-logging
type: Opaque
data:
......@@ -120,6 +122,9 @@ spec:
- |
objectName: app-dev-sp-password
objectType: secret
- |
objectName: app-dev-sp-id
objectType: secret
- |
objectName: opendes-storage
objectType: secret
......
......@@ -44,7 +44,11 @@ stages:
clean: all
steps:
- download: none
- task: Maven@3
displayName: 'Maven: validate'
inputs:
mavenPomFile: ${{ parameters.mavenPomFile }}
goals: 'validate'
- task: Maven@3
displayName: 'Maven Core Build'
condition: ne('${{ parameters.serviceCoreMavenOptions }}', '')
......
......@@ -25,6 +25,7 @@ parameters:
testCoreMavenGoal: 'install'
skipDeploy: false
skipTest: 'false'
dockerFile: ''
stages:
......@@ -71,6 +72,10 @@ stages:
environment: ${{ environment }}
chartPath: ${{ parameters.chartPath }}
valuesFile: ${{ parameters.valuesFile }}
dockerFile: ${{ parameters.dockerFile }}
hldRegPath: ${{ parameters.hldRegPath }}
skipDeploy: ${{ parameters.skipDeploy }}
skipTest: ${{ parameters.skipTest }}
runPythonTest: ${{ parameters.runPythonTest }}
testPythonFilePath: ${{ parameters.testPythonFilePath }}
testPythonFile: ${{ parameters.testPythonFile }}
......@@ -18,6 +18,8 @@ parameters:
environment: ''
providerName: ''
jarFilePath: ''
artifactName: ''
dockerFile: ''
steps:
- task: AzureCLI@1
......@@ -26,6 +28,8 @@ steps:
env:
JAR_FILE_PATH: ${{ parameters.jarFilePath }}
IMAGE: $(CONTAINER_REGISTRY_NAME).azurecr.io/${{ parameters.imageRepoName }}-${{ parameters.environment }}:$(Build.SourceVersion)
DOCKERFILE: ${{ parameters.dockerFile }}
inputs:
azureSubscription: '$(SERVICE_CONNECTION_NAME)'
addSpnToEnvironment: true
......@@ -47,7 +51,12 @@ steps:
echo "------------------------------------"
az acr login -n $(CONTAINER_REGISTRY_NAME)
writeDockerFile
if [[ ! ${DOCKERFILE} ]]; then
writeDockerFile
else
cp ${{ parameters.artifactName }}/${DOCKERFILE} Dockerfile
fi
jar_file_name=$(basename $JAR_FILE_PATH)
cp $JAR_FILE_PATH .
......
......@@ -28,6 +28,11 @@ parameters:
testCoreMavenOptions: ''
testArtifactLocation: 'drop/deploy'
elasticEndpoint: ''
skipTest: ''
dockerFile: ''
testPythonFilePath: ''
testPythonFile: ''
runPythonTest: ''
steps:
- template: detect-jar.yml
......@@ -43,6 +48,8 @@ steps:
jarFilePath: $(DetectJarScript.JAR_FILE_PATH)
providerName: ${{ parameters.providerName }}
imageRepoName: ${{ parameters.serviceName }}
artifactName: ${{ parameters.artifactName }}
dockerFile: ${{ parameters.dockerFile }}
- template: aks-deployment-steps.yml
parameters:
......@@ -90,3 +97,9 @@ steps:
options: $(MAVEN_INTEGRATION_TEST_OPTIONS)
publishJUnitResults: ${{ parameters.mavenPublishJUnitResults }}
- template: python-integration-test.yml
parameters:
stepName: PythonRunIntegrationTests
testPythonFilePath: ${{ parameters.testPythonFilePath }}
testPythonFile: ${{ parameters.testPythonFile }}
runPythonTest: ${{ parameters.runPythonTest }}
parameters:
stepName: ''
runPythonTest: ''
testPythonFilePath: ''
testPythonFile: ''
testArtifactLocation: 'drop/deploy'
steps:
- task: Bash@3
condition: and(succeeded(), eq('${{ parameters.runPythonTest }}', 'true'))
name: ${{ parameters.stepName }}
displayName: 'Run python integration tests'
inputs:
targetType: filePath
filePath: '$(System.DefaultWorkingDirectory)/${{ parameters.testArtifactLocation }}/${{ parameters.testPythonFilePath }}/${{ parameters.testPythonFile }}'
arguments: '$(AUTH_SECRET) $(AUTH_SERVICE_TOKEN_X_API_KEY)'
workingDirectory: '$(System.DefaultWorkingDirectory)/${{ parameters.testArtifactLocation }}/${{ parameters.testPythonFilePath }}'
\ No newline at end of file
Supports Markdown
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