-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Release and CI build pipelines (#65)
- Loading branch information
Showing
5 changed files
with
204 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,34 @@ | ||
name: Build | ||
trigger: none | ||
pr: none | ||
trigger: | ||
branches: | ||
include: | ||
- main | ||
paths: | ||
exclude: | ||
- azure-pipelines/release.yml | ||
|
||
stages: | ||
- stage: A | ||
jobs: | ||
- job: A1 | ||
steps: | ||
- bash: echo "Hello world" | ||
resources: | ||
repositories: | ||
- repository: 1ESPipelineTemplates | ||
type: git | ||
name: 1ESPipelineTemplates/1ESPipelineTemplates | ||
ref: refs/tags/release | ||
|
||
variables: | ||
TeamName: sarif-tools | ||
|
||
extends: | ||
template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates | ||
parameters: | ||
sdl: | ||
sourceAnalysisPool: VSEngSS-MicroBuild2022-1ES | ||
pool: | ||
name: AzurePipelines-EO | ||
demands: | ||
- ImageOverride -equals 1ESPT-Ubuntu22.04 | ||
os: Linux | ||
customBuildTags: | ||
- ES365AIMigrationTooling | ||
stages: | ||
- template: templates/build_stage.yml@self |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
stages: | ||
- stage: Build | ||
variables: | ||
- template: globals.yml | ||
jobs: | ||
- job: Build | ||
|
||
templateContext: | ||
outputs: | ||
- output: pipelineArtifact | ||
targetPath: $(Build.StagingDirectory)/dist | ||
sbomBuildDropPath: $(Build.StagingDirectory)/dist | ||
artifactName: $(ARTIFACT_NAME_WHEEL) | ||
|
||
variables: | ||
python.version: "3.8" | ||
architecture: x64 | ||
|
||
steps: | ||
- template: use_python.yml@self | ||
|
||
- script: pipx install poetry | ||
displayName: Install Poetry | ||
|
||
- script: poetry build --no-interaction | ||
displayName: poetry build | ||
|
||
- powershell: | | ||
$releaseVersion = & poetry version --short | ||
echo "releaseVersion: $releaseVersion" | ||
echo "##vso[task.setvariable variable=releaseVersion]$releaseVersion" | ||
echo "##vso[task.setvariable variable=releaseVersionWithPrefix;isOutput=true]v$releaseVersion" | ||
displayName: Get release version | ||
name: getReleaseVersionStep | ||
- task: CopyFiles@2 | ||
displayName: Copy wheel and tarball | ||
inputs: | ||
sourceFolder: dist | ||
targetFolder: $(Build.StagingDirectory)/dist | ||
contents: | | ||
sarif_tools-$(releaseVersion)-py3-none-any.whl | ||
sarif_tools-$(releaseVersion).tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
variables: | ||
ARTIFACT_NAME_WHEEL: wheel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
steps: | ||
- task: UsePythonVersion@0 | ||
inputs: | ||
versionSpec: "$(python.version)" | ||
architecture: "$(architecture)" | ||
displayName: "Use Python $(python.version) $(architecture)" |