@@ -13,12 +13,35 @@ resources:
13
13
- repo : self
14
14
15
15
variables :
16
- dockerHub : " PersonalDockerHub"
17
- dockerHubID : " kunaltyagi"
16
+
17
+ dockerHubID : " pointcloudlibrary"
18
+ # VERSION and RC need to be provided via the UI
19
+ # UI priority is the lowest and can't override the file data
20
+ # RC: 0 # number of pre-release
21
+ # VERSION: 1.99
18
22
19
23
stages :
24
+ - stage : Info
25
+ displayName : " Version"
26
+ jobs :
27
+ - job : additional_info
28
+ displayName : " More Info"
29
+ pool :
30
+ vmImage : ' ubuntu-latest'
31
+ steps :
32
+ - checkout : self
33
+ # find the commit hash on a quick non-forced update too
34
+ fetchDepth : 10
35
+ - script : |
36
+ echo "Prev release: $(git tag | sort -rV | head -1 | cut -d- -f 2)"
37
+ echo "Current release: "$(VERSION)-rc$(RC)
38
+ if [ -z $VERSION ] || [ -z $RC ]; then
39
+ echo "Bad version and release candidate number"
40
+ exit 3
41
+ fi
42
+ displayName: "Test for and display version info"
20
43
- stage : Debian
21
- dependsOn : []
44
+ dependsOn : ["Info" ]
22
45
jobs :
23
46
- job : BuildDebian
24
47
displayName : " Build Debian Latest"
@@ -41,7 +64,7 @@ stages:
41
64
dockerfile : ' $(Build.SourcesDirectory)/.dev/docker/release/Dockerfile'
42
65
tags : " $(tag)"
43
66
- stage : ROS
44
- dependsOn : []
67
+ dependsOn : ["Info" ]
45
68
jobs :
46
69
- job : PerceptionPCL
47
70
displayName : " perception_pcl compile"
@@ -80,7 +103,7 @@ stages:
80
103
pool :
81
104
vmImage : ' ubuntu-latest'
82
105
variables :
83
- SOURCE_TAR : ' $(Build.ArtifactStagingDirectory)/source.tar.gz '
106
+ PUBLISH_LOCATION : ' $(Build.ArtifactStagingDirectory)'
84
107
steps :
85
108
- checkout : self
86
109
# find the commit hash on a quick non-forced update too
@@ -93,40 +116,96 @@ stages:
93
116
workingDirectory : ' $(Build.SourcesDirectory)'
94
117
failOnStderr : true
95
118
- task : ArchiveFiles@2
96
- displayName : " Create release archive"
119
+ displayName : " Create release archive (.tar.gz) "
97
120
inputs :
98
121
rootFolderOrFile : ' $(Build.SourcesDirectory)'
99
122
includeRootFolder : true
100
123
archiveType : ' tar'
101
- archiveFile : ' $(SOURCE_TAR) '
124
+ archiveFile : ' $(PUBLISH_LOCATION)/source.tar.gz '
102
125
replaceExistingArchive : true
103
126
verbose : true
127
+ - task : ArchiveFiles@2
128
+ displayName : " Create release archive (.zip)"
129
+ inputs :
130
+ rootFolderOrFile : ' $(Build.SourcesDirectory)'
131
+ includeRootFolder : true
132
+ archiveType : ' zip'
133
+ archiveFile : ' $(PUBLISH_LOCATION)/source.zip'
134
+ replaceExistingArchive : true
135
+ verbose : true
136
+ - script : |
137
+ for file in $(ls "$(PUBLISH_LOCATION)/"); do
138
+ sha256sum "$(PUBLISH_LOCATION)"/"${file}" >> $(PUBLISH_LOCATION)/sha256_checksums.txt
139
+ sha512sum "$(PUBLISH_LOCATION)"/"${file}" >> $(PUBLISH_LOCATION)/sha512_checksums.txt
140
+ done
141
+ echo "SHA 256 Checksums:"
142
+ cat $(PUBLISH_LOCATION)/sha256_checksums.txt
143
+ echo "SHA 512 Checksums:"
144
+ cat $(PUBLISH_LOCATION)/sha512_checksums.txt
145
+ displayName: "Generate checksum"
104
146
- task : PublishBuildArtifacts@1
105
147
displayName : " Publish archive"
106
148
inputs :
107
- PathtoPublish : ' $(SOURCE_TAR) '
108
- ArtifactName : ' source.tar.gz '
149
+ PathtoPublish : ' $(PUBLISH_LOCATION)/ '
150
+ ArtifactName : ' source'
109
151
publishLocation : ' Container'
110
- - job : documentation
111
- displayName : Generate Documentation
112
- container :
113
- image : pointcloudlibrary/doc
152
+ - job : changelog
153
+ displayName : Generate Change Log
114
154
pool :
115
155
vmImage : ' ubuntu-latest'
116
156
variables :
117
- BUILD_DIR : ' $(Agent.BuildDirectory)/build'
118
157
CHANGELOG : ' $(Build.ArtifactStagingDirectory)/changelog.md'
119
158
steps :
120
- - checkout : self
121
- # find the commit hash on a quick non-forced update too
122
- fetchDepth : 10
159
+ - checkout : none
123
160
- script : |
124
- $(Build.SourcesDirectory)/.dev/scripts/generate_changelog.py --with-misc > $(CHANGELOG)
125
- pandoc -f markdown -t plain --wrap=none $(CHANGELOG)
161
+ cat > $(CHANGELOG) <<EOF
162
+ ## Insert Summary Here
163
+
164
+ For an exhaustive list of newly added features, deprecations and other changes
165
+ in PCL $(VERSION), please see [CHANGES.md](https://github.com/PointCloudLibrary/pcl/blob/master/CHANGES.md). **Remember to edit the URL**
166
+ EOF
126
167
displayName: 'Generate Changelog'
127
168
- task : PublishBuildArtifacts@1
128
169
displayName : " Publish Changelog"
129
170
inputs :
130
171
PathtoPublish : ' $(CHANGELOG)'
131
- ArtifactName : ' changelog.md '
172
+ ArtifactName : ' changelog'
132
173
publishLocation : ' Container'
174
+ - stage : Release
175
+ dependsOn : ["Prepare"]
176
+ jobs :
177
+ - job : release
178
+ displayName : " Release the kraken"
179
+ timeoutInMinutes : 360
180
+ variables :
181
+ DOWNLOAD_LOCATION : ' $(Build.ArtifactStagingDirectory)'
182
+ pool :
183
+ vmImage : ' ubuntu-latest'
184
+ steps :
185
+ - checkout : self
186
+ # find the commit hash on a quick non-forced update too
187
+ fetchDepth : 10
188
+ - bash : |
189
+ if [ -z $RC ] || [ $RC -eq 0 ]; then isPreRelease=false; else isPreRelease=true; fi
190
+ echo "##vso[task.setvariable variable=isPreRelease]${isPreRelease}"
191
+ - task : DownloadBuildArtifacts@0
192
+ inputs :
193
+ downloadType : ' all' # can be anything except single
194
+ downloadPath : ' $(DOWNLOAD_LOCATION)'
195
+ - task : GitHubRelease@1
196
+ inputs :
197
+ action : ' create'
198
+ addChangeLog : false
199
+ # assets, one pattern per line
200
+ assets : |
201
+ $(DOWNLOAD_LOCATION)/source/*
202
+ isDraft : true
203
+ isPreRelease : $(isPreRelease)
204
+ gitHubConnection : ' Release to GitHub'
205
+ releaseNotesFilePath : ' $(DOWNLOAD_LOCATION)/changelog/changelog.md'
206
+ repositoryName : $(Build.Repository.Name)
207
+ tagSource : ' userSpecifiedTag'
208
+ tag : " pcl-$(VERSION)-rc$(RC)"
209
+ tagPattern : ' pcl-*'
210
+ target : ' $(Build.SourceVersion)'
211
+ title : ' PCL $(VERSION)'
0 commit comments