Skip to content

Commit 4186af2

Browse files
Raluca Chispcercuei
authored andcommitted
Push artifacts to SW Downloads
Signed-off-by: Raluca Chis <[email protected]>
1 parent e1f6a84 commit 4186af2

File tree

1 file changed

+159
-136
lines changed

1 file changed

+159
-136
lines changed

azure-pipelines.yml

Lines changed: 159 additions & 136 deletions
Original file line numberDiff line numberDiff line change
@@ -9,148 +9,171 @@ pr:
99
- master
1010
- 20*
1111

12-
jobs:
13-
- job: LinuxBuilds
14-
strategy:
15-
matrix:
16-
centos_7_x86_64:
17-
imageName: 'ubuntu-latest'
18-
OS_TYPE: 'centos_docker'
19-
OS_VERSION: centos7
20-
artifactName: 'Linux-CentOS-7-x86_64'
21-
centos_8_x86_64:
22-
imageName: 'ubuntu-latest'
23-
OS_TYPE: 'centos_docker'
24-
OS_VERSION: centos8
25-
artifactName: 'Linux-CentOS-8-x86_64'
26-
ubuntu_16_04_x86_64:
27-
imageName: 'ubuntu-latest'
28-
OS_TYPE: 'ubuntu_docker'
29-
OS_VERSION: xenial
30-
artifactName: 'Linux-Ubuntu-16.04-x86_64'
31-
ubuntu_18_04_x86_64:
32-
imageName: 'ubuntu-latest'
33-
OS_TYPE: 'ubuntu_docker'
34-
OS_VERSION: bionic
35-
artifactName: 'Linux-Ubuntu-18.04-x86_64'
36-
CI_BUILD_SPHINX_DOCS: 1
37-
ubuntu_20_04_x86_64:
38-
imageName: 'ubuntu-latest'
39-
OS_TYPE: 'ubuntu_docker'
40-
OS_VERSION: focal
41-
artifactName: 'Linux-Ubuntu-20.04-x86_64'
42-
CHECK_AGAINST_KERNEL_HEADER: 1
43-
CI_BUILD_SPHINX_DOCS: 1
44-
debian_buster_arm32v7:
45-
imageName: 'ubuntu-latest'
46-
OS_TYPE: 'arm32v7/debian_docker'
47-
OS_VERSION: 'buster'
48-
artifactName: 'Linux-Debian-Buster-ARM'
49-
debian_buster_arm64v8:
50-
imageName: 'ubuntu-latest'
51-
OS_TYPE: 'arm64v8/debian_docker'
52-
OS_VERSION: 'buster'
53-
artifactName: 'Linux-Debian-Buster-ARM64'
54-
pool:
55-
vmImage: $(imageName)
56-
steps:
57-
- checkout: self
58-
fetchDepth: 1
59-
clean: true
60-
- script: ./CI/travis/before_install_linux
61-
displayName: "Install Dependencies"
62-
- script: ./CI/travis/make_linux
63-
displayName: "Build"
64-
- task: CopyFiles@2
65-
inputs:
66-
sourceFolder: '$(Agent.BuildDirectory)/s/build/'
67-
contents: '$(Agent.BuildDirectory)/s/build/?(*.deb|*.rpm)'
68-
targetFolder: '$(Build.ArtifactStagingDirectory)'
69-
- task: PublishPipelineArtifact@1
70-
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
71-
inputs:
72-
targetPath: '$(Build.ArtifactStagingDirectory)'
73-
artifactName: '$(artifactName)'
12+
stages:
13+
- stage: Builds
14+
jobs:
15+
- job: LinuxBuilds
16+
strategy:
17+
matrix:
18+
centos_7_x86_64:
19+
imageName: 'ubuntu-latest'
20+
OS_TYPE: 'centos_docker'
21+
OS_VERSION: centos7
22+
artifactName: 'Linux-CentOS-7-x86_64'
23+
centos_8_x86_64:
24+
imageName: 'ubuntu-latest'
25+
OS_TYPE: 'centos_docker'
26+
OS_VERSION: centos8
27+
artifactName: 'Linux-CentOS-8-x86_64'
28+
ubuntu_16_04_x86_64:
29+
imageName: 'ubuntu-latest'
30+
OS_TYPE: 'ubuntu_docker'
31+
OS_VERSION: xenial
32+
artifactName: 'Linux-Ubuntu-16.04-x86_64'
33+
ubuntu_18_04_x86_64:
34+
imageName: 'ubuntu-latest'
35+
OS_TYPE: 'ubuntu_docker'
36+
OS_VERSION: bionic
37+
artifactName: 'Linux-Ubuntu-18.04-x86_64'
38+
CI_BUILD_SPHINX_DOCS: 1
39+
ubuntu_20_04_x86_64:
40+
imageName: 'ubuntu-latest'
41+
OS_TYPE: 'ubuntu_docker'
42+
OS_VERSION: focal
43+
artifactName: 'Linux-Ubuntu-20.04-x86_64'
44+
CHECK_AGAINST_KERNEL_HEADER: 1
45+
CI_BUILD_SPHINX_DOCS: 1
46+
debian_buster_arm32v7:
47+
imageName: 'ubuntu-latest'
48+
OS_TYPE: 'arm32v7/debian_docker'
49+
OS_VERSION: 'buster'
50+
artifactName: 'Linux-Debian-Buster-ARM'
51+
debian_buster_arm64v8:
52+
imageName: 'ubuntu-latest'
53+
OS_TYPE: 'arm64v8/debian_docker'
54+
OS_VERSION: 'buster'
55+
artifactName: 'Linux-Debian-Buster-ARM64'
56+
pool:
57+
vmImage: $(imageName)
58+
steps:
59+
- checkout: self
60+
fetchDepth: 1
61+
clean: true
62+
- script: ./CI/travis/before_install_linux
63+
displayName: "Install Dependencies"
64+
- script: ./CI/travis/make_linux
65+
displayName: "Build"
66+
- task: CopyFiles@2
67+
inputs:
68+
sourceFolder: '$(Agent.BuildDirectory)/s/build/'
69+
contents: '$(Agent.BuildDirectory)/s/build/?(*.deb|*.rpm)'
70+
targetFolder: '$(Build.ArtifactStagingDirectory)'
71+
- task: PublishPipelineArtifact@1
72+
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
73+
inputs:
74+
targetPath: '$(Build.ArtifactStagingDirectory)'
75+
artifactName: '$(artifactName)'
7476

