Skip to content

Commit 12f1b84

Browse files
azure pipeline
1 parent f091e39 commit 12f1b84

File tree

1 file changed

+120
-0
lines changed

1 file changed

+120
-0
lines changed

azure-pipelines.yml

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
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: ruby_dockerfile
30+
displayName: 'download Dockerfile'
31+
inputs:
32+
secureFile: 'ruby.Dockerfile'
33+
34+
- script: |
35+
echo "place ruby.Dockerfile"
36+
echo $(ruby_dockerfile.secureFilePath)
37+
cp $(ruby_Dockerfile.secureFilePath) code-examples-ruby-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: 'tests_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: ruby_appsettings
62+
displayName: 'download appsettings.yml'
63+
inputs:
64+
secureFile: 'ruby.appsettings.yml'
65+
66+
67+
- script: |
68+
echo "place appsettings.yml"
69+
cp $(ruby_appsettings.secureFilePath) code-examples-ruby-private/config/appsettings.yml
70+
displayName: 'place appsettings.yml'
71+
72+
73+
- task: DownloadSecureFile@1
74+
name: ruby_private_key
75+
displayName: 'download private.key'
76+
inputs:
77+
secureFile: 'private.key'
78+
79+
80+
- script: |
81+
echo "place private.key"
82+
cp $(ruby_private_key.secureFilePath) code-examples-ruby-private/config/docusign_private_key.txt
83+
displayName: 'place docusign_private_key.txt'
84+
85+
- script: dir $(Build.SourcesDirectory)
86+
87+
- script: dir $(Build.SourcesDirectory)/code-examples-ruby-private
88+
89+
- task: Docker@2
90+
displayName: Build ruby image
91+
inputs:
92+
command: build
93+
repository: 'launcher-automation-ruby'
94+
dockerfile: '$(Build.SourcesDirectory)/code-examples-ruby-private/Dockerfile'
95+
buildContext: '$(Build.SourcesDirectory)/code-examples-ruby-private '
96+
tags: |
97+
latest
98+
99+
- script: |
100+
docker run -p 3000:3000 -d launcher-automation-ruby:latest
101+
displayName: 'start ruby app'
102+
103+
- script: |
104+
cd launcher-automation
105+
mvn clean test -DsuiteXmlFile="ruby_suite.xml"
106+
displayName: 'Ruby app tests'
107+
108+
- script: |
109+
docker stop $(docker ps -a -q)
110+
docker rm $(docker ps -a -q)
111+
displayName: 'stop ruby app'
112+
113+
- script: |
114+
allure generate --clean --output $(Build.SourcesDirectory)/ruby-allure-output '$(Build.SourcesDirectory)/launcher-automation/target/allure-results'
115+
displayName: generate allure html reports
116+
117+
- task: PublishAllureReport@1
118+
displayName: 'Publish Allure Report'
119+
inputs:
120+
reportDir: '$(Build.SourcesDirectory)/ruby-allure-output'

0 commit comments

Comments
 (0)