[1ES] Added 1ES pipeline files (#23)

This commit is contained in:
Surbhi Gupta 2024-07-22 21:45:37 -07:00 коммит произвёл GitHub
Родитель 7c37215aa1
Коммит d95f54659c
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
4 изменённых файлов: 163 добавлений и 0 удалений

50
eng/ci/official-build.yml Normal file
Просмотреть файл

@ -0,0 +1,50 @@
trigger:
batch: true
branches:
include:
- main
- v0.x
schedules:
# Ensure we build nightly to catch any new CVEs and report SDL often.
- cron: "0 0 * * *"
displayName: Nightly Build
branches:
include:
- main
- v0.x
always: true
# CI only, does not trigger on PRs.
pr: none
resources:
repositories:
- repository: 1es
type: git
name: 1ESPipelineTemplates/1ESPipelineTemplates
ref: refs/tags/release
- repository: eng
type: git
name: engineering
ref: refs/tags/release
variables:
- template: ci/variables/build.yml@eng
- template: ci/variables/cfs.yml@eng
- template: /eng/ci/templates/variables/build.yml@self
extends:
template: v1/1ES.Official.PipelineTemplate.yml@1es
parameters:
pool:
name: 1es-pool-azfunc
image: 1es-windows-2022
os: windows
stages:
- stage: Build
jobs:
- template: /eng/ci/templates/jobs/build-artifacts.yml@self
parameters:
SkipBuildArtifacts: false

51
eng/ci/public-build.yml Normal file
Просмотреть файл

@ -0,0 +1,51 @@
# This build is used for public PR and CI builds.
trigger:
batch: true
branches:
include:
- main
- v0.x
schedules:
# Ensure we build nightly to catch any new CVEs and report SDL often.
- cron: "0 0 * * *"
displayName: Nightly Build
branches:
include:
- main
- v0.x
always: true
pr:
branches:
include:
- main
- v0.x
resources:
repositories:
- repository: 1es
type: git
name: 1ESPipelineTemplates/1ESPipelineTemplates
ref: refs/tags/release
variables:
- template: ci/variables/build.yml@eng
- template: ci/variables/cfs.yml@eng
- template: /eng/ci/templates/variables/build.yml@self
extends:
template: v1/1ES.Unofficial.PipelineTemplate.yml@1es
parameters:
pool:
name: 1es-pool-azfunc
image: 1es-windows-2022
os: windows
stages:
- stage: Build
jobs:
- template: /eng/ci/templates/jobs/build-artifacts.yml@self
parameters:
SkipBuildArtifacts: true

Просмотреть файл

@ -0,0 +1,54 @@
parameters:
- name: SkipBuildArtifacts
type: boolean
default: false
jobs:
- job: BuildArtifacts
displayName: Build Artifacts
pool:
name: 1es-pool-azfunc
image: 1es-windows-2022
os: windows
variables:
- template: /eng/ci/templates/variables/build.yml@self
templateContext:
outputParentDirectory: $(System.DefaultWorkingDirectory)/packages
outputs:
- ${{ if eq(parameters.SkipBuildArtifacts, false) }}:
- output: pipelineArtifact
displayName: Publish artifacts
path: $(System.DefaultWorkingDirectory)/packages
artifact: drop
steps:
- pwsh: dotnet --version
displayName: "Echo dotnet version"
- task: DotNetCoreCLI@2
displayName: 'Build project'
inputs:
command: 'build'
arguments: '-c $(buildConfiguration)'
projects: 'Azure.Web.DataProtection.sln'
- task: DotNetCoreCLI@2
displayName: 'Run tests'
inputs:
command: 'test'
arguments: '--no-build -c $(buildConfiguration)'
projects: 'Azure.Web.DataProtection.sln'
- ${{ if eq(parameters.SkipBuildArtifacts, false) }}:
- task: DotNetCoreCLI@2
displayName: 'Build package'
inputs:
command: 'custom'
custom: 'pack'
arguments: '--no-build -c Release -p:Version="$(versionPrefix).$(buildVersion)-$(versionSuffix)" -o packages'
projects: |
**/Azure.WebSites.DataProtection.csproj

Просмотреть файл

@ -0,0 +1,8 @@
variables:
buildConfiguration: 'Release'
buildVersion: $[ counter('constant', 94) ]
versionPrefix: '2.1'
versionSuffix: 'alpha'
DOTNET_NOLOGO: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1