75-
- job: macOSBuilds
76-
strategy:
77-
matrix:
78-
macOS_10_14:
79-
imageName: 'macOS-10.14'
80-
artifactName: 'macOS-10.14'
81-
macOS_10_15:
82-
imageName: 'macOS-10.15'
83-
artifactName: 'macOS-10.15'
77+
- job: macOSBuilds
78+
strategy:
79+
matrix:
80+
macOS_10_14:
81+
imageName: 'macOS-10.14'
82+
artifactName: 'macOS-10.14'
83+
macOS_10_15:
84+
imageName: 'macOS-10.15'
85+
artifactName: 'macOS-10.15'
8486
# FIXME: uncomment after this is resolved:
8587
# https://github.com/actions/virtual-environments/issues/2072
8688
# Mac OS X 11.0 is definitely a big thing (with their switch to ARM,
8789
# so we should be quick to have it)
8890
# macOS_11_0:
8991
# imageName: 'macOS-11.0'
9092
# artifactName: 'macOS-11.0'
91-
pool:
92-
vmImage: $(imageName)
93-
steps:
94-
- checkout: self
95-
fetchDepth: 1
96-
clean: true
97-
- script: ./CI/travis/before_install_darwin
98-
displayName: "Install Dependencies"
99-
- script: ./CI/travis/make_darwin
100-
displayName: "Build"
101-
- task: CopyFiles@2
102-
inputs:
103-
sourceFolder: '$(Agent.BuildDirectory)/s/build/'
104-
contents: '$(Agent.BuildDirectory)/s/build/?(*.pkg)'
105-
targetFolder: '$(Build.ArtifactStagingDirectory)'
106-
- task: PublishPipelineArtifact@1
107-
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
108-
inputs:
109-
targetPath: '$(Build.ArtifactStagingDirectory)'
110-
artifactName: '$(artifactName)'
93+
pool:
94+
vmImage: $(imageName)
95+
steps:
96+
- checkout: self
97+
fetchDepth: 1
98+
clean: true
99+
- script: ./CI/travis/before_install_darwin
100+
displayName: "Install Dependencies"
101+
- script: ./CI/travis/make_darwin
102+
displayName: "Build"
103+
- task: CopyFiles@2
104+
inputs:
105+
sourceFolder: '$(Agent.BuildDirectory)/s/build/'
106+
contents: '$(Agent.BuildDirectory)/s/build/?(*.pkg)'
107+
targetFolder: '$(Build.ArtifactStagingDirectory)'
108+
- task: PublishPipelineArtifact@1
109+
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
110+
inputs:
111+
targetPath: '$(Build.ArtifactStagingDirectory)'
112+
artifactName: '$(artifactName)'
111113

