This repository has been archived by the owner on Jun 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathgo_module_main.yml
93 lines (74 loc) · 2.38 KB
/
go_module_main.yml
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# PIPELINE CONFIGURATION
parameters:
# Artifact feed to pull custom packages from (pass blank if not using).
- name: pypiAzureArtifactFeed
type: string
default: "-"
# Repo containing helper scripts.
- name: scriptsRepo
type: string
default: git@github.com:illuscio-dev/azure-pipelines-scripts.git
# Python version to use for python tasks.
- name: pythonVersion
type: string
default: '3.8'
# Link to go compiler to use.
- name: goVersionLinkLinux
type: string
default: https://dl.google.com/go/go1.14.linux-amd64.tar.gz
# Minimum coverage allowed for successful release.
- name: minimumCoverage
type: number
default: 0.85
# Whether to build and publish docs.
- name: publishDocs
type: boolean
default: true
# Whether to publish docs to S3.
- name: publishDocsS3
type: boolean
default: true
jobs:
- job: 'Test_Lint_Build'
timeoutInMinutes: 5
cancelTimeoutInMinutes: 2
pool:
vmImage: 'ubuntu-16.04'
steps:
# Setup git environment
- template: git_setup.yml
# Download python helper scripts
- template: scripts_download.yml
# Setup python environment
- template: python_setup.yml
parameters:
pythonVersion: ${{ parameters.pythonVersion }}
pypiAzureArtifactFeed: ${{ parameters.pypiAzureArtifactFeed }}
# Setup go environment
- template: go_setup.yml
parameters:
goVersionLink: ${{ parameters.goVersionLinkLinux }}
# Get Repo Name
- script: python3 $(BUILD_SCRIPTS_DIR)/get_repo_name.py
displayName: 'Get repo name'
# Run job
- script: revive -config revive.toml ./...
displayName: 'Lint'
# Release the module on github.
- template: go_run_tests.yml
parameters:
minimumCoverage: ${{ parameters.minimumCoverage }}
# Get the release version
- script: python3 $(BUILD_SCRIPTS_DIR)/get_release_version.py
displayName: 'get release version'
env:
PublishLanguage: "GO"
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/dev'))
# Generate docs.
- template: go_module_docs.yml
parameters:
publishDocs: ${{ parameters.publishDocs }}
publishDocsS3: ${{ parameters.publishDocsS3 }}
# Merge build to master and tag as release version (this is how go modules are
# published).
- template: git_update_master_version.yml