1+ # Starter pipeline
2+ # Start with a minimal pipeline that you can customize to build and deploy your code.
3+ # Add steps that build, run tests, deploy, and more:
4+ # https://aka.ms/yaml
5+ resources :
6+ repositories :
7+ - repository : launcher-automation
8+ type : github
9+ name : docusign/launcher-automation
10+ ref : main
11+ endpoint : launcherAutomationServiceConnection
12+
13+ pr :
14+ - master
15+ - releases/*
16+
17+ pool :
18+ name : launcher-automation-pool
19+
20+ steps :
21+ - script : echo Hello, world!
22+ displayName : ' Run a one-line script'
23+ - checkout : self
24+ - checkout : launcher-automation
25+
26+ - script : dir $(Build.SourcesDirectory)
27+
28+ - task : DownloadSecureFile@1
29+ name : java_dockerfile
30+ displayName : ' download Dockerfile'
31+ inputs :
32+ secureFile : ' java.Dockerfile'
33+
34+ - script : |
35+ echo "place java.Dockerfile"
36+ echo $(java_dockerfile.secureFilePath)
37+ cp $(java_Dockerfile.secureFilePath) code-examples-java-private/Dockerfile
38+ displayName : ' place Dockerfile'
39+
40+ - script : |
41+ allure –-version
42+ java --version
43+ javac --version
44+ mvn --version
45+ docker --version
46+
47+ - task : DownloadSecureFile@1
48+ name : tests_config_properties
49+ displayName : ' download config.properties'
50+ inputs :
51+ secureFile : ' java-php.config.properties'
52+
53+
54+ - script : |
55+ echo "place config.properties"
56+ echo $(tests_config_properties.secureFilePath)
57+ cp $(tests_config_properties.secureFilePath) launcher-automation/src/main/resources/config.properties
58+ displayName : ' place config.properties'
59+
60+ - task : DownloadSecureFile@1
61+ name : java_application
62+ displayName : ' download application.json'
63+ inputs :
64+ secureFile : ' java.application.json'
65+
66+
67+ - script : |
68+ echo "place application.json"
69+ cp $(java_application.secureFilePath) code-examples-java-private/src/main/resources/application.json
70+ displayName : ' place application.json'
71+
72+
73+ - task : DownloadSecureFile@1
74+ name : java_private_key
75+ displayName : ' download private.key'
76+ inputs :
77+ secureFile : ' private.key'
78+
79+
80+ - script : |
81+ echo "place private.key"
82+ cp $(java_private_key.secureFilePath) code-examples-java-private/src/main/resources/private.key
83+ displayName : ' place private.key'
84+
85+ - script : dir $(Build.SourcesDirectory)
86+
87+ - script : dir $(Build.SourcesDirectory)/code-examples-java-private
88+
89+ - script : dir $(Build.SourcesDirectory)/code-examples-java-private/src/main/resources
90+
91+ - task : Docker@2
92+ displayName : Build java image
93+ inputs :
94+ command : build
95+ repository : ' launcher-automation-java'
96+ dockerfile : ' $(Build.SourcesDirectory)/code-examples-java-private/Dockerfile'
97+ buildContext : ' $(Build.SourcesDirectory)/code-examples-java-private '
98+ tags : |
99+ latest
100+
101+ - script : |
102+ docker run -p 8080:8080 -d launcher-automation-java:latest
103+ displayName : ' start java app'
104+
105+ - script : |
106+ cd launcher-automation
107+ mvn clean test -DsuiteXmlFile="java_suite.xml"
108+ displayName : ' Java app tests'
109+
110+ - script : |
111+ docker stop $(docker ps -a -q)
112+ docker rm $(docker ps -a -q)
113+ displayName : ' stop java app'
0 commit comments