Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Fabien Bosquet
infra-azure-provisioning
Commits
617db11d
Commit
617db11d
authored
Oct 12, 2020
by
Sherman Yang
Browse files
enhance devops to support maven validate, custom Dockerfile, and Python integration tests
parent
21127be4
Changes
5
Hide whitespace changes
Inline
Side-by-side
devops/build-stage.yml
View file @
617db11d
...
...
@@ -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 }}', '')
...
...
devops/deploy-stages.yml
View file @
617db11d
...
...
@@ -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 }}
devops/tasks/acr-publish.yml
View file @
617db11d
...
...
@@ -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 .
...
...
devops/tasks/deployment-steps.yml
View file @
617db11d
...
...
@@ -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 }}
devops/tasks/python-integration-test.yml
0 → 100644
View file @
617db11d
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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment