@@ -53,7 +53,8 @@ parameters:
53
53
54
54
variables :
55
55
runTests : True
56
- CONDA_CACHE_DIR : /usr/share/miniconda/envs
56
+ CONDA_ENV : synapseml
57
+ CONDA_CACHE_DIR : /usr/share/miniconda/envs/$(CONDA_ENV)/
57
58
ComponentDetection.Timeout : 900
58
59
isMaster : $[eq(variables['Build.SourceBranch'], 'refs/heads/master')]
59
60
@@ -253,6 +254,7 @@ jobs:
253
254
cancelTimeoutInMinutes : 0
254
255
pool :
255
256
vmImage : ubuntu-20.04
257
+ condition : and(eq(variables.isMaster, true), startsWith(variables['tag'], 'v'))
256
258
steps :
257
259
- template : templates/checkout.yml
258
260
- template : templates/update_cli.yml
@@ -264,9 +266,7 @@ jobs:
264
266
wget https://github.com/git-chglog/git-chglog/releases/download/0.8.0/git-chglog_linux_amd64
265
267
chmod +x git-chglog_linux_amd64
266
268
./git-chglog_linux_amd64 -o CHANGELOG.md $TAG
267
- condition: and(eq(variables.isMaster, true), startsWith(variables['tag'], 'v'))
268
269
- task : GitHubRelease@0
269
- condition : and(eq(variables.isMaster, true), startsWith(variables['tag'], 'v'))
270
270
inputs :
271
271
gitHubConnection : ' MMLSpark Github'
272
272
repositoryName : ' $(Build.Repository.Name)'
@@ -275,36 +275,15 @@ jobs:
275
275
tagSource : ' auto'
276
276
releaseNotesFile : ' CHANGELOG.md'
277
277
isDraft : true
278
- - bash : echo "##vso[task.prependpath]$CONDA/bin"
279
- condition : and(eq(variables.isMaster, true), startsWith(variables['tag'], 'v'))
280
- displayName : Add conda to PATH
281
- - bash : sudo chown -R $(whoami):$(id -ng) $(CONDA_CACHE_DIR)
282
- displayName : Fix directory permissions
283
- condition : and(eq(variables.isMaster, true), startsWith(variables['tag'], 'v'))
284
- - task : Cache@2
285
- displayName : Use cached Anaconda environment
286
- condition : and(eq(variables.isMaster, true), startsWith(variables['tag'], 'v'))
287
- inputs :
288
- key : ' conda | "$(Agent.OS)" | environment.yml'
289
- restoreKeys : |
290
- python | "$(Agent.OS)"
291
- python
292
- path : $(CONDA_CACHE_DIR)
293
- cacheHitVar : CONDA_CACHE_RESTORED
294
- - bash : |
295
- conda env create --force -f environment.yml -v
296
- condition: and(eq(variables.isMaster, true), and(startsWith(variables['tag'], 'v'), eq(variables.CONDA_CACHE_RESTORED, 'false')))
297
- displayName: Create Anaconda environment
278
+ - template : templates/conda.yml
298
279
- task : AzureKeyVault@1
299
- condition : and(eq(variables.isMaster, true), startsWith(variables['tag'], 'v'))
300
280
inputs :
301
281
azureSubscription : ' SynapseML Build'
302
282
keyVaultName : mmlspark-keys
303
283
- bash : |
304
284
set -e
305
285
source activate synapseml
306
286
sbt publishPypi
307
- condition: and(eq(variables.isMaster, true), startsWith(variables['tag'], 'v'))
308
287
env:
309
288
STORAGE-KEY: $(storage-key)
310
289
NEXUS-UN: $(nexus-un)
@@ -320,7 +299,6 @@ jobs:
320
299
source activate synapseml
321
300
sbt publishLocalSigned
322
301
python tools/esrp/prepare_jar.py
323
- condition: and(eq(variables.isMaster, true), startsWith(variables['tag'], 'v'))
324
302
env:
325
303
STORAGE-KEY: $(storage-key)
326
304
NEXUS-UN: $(nexus-un)
@@ -350,7 +328,6 @@ jobs:
350
328
DomainTenantId : ' 72f988bf-86f1-41af-91ab-2d7cd011db47'
351
329
waitforreleasecompletion : true
352
330
displayName : ' ESRP Publish Package'
353
- condition : and(eq(variables.isMaster, true), startsWith(variables['tag'], 'v'))
354
331
355
332
356
333
- job : PythonTests
0 commit comments