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
80 changes: 7 additions & 73 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Starter pipeline
# Pull from Repo
# Import Project into Docekr SOAtest CLI container and Run
# Azure YAML docs:
# https://aka.ms/yaml

Expand All @@ -17,84 +16,19 @@ steps:
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=$(license.server.password)
dtp.share.enabled=true
dtp.project=ADO_1
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
sudo apt-get install -y cifs-utils

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

docker --version
docker plugin install --alias cloudstor:azure \
--grant-all-permissions docker4x/cloudstor:18.06.1-ce-azure2\
CLOUD_PLATFORM=AZURE \
AZURE_STORAGE_ACCOUNT_KEY="=liZ+KvFZBAgxHMDkb8z7MdV9NPFfma0M0EjtgFLG2Yk2InBwwkJXjGfpe5r6Ljexn8XKOnif1rrg+AStdt6c/w==" \
AZURE_STORAGE_ACCOUNT="adoproject" \
AZURE_STORAGE_ENDPOINT="core.windows.net" \
DEBUG=1

docker service create \
--replicas 5 \
--name ping1 \
--mount type=volume,volume-driver=cloudstor:azure,source=sharedvol1,destination=/shareddata,volume-opt=uid=1000,volume-opt=share=sharedvol \
alpine ping docker.com

docker run -i \
--mount type=volume,volume-driver=cloudstor:azure,target=/profile_xml,volume-opt=share=parasoftfiles \
-u 0:0 \
-e ACCEPT_EULA=true \
-v "$(pwd)/temp:/temp" \
parasoft/soavirt /bin/bash -c " \
cat /temp/soatestcli.properties; \
soatestcli \
-settings /temp/soatestcli.properties \
-import /temp/$(soatest.project); \
soatestcli \
-resource /$(soatest.project) \
-config 'user://Example Configuration' \
-settings /temp/soatestcli.properties \
-publish \
-report /temp" \
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:
testRunner: 'SOAtest9x'
testResultsFiles: '$(Build.Repository.LocalPath)/temp/rep*.xml'
# docker cp $(System.DefaultWorkingDirectory) ctp20212-ltc-cam-1:/tmp/root/parasoft/techsupport/
hello-world \