Skip to content

Commit 8751fd5

Browse files
Set up CI with Azure Pipelines
[skip ci]
1 parent c779294 commit 8751fd5

File tree

1 file changed

+124
-0
lines changed

1 file changed

+124
-0
lines changed

azure-pipelines.yml

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
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: IntegrationTests
8+
type: git
9+
name: launcher-automation/IntegrationTests
10+
ref: azure-pipelines
11+
trigger:
12+
branches:
13+
include:
14+
- azure-pipelines
15+
16+
pr:
17+
- master
18+
- releases/*
19+
20+
pool:
21+
name: launcher-automation-pool
22+
23+
steps:
24+
- script: echo Hello, world!
25+
displayName: 'Run a one-line script'
26+
- checkout: self
27+
- checkout: IntegrationTests
28+
29+
- script: dir $(Build.SourcesDirectory)
30+
31+
- task: DownloadSecureFile@1
32+
name: php_dockerfile
33+
displayName: 'download Dockerfile'
34+
inputs:
35+
secureFile: 'php.Dockerfile'
36+
37+
- script: |
38+
echo "place php.Dockerfile"
39+
echo $(php_dockerfile.secureFilePath)
40+
cp $(php_Dockerfile.secureFilePath) code-examples-php-private/Dockerfile
41+
displayName: 'place Dockerfile'
42+
43+
- task: DownloadSecureFile@1
44+
name: php_docker_compose
45+
displayName: 'download docker-compose file'
46+
inputs:
47+
secureFile: 'php.docker-compose.yml'
48+
49+
- script: |
50+
echo "place docker-compose.yml"
51+
echo $(php_dockerfile.secureFilePath)
52+
cp $(php_Dockerfile.secureFilePath) code-examples-php-private/docker-compose.yml
53+
displayName: 'place docker-compose.yml'
54+
55+
- script: |
56+
allure –-version
57+
java --version
58+
javac --version
59+
mvn --version
60+
docker --version
61+
62+
- task: DownloadSecureFile@1
63+
name: tests_config_properties
64+
displayName: 'download config.properties'
65+
inputs:
66+
secureFile: 'tests_config.properties'
67+
68+
69+
- script: |
70+
echo "place config.properties"
71+
echo $(tests_config_properties.secureFilePath)
72+
cp $(tests_config_properties.secureFilePath) IntegrationTests/src/main/resources/config.properties
73+
displayName: 'place config.properties'
74+
75+
- task: DownloadSecureFile@1
76+
name: php_ds_config
77+
displayName: 'download ds_config.php'
78+
inputs:
79+
secureFile: 'php.ds_config.php'
80+
81+
82+
- script: |
83+
echo "place ds_config.php"
84+
cp $(php_ds_config.secureFilePath) code-examples-php-private/ds_config.php
85+
displayName: 'place ds_config.php'
86+
87+
88+
- task: DownloadSecureFile@1
89+
name: php_private_key
90+
displayName: 'download private.key'
91+
inputs:
92+
secureFile: 'private.key'
93+
94+
95+
- script: |
96+
echo "place private.key"
97+
cp $(php_private_key.secureFilePath) code-examples-php-private/private.key
98+
displayName: 'place private.key'
99+
100+
- script: dir $(Build.SourcesDirectory)
101+
102+
- script: dir $(Build.SourcesDirectory)/code-examples-php-private
103+
104+
# - task: DockerCompose@0
105+
# displayName: Run php image
106+
# inputs:
107+
# action: Run services
108+
# dockerComposeFile: '$(Build.SourcesDirectory)/code-examples-php-private/docker-compose.yml'
109+
# workingDirectory: '$(Build.SourcesDirectory)/code-examples-php-private '
110+
# includeLatestTag: true
111+
112+
- script: |
113+
docker compose run
114+
displayName: 'start php app'
115+
116+
- script: |
117+
cd IntegrationTests
118+
mvn clean test -DsuiteXmlFile="php_suite.xml"
119+
displayName: 'Node app tests'
120+
121+
- script: |
122+
docker stop $(docker ps -a -q)
123+
docker rm $(docker ps -a -q)
124+
displayName: 'stop node app'

0 commit comments

Comments
 (0)