Skip to content

Commit 3c718ae

Browse files
committed
Build + Release pipelines v1 (test)
1 parent fc5004b commit 3c718ae

3 files changed

Lines changed: 199 additions & 0 deletions

File tree

eng/ci/official-build.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
variables:
2+
- template: ci/variables/cfs.yml@eng
3+
4+
trigger:
5+
batch: true
6+
branches:
7+
include:
8+
- main
9+
10+
# CI only, does not trigger on PRs.
11+
pr: none
12+
13+
schedules:
14+
# Build nightly to catch any new CVEs and report SDL often.
15+
# We are also required to generate CodeQL reports weekly, so this
16+
# helps us meet that.
17+
- cron: "0 5 * * *"
18+
displayName: Nightly Build
19+
branches:
20+
include:
21+
- main
22+
always: true
23+
24+
resources:
25+
repositories:
26+
- repository: 1es
27+
type: git
28+
name: 1ESPipelineTemplates/1ESPipelineTemplates
29+
ref: refs/tags/release
30+
- repository: eng
31+
type: git
32+
name: engineering
33+
ref: refs/tags/release
34+
35+
extends:
36+
template: v1/1ES.Official.PipelineTemplate.yml@1es
37+
parameters:
38+
pool:
39+
name: 1es-pool-azfunc
40+
image: 1es-ubuntu-22.04
41+
os: linux
42+
${{ if eq( variables['Build.Reason'], 'Schedule' ) }}:
43+
demands:
44+
- Priority -equals Low
45+
sdl:
46+
sourceAnalysisPool:
47+
name: 1es-pool-azfunc
48+
image: 1es-windows-2022
49+
os: windows
50+
51+
stages:
52+
- stage: BuildAndSign
53+
dependsOn: []
54+
jobs:
55+
- template: /eng/templates/build.yml@self

eng/ci/release.yml

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
pr: none
2+
trigger: none
3+
4+
resources:
5+
repositories:
6+
- repository: 1ESPipelineTemplates
7+
type: git
8+
name: 1ESPipelineTemplates/1ESPipelineTemplates
9+
ref: refs/tags/release
10+
pipelines:
11+
- pipeline: DurableTaskPythonBuildPipeline
12+
source: durabletask-python.official
13+
branch: main
14+
15+
extends:
16+
template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates
17+
parameters:
18+
pool:
19+
name: 1es-pool-azfunc
20+
image: 1es-ubuntu-22.04
21+
os: linux
22+
23+
stages:
24+
- stage: release
25+
jobs:
26+
- job: durabletask
27+
displayName: "Release durabletask"
28+
templateContext:
29+
type: releaseJob
30+
isProduction: true
31+
inputs:
32+
- input: pipelineArtifact
33+
pipeline: DurableTaskPythonBuildPipeline
34+
artifactName: drop
35+
targetPath: $(System.DefaultWorkingDirectory)/drop
36+
37+
steps:
38+
- task: SFP.release-tasks.custom-build-release-task.EsrpRelease@9
39+
displayName: "ESRP Release durabletask"
40+
inputs:
41+
connectedservicename: "dtfx-internal-esrp-prod"
42+
usemanagedidentity: true
43+
keyvaultname: "durable-esrp-akv"
44+
signcertname: "dts-esrp-cert"
45+
clientid: "0b3ed1a4-0727-4a50-b82a-02c2bd9dec89"
46+
intent: "PackageDistribution"
47+
# DRY-RUN: set to "NPM" while bringing up the pipeline so ESRP
48+
# signs and processes the artifact but does NOT push to PyPI
49+
# (mismatched destination router). Switch back to "PyPi" for
50+
# real releases. See https://aka.ms/python/publish.
51+
contenttype: "NPM"
52+
contentsource: "Folder"
53+
folderlocation: "$(System.DefaultWorkingDirectory)/drop/buildoutputs/durabletask"
54+
waitforreleasecompletion: true
55+
owners: "wangbill@microsoft.com"
56+
approvers: "kaibocai@microsoft.com"
57+
serviceendpointurl: "https://api.esrp.microsoft.com"
58+
mainpublisher: "durabletask-java"
59+
domaintenantid: "33e01921-4d64-4f8c-a055-5bdaffd5e33d"
60+
61+
- job: durabletask_azuremanaged
62+
displayName: "Release durabletask-azuremanaged"
63+
templateContext:
64+
type: releaseJob
65+
isProduction: true
66+
inputs:
67+
- input: pipelineArtifact
68+
pipeline: DurableTaskPythonBuildPipeline
69+
artifactName: drop
70+
targetPath: $(System.DefaultWorkingDirectory)/drop
71+
72+
steps:
73+
- task: SFP.release-tasks.custom-build-release-task.EsrpRelease@9
74+
displayName: "ESRP Release durabletask-azuremanaged"
75+
inputs:
76+
connectedservicename: "dtfx-internal-esrp-prod"
77+
usemanagedidentity: true
78+
keyvaultname: "durable-esrp-akv"
79+
signcertname: "dts-esrp-cert"
80+
clientid: "0b3ed1a4-0727-4a50-b82a-02c2bd9dec89"
81+
intent: "PackageDistribution"
82+
# DRY-RUN: set to "NPM" while bringing up the pipeline so ESRP
83+
# signs and processes the artifact but does NOT push to PyPI
84+
# (mismatched destination router). Switch back to "PyPi" for
85+
# real releases. See https://aka.ms/python/publish.
86+
contenttype: "NPM"
87+
contentsource: "Folder"
88+
folderlocation: "$(System.DefaultWorkingDirectory)/drop/buildoutputs/durabletask-azuremanaged"
89+
waitforreleasecompletion: true
90+
owners: "wangbill@microsoft.com"
91+
approvers: "kaibocai@microsoft.com"
92+
serviceendpointurl: "https://api.esrp.microsoft.com"
93+
mainpublisher: "durabletask-java"
94+
domaintenantid: "33e01921-4d64-4f8c-a055-5bdaffd5e33d"

