Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 70 additions & 14 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,78 @@
# Maven
# Build your Java project and run tests with Apache Maven.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/java
# Starter pipeline
# Pull from Repo
# Import Project into Docekr SOAtest CLI container and Run
# Azure YAML docs:
# https://aka.ms/yaml

trigger:
- main

pool:
vmImage: ubuntu-latest
vmImage: 'ubuntu-latest'

# Set Up Project
steps:
- task: Maven@3
- script: |
echo "Starting Pipeline Execution."
echo "Create ./temp directory for volume mount."
mkdir temp
echo ${PWD}
echo "Copy SOAtest project contents to volume directory."
cp -R $(soatest.project) temp/.

# Set Up and write .properties file
echo -e "\n~~~\nSetting up and creating soatestcli.properties file.\n"
echo $"
dtp.url=$(license.server.url)
dtp.user=admin
dtp.password=admin
dtp.share.enabled=true
dtp.project=ADO
report.dtp.publish=true
techsupport.advanced=false
techsupport.auto_creation=true
techsupport.item.environment=true
techsupport.item.general=true
techsupport.archive_location=/temp
techsupport.send_email=false
techsupport.verbose=true
techsupport.verbose.scontrol=false
license.network.auth.enabled=true
license.network.password=$(license.server.password)
license.network.url=$(license.server.url)
license.network.use.specified.server=true
license.network.user=admin
soatest.license.network.edition=automation_edition
soatest.license.use_network=true
virtualize.license.network.edition=performance_server_edition
virtualize.license.use_network=true" >> temp/soatestcli.properties
echo -e "\nDebug -- Verify workspace contents.\n"
ls -R
echo -e "\nDebug -- Verify soatestcli.properties file contents."
cat temp/soatestcli.properties

# Run Docker container with mount and run tests
echo -e "\n~~~\nRun SOAtestCLI Docker container & mount ./temp volume.\n"

docker --version

docker run --rm -d -p 4040:4040 -p 8090:8080 -p 9021:9001 -p 63616:61616 -p 8050:8050 --net=demo-net --add-host=dev1.parasoft.com:host-gateway --add-host=qa1.parasoft.com:host-gateway --name parabank-baseline lavanya93/parabank-baseline:2022 \

docker ps \
echo -e "\nDebug -- Verify ./temp contents\n"
ls -R $(pwd)/temp
displayName: Run Tests
env:
pwd: $(Build.Repository.LocalPath)

- publish: /home/vsts/work/1/s/temp
artifact: TSA
# Publish Test Results

- task: PublishParasoftTestResults@1

displayName: Publish SOAtest Test Results
inputs:
mavenPomFile: 'pom.xml'
mavenOptions: '-Xmx3072m'
javaHomeOption: 'JDKVersion'
jdkVersionOption: '1.8'
jdkArchitectureOption: 'x64'
publishJUnitResults: true
testResultsFiles: '**/surefire-reports/TEST-*.xml'
goals: 'package'
testRunner: 'SOAtest9x'
testResultsFiles: '$(Build.Repository.LocalPath)/temp/rep*.xml'
# docker cp $(System.DefaultWorkingDirectory) ctp20212-ltc-cam-1:/tmp/root/parasoft/techsupport/