-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathazure-pipelines.yml
More file actions
74 lines (64 loc) · 2.14 KB
/
azure-pipelines.yml
File metadata and controls
74 lines (64 loc) · 2.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
trigger:
- main
pool:
vmImage: 'ubuntu-latest'
steps:
- task: UsePythonVersion@0
displayName: 'Using Python 3.6'
inputs:
versionSpec: '3.6'
architecture: 'x64'
- task: PythonScript@0
displayName: 'Export project path'
inputs:
scriptSource: 'inline'
script: |
"""Search all subdirectories for `manage.py`."""
from glob import iglob
from os import path
# Python >= 3.5
manage_py = next(iglob(path.join('**', 'manage.py'), recursive=True), None)
if not manage_py:
raise SystemExit('Could not find a Django project')
project_location = path.dirname(path.abspath(manage_py))
print('Found Django project in', project_location)
print('##vso[task.setvariable variable=projectRoot]{}'.format(project_location))
- script: |
python -m pip install --upgrade pip setuptools wheel
pip install -r requirements.txt
displayName: 'Install prerequisites'
- task: DownloadGitHubRelease@0
inputs:
connection: 'open-data'
userRepository: 'open-data/SolrClient'
itemPattern: '**'
defaultVersionType: 'latest'
downloadPath: '$(System.ArtifactsDirectory)'
- script: |
ls -l ''$(System.ArtifactsDirectory)''
displayName: 'List SolrClient'
- task: ArchiveFiles@2
inputs:
rootFolderOrFile: '$(Build.SourcesDirectory)'
includeRootFolder: false
archiveType: 'tar'
tarCompression: 'gz'
archiveFile: '$(Build.ArtifactStagingDirectory)/SourceOfflinePackage/OC_Search_SourcePackage.tgz'
replaceExistingArchive: true
displayName: 'Create Source tarball'
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)/SourceOfflinePackage'
ArtifactName: 'SourceOfflinePackage'
publishLocation: 'Container'
displayName: 'Publish OC Search'
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: $(System.ArtifactsDirectory)
ArtifactName: 'SolrClient'
publishLocation: 'Container'
displayName: 'Publish SolrClient'