eng/templates/build.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
jobs:
2+
- job:
3+
templateContext:
4+
outputs:
5+
- output: pipelineArtifact
6+
path: $(Build.ArtifactStagingDirectory)
7+
artifact: drop
8+
sbomBuildDropPath: "$(System.DefaultWorkingDirectory)"
9+
sbomPackageName: "Durable Task Python SBOM"
10+
11+
steps:
12+
- checkout: self
13+
14+
- task: UsePythonVersion@0
15+
displayName: "Use Python 3.12"
16+
inputs:
17+
versionSpec: "3.12"
18+
addToPath: true
19+
20+
# Install build + lint tooling
21+
- script: |
22+
python -m pip install --upgrade pip
23+
python -m pip install build flake8
24+
displayName: "Install build tooling"
25+
26+
# Lint core SDK
27+
- script: flake8 .
28+
displayName: "flake8: durabletask"
29+
workingDirectory: durabletask
30+
31+
# Lint azuremanaged provider
32+
- script: flake8 .
33+
displayName: "flake8: durabletask-azuremanaged"
34+
workingDirectory: durabletask-azuremanaged
35+
36+
# Build sdist + wheel for durabletask (core SDK)
37+
- script: |
38+
python -m build --sdist --wheel --outdir $(Build.ArtifactStagingDirectory)/buildoutputs/durabletask .
39+
displayName: "Build durabletask (sdist + wheel)"
40+
41+
# Build sdist + wheel for durabletask-azuremanaged
42+
- script: |
43+
python -m build --sdist --wheel --outdir $(Build.ArtifactStagingDirectory)/buildoutputs/durabletask-azuremanaged ./durabletask-azuremanaged
44+
displayName: "Build durabletask-azuremanaged (sdist + wheel)"
45+
46+
# List staged outputs for visibility in logs
47+
- script: |
48+
ls -la $(Build.ArtifactStagingDirectory)/buildoutputs/durabletask
49+
ls -la $(Build.ArtifactStagingDirectory)/buildoutputs/durabletask-azuremanaged
50+
displayName: "List build outputs"

0 commit comments

Comments
 (0)