112-
- job: WindowsBuilds
113-
strategy:
114-
matrix:
115-
VS2019_Win32:
116-
imageName: 'windows-2019'
117-
COMPILER: 'Visual Studio 16 2019'
118-
ARCH: 'Win32'
119-
artifactName: 'Windows-VS-16-2019-Win32'
120-
VS2019_Win64:
121-
imageName: 'windows-2019'
122-
COMPILER: 'Visual Studio 16 2019'
123-
ARCH: 'x64'
124-
artifactName: 'Windows-VS-16-2019-x64'
125-
pool:
126-
vmImage: $[ variables['imageName'] ]
127-
steps:
128-
- checkout: self
129-
fetchDepth: 1
130-
clean: true
131-
- task: PowerShell@2
132-
inputs:
133-
targetType: 'filePath'
134-
filePath: .\CI\install_deps_win.ps1
135-
displayName: Dependencies
136-
- task: PowerShell@2
137-
inputs:
138-
targetType: 'filePath'
139-
filePath: .\CI\build_win.ps1
140-
displayName: Build
141-
- task: CopyFiles@2
142-
displayName: 'Copy libraries'
143-
inputs:
144-
sourceFolder: '$(Agent.BuildDirectory)/s/build/Release'
145-
targetFolder: '$(Build.ArtifactStagingDirectory)'
146-
- task: CopyFiles@2
147-
displayName: 'Copy iio.h header'
148-
inputs:
149-
sourceFolder: '$(Agent.BuildDirectory)/s/'
150-
contents: 'iio.h'
151-
targetFolder: '$(Build.ArtifactStagingDirectory)'
152-
- task: PublishPipelineArtifact@1
153-
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
154-
inputs:
155-
targetPath: '$(Build.ArtifactStagingDirectory)'
156-
artifactName: '$(artifactName)'
114+
- job: WindowsBuilds
115+
strategy:
116+
matrix:
117+
VS2019_Win32:
118+
imageName: 'windows-2019'
119+
COMPILER: 'Visual Studio 16 2019'
120+
ARCH: 'Win32'
121+
artifactName: 'Windows-VS-16-2019-Win32'
122+
VS2019_Win64:
123+
imageName: 'windows-2019'
124+
COMPILER: 'Visual Studio 16 2019'
125+
ARCH: 'x64'
126+
artifactName: 'Windows-VS-16-2019-x64'
127+
pool:
128+
vmImage: $[ variables['imageName'] ]
129+
steps:
130+
- checkout: self
131+
fetchDepth: 1
132+
clean: true
133+
- task: PowerShell@2
134+
inputs:
135+
targetType: 'filePath'
136+
filePath: .\CI\install_deps_win.ps1
137+
displayName: Dependencies
138+
- task: PowerShell@2
139+
inputs:
140+
targetType: 'filePath'
141+
filePath: .\CI\build_win.ps1
142+
displayName: Build
143+
- task: CopyFiles@2
144+
displayName: 'Copy libraries'
145+
inputs:
146+
sourceFolder: '$(Agent.BuildDirectory)/s/build/Release'
147+
targetFolder: '$(Build.ArtifactStagingDirectory)'
148+
- task: CopyFiles@2
149+
displayName: 'Copy iio.h header'
150+
inputs:
151+
sourceFolder: '$(Agent.BuildDirectory)/s/'
152+
contents: 'iio.h'
153+
targetFolder: '$(Build.ArtifactStagingDirectory)'
154+
- task: PublishPipelineArtifact@1
155+
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
156+
inputs:
157+
targetPath: '$(Build.ArtifactStagingDirectory)'
158+
artifactName: '$(artifactName)'
159+
160+
- stage: PushArtifacts
161+
dependsOn: Builds
162+
jobs:
163+
- job: PushToSWDownloads
164+
pool:
165+
vmImage: 'ubuntu-latest'
166+
steps:
167+
- task: DownloadPipelineArtifact@2
168+
inputs:
169+
path: /home/vsts/work/1/a
170+
- task: DownloadSecureFile@1
171+
name: key
172+
displayName: 'Download rsa key'
173+
inputs:
174+
secureFile: 'id_rsa'
175+
- bash: chmod 600 $(key.secureFilePath) ; scp -2 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o HostKeyAlgorithms=+ssh-dss -vv -i $(key.secureFilePath) -r /home/vsts/work/1/a/* @MAPPED_VAR
176+
env:
177+
MAPPED_VAR: $(SERVER_ADDRESS)
178+
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
179+
displayName: "Push artifacts to SW Downloads"

0 commit comments

Comments
 (0)