Skip to content

Commit f83de13

Browse files
Update azure-pipelines.yml for Azure Pipelines
1 parent 9b7f8d5 commit f83de13

File tree

1 file changed

+111
-0
lines changed

1 file changed

+111
-0
lines changed

azure-pipelines.yml

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
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: csharp_dockerfile
30+
displayName: 'download Dockerfile'
31+
inputs:
32+
secureFile: 'csharp.Dockerfile'
33+
34+
- script: |
35+
echo "place csharp.Dockerfile"
36+
echo $(csharp_dockerfile.secureFilePath)
37+
cp $(csharp_Dockerfile.secureFilePath) code-examples-csharp-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: csharp_config_properties
49+
displayName: 'download config.properties'
50+
inputs:
51+
secureFile: 'csharp.config.properties'
52+
53+
54+
- script: |
55+
echo "place config.properties"
56+
echo $(csharp_config_properties.secureFilePath)
57+
cp $(csharp_config_properties.secureFilePath) launcher-automation/src/main/resources/config.properties
58+
displayName: 'place config.properties'
59+
60+
- task: DownloadSecureFile@1
61+
name: csharp_appsettings
62+
displayName: 'download appsettings.json'
63+
inputs:
64+
secureFile: 'csharp.appsettings.json'
65+
66+
67+
- script: |
68+
echo "place appsettings.json"
69+
cp $(csharp_appsettings.secureFilePath) code-examples-csharp-private/launcher-csharp/appsettings.json
70+
displayName: 'place appsettings.json'
71+
72+
73+
- task: DownloadSecureFile@1
74+
name: csharp_private_key
75+
displayName: 'download private.key'
76+
inputs:
77+
secureFile: 'private.key'
78+
79+
80+
- script: |
81+
echo "place private.key"
82+
cp $(csharp_private_key.secureFilePath) code-examples-csharp-private/launcher-csharp/private.key
83+
displayName: 'place private.key'
84+
85+
- script: dir $(Build.SourcesDirectory)
86+
87+
- script: dir $(Build.SourcesDirectory)/code-examples-csharp-private
88+
89+
- task: Docker@2
90+
displayName: Build csharp image
91+
inputs:
92+
command: build
93+
repository: 'launcher-automation-csharp'
94+
dockerfile: '$(Build.SourcesDirectory)/code-examples-csharp-private/Dockerfile'
95+
buildContext: '$(Build.SourcesDirectory)/code-examples-csharp-private '
96+
tags: |
97+
latest
98+
99+
- script: |
100+
docker run -p 44333:44333 -d launcher-automation-csharp:latest
101+
displayName: 'start csharp app'
102+
103+
- script: |
104+
cd launcher-automation
105+
mvn clean test -DsuiteXmlFile="csharp_suite.xml"
106+
displayName: 'C# app tests'
107+
108+
- script: |
109+
docker stop $(docker ps -a -q)
110+
docker rm $(docker ps -a -q)
111+
displayName: 'stop csharp app'

0 commit comments

Comments
 (0)