-
Notifications
You must be signed in to change notification settings - Fork 448
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[1ES] Add 1ES pipeline files (#10096)
- Loading branch information
Showing
21 changed files
with
915 additions
and
22 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
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 @@ | ||
{ "cfs": [ "CFS0001", "CFS0013", "CFS0031" ] } |
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,9 +1,16 @@ | ||
<Project> | ||
|
||
<!-- artifacts --> | ||
<PropertyGroup> | ||
<ArtifactsPath>$(MSBuildThisFileDirectory)out</ArtifactsPath> | ||
<ArtifactsPublishOutputName>pub</ArtifactsPublishOutputName> | ||
<ArtifactsPackageOutputName>pkg</ArtifactsPackageOutputName> | ||
</PropertyGroup> | ||
|
||
<!-- paths --> | ||
<PropertyGroup> | ||
<RepoRoot>$(MSBuildThisFileDirectory)</RepoRoot> | ||
<EngRoot>$(RepoRoot)eng/</EngRoot> | ||
</PropertyGroup> | ||
|
||
</Project> |
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,5 @@ | ||
<Project> | ||
|
||
<Import Project="$(EngRoot)build/Engineering.targets" /> | ||
|
||
</Project> |
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 |
---|---|---|
|
@@ -17,4 +17,4 @@ function Get-AzureFunctionsVersion { | |
$version = (& dotnet $cmd).Trim() | ||
|
||
return $version | ||
} | ||
} |
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 |
---|---|---|
|
@@ -21,4 +21,4 @@ if (!$result) | |
{ | ||
Write-Host "Vulnerabilities found" | ||
Exit 1 | ||
} | ||
} |
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
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,5 @@ | ||
<Project> | ||
|
||
<Import Project="$(MSBuildThisFileDirectory)RepositoryInfo.targets" /> | ||
|
||
</Project> |
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,35 @@ | ||
<Project> | ||
|
||
<!-- | ||
The convention for names of Azure DevOps repositories mirrored from GitHub is "{GitHub org name}.{GitHub repository name}". | ||
--> | ||
<PropertyGroup> | ||
<!-- There are quite a few git repo forms: | ||
https://azfunc@dev.azure.com/azfunc/internal/_git/azure.azure-functions-host | ||
https://dev.azure.com/azfunc/internal/_git/azure.azure-functions-host | ||
https://azfunc.visualstudio.com/internal/_git/azure.azure-functions-host | ||
azfunc@vs-ssh.visualstudio.com:v3/azfunc/internal/azure.azure-functions-host | ||
git@ssh.dev.azure.com:v3/azfunc/internal/azure.azure-functions-host | ||
--> | ||
<!-- Set DisableSourceLinkUrlTranslation to true when building a tool for internal use where sources only come from internal URIs --> | ||
<DisableSourceLinkUrlTranslation Condition="'$(DisableSourceLinkUrlTranslation)' == ''">false</DisableSourceLinkUrlTranslation> | ||
<_TranslateUrlPattern>(https://azfunc%40dev\.azure\.com/azfunc/internal/_git|https://dev\.azure\.com/azfunc/internal/_git|https://azfunc\.visualstudio\.com/internal/_git|azfunc%40vs-ssh\.visualstudio\.com:v3/azfunc/internal|git%40ssh\.dev\.azure\.com:v3/azfunc/internal)/([^/\.]+)\.(.+)</_TranslateUrlPattern> | ||
<_TranslateUrlReplacement>https://github.com/$2/$3</_TranslateUrlReplacement> | ||
</PropertyGroup> | ||
|
||
<!-- When building from Azure Devops we update SourceLink to point back to the GitHub repo. --> | ||
<Target Name="_TranslateAzureDevOpsUrlToGitHubUrl" | ||
Condition="'$(DisableSourceLinkUrlTranslation)' == 'false'" | ||
DependsOnTargets="$(SourceControlManagerUrlTranslationTargets)" | ||
BeforeTargets="SourceControlManagerPublishTranslatedUrls"> | ||
<PropertyGroup> | ||
<ScmRepositoryUrl>$([System.Text.RegularExpressions.Regex]::Replace($(ScmRepositoryUrl), $(_TranslateUrlPattern), $(_TranslateUrlReplacement)))</ScmRepositoryUrl> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<SourceRoot Update="@(SourceRoot)"> | ||
<ScmRepositoryUrl>$([System.Text.RegularExpressions.Regex]::Replace(%(SourceRoot.ScmRepositoryUrl), $(_TranslateUrlPattern), $(_TranslateUrlReplacement)))</ScmRepositoryUrl> | ||
</SourceRoot> | ||
</ItemGroup> | ||
</Target> | ||
|
||
</Project> |
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,36 @@ | ||
variables: | ||
DOTNET_NOLOGO: 1 | ||
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 | ||
DOTNET_CLI_TELEMETRY_OPTOUT: 1 | ||
|
||
pr: | ||
branches: | ||
include: | ||
- dev | ||
- in-proc | ||
- release/4.* | ||
- release/inproc6/4.* | ||
- release/inproc8/4.* | ||
|
||
resources: | ||
repositories: | ||
- repository: 1es | ||
type: git | ||
name: 1ESPipelineTemplates/1ESPipelineTemplates | ||
ref: refs/tags/release | ||
|
||
extends: | ||
template: v1/1ES.Unofficial.PipelineTemplate.yml@1es | ||
parameters: | ||
pool: | ||
name: 1es-pool-azfunc | ||
image: 1es-windows-2022 | ||
os: windows | ||
|
||
stages: | ||
- stage: Test | ||
jobs: | ||
|
||
- template: /eng/ci/templates/jobs/initialize-pipeline.yml@self | ||
- template: /eng/ci/templates/official/jobs/run-non-e2e-tests.yml@self | ||
- template: /eng/ci/templates/official/jobs/run-integration-tests.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
|
||
|
||
trigger: | ||
batch: true | ||
branches: | ||
include: | ||
- dev | ||
- in-proc | ||
- release/4.* | ||
- release/inproc6/4.* | ||
- release/inproc8/4.* | ||
|
||
# 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 | ||
- name: buildNumber | ||
value: $[ counter('build', 23000) ] # 23000 selected to be ahead of current host build | ||
- name: minorVersionPrefix | ||
${{ if contains(variables['Build.SourceBranch'], 'release/inproc6/') }}: | ||
value: "6" | ||
${{ elseif contains(variables['Build.SourceBranch'], 'release/inproc8/') }}: | ||
value: "8" | ||
${{ else }}: | ||
value: "" | ||
|
||
extends: | ||
template: v1/1ES.Official.PipelineTemplate.yml@1es | ||
parameters: | ||
pool: | ||
name: 1es-pool-azfunc | ||
image: 1es-windows-2022 | ||
os: windows | ||
|
||
stages: | ||
- stage: Initialize | ||
|
||
jobs: | ||
- template: /eng/ci/templates/jobs/initialize-pipeline.yml@self | ||
|
||
- stage: Build | ||
dependsOn: Initialize | ||
|
||
jobs: | ||
- template: /eng/ci/templates/official/jobs/build-artifacts-windows.yml@self | ||
- template: /eng/ci/templates/official/jobs/build-artifacts-linux.yml@self | ||
|
||
- stage: Test | ||
dependsOn: Initialize | ||
|
||
jobs: | ||
- template: /eng/ci/templates/jobs/run-unit-tests.yml@self | ||
- template: /eng/ci/templates/official/jobs/run-non-e2e-tests.yml@self | ||
- template: /eng/ci/templates/official/jobs/run-integration-tests.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# This build is used for public PR and CI builds. | ||
|
||
variables: | ||
buildNumber: $[ counter('build', 23000) ] # 23000 selected to be ahead of current host build | ||
${{ if contains(variables['Build.SourceBranch'], 'release/inproc6/') }}: | ||
minorVersionPrefix: "6" | ||
${{ elseif contains(variables['Build.SourceBranch'], 'release/inproc8/') }}: | ||
minorVersionPrefix: "8" | ||
${{ else }}: | ||
minorVersionPrefix: "" | ||
DOTNET_NOLOGO: 1 | ||
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 | ||
DOTNET_CLI_TELEMETRY_OPTOUT: 1 | ||
|
||
trigger: | ||
batch: true | ||
branches: | ||
include: | ||
- dev | ||
- in-proc | ||
- release/4.* | ||
- release/inproc6/4.* | ||
- release/inproc8/4.* | ||
|
||
pr: | ||
branches: | ||
include: | ||
- dev | ||
- in-proc | ||
- release/4.* | ||
- release/inproc6/4.* | ||
- release/inproc8/4.* | ||
|
||
resources: | ||
repositories: | ||
- repository: 1es | ||
type: git | ||
name: 1ESPipelineTemplates/1ESPipelineTemplates | ||
ref: refs/tags/release | ||
|
||
extends: | ||
template: v1/1ES.Unofficial.PipelineTemplate.yml@1es | ||
parameters: | ||
pool: | ||
name: 1es-pool-azfunc-public | ||
image: 1es-windows-2022 | ||
os: windows | ||
|
||
stages: | ||
- stage: Initialize | ||
|
||
jobs: | ||
- template: /eng/ci/templates/jobs/initialize-pipeline.yml@self | ||
|
||
- stage: Test | ||
dependsOn: Initialize | ||
|
||
jobs: | ||
- template: /eng/ci/templates/jobs/run-unit-tests.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
steps: | ||
|
||
- task: UseDotNet@2 # Needed by some of our test resources | ||
displayName: Install .NET 3.1 | ||
inputs: | ||
packageType: sdk | ||
version: 3.1.x | ||
|
||
- task: UseDotNet@2 # Needed by our projects and CI steps | ||
displayName: Install .NET 6 | ||
inputs: | ||
packageType: sdk | ||
version: 6.x | ||
|
||
- task: UseDotNet@2 # The pinned SDK we use to build | ||
displayName: Install .NET SDK from global.json | ||
inputs: | ||
packageType: sdk | ||
useGlobalJson: true |
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,19 @@ | ||
jobs: | ||
- job: InitializePipeline | ||
displayName: Initialize Pipeline | ||
|
||
steps: | ||
- task: UseDotNet@2 # The pinned SDK we use to build | ||
displayName: 'Install .NET SDK from global.json' | ||
inputs: | ||
packageType: sdk | ||
useGlobalJson: true | ||
|
||
- task: PowerShell@2 | ||
displayName: 'Initialize' | ||
name: Initialize | ||
inputs: | ||
filePath: build/initialize-pipeline.ps1 | ||
arguments: -minorVersionPrefix "$(minorVersionPrefix)" | ||
showWarnings: true | ||
pwsh: true |
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,24 @@ | ||
jobs: | ||
- job: RunUnitTests | ||
displayName: Run Unit Tests | ||
|
||
pool: | ||
name: 1es-pool-azfunc | ||
image: 1es-windows-2022 | ||
os: windows | ||
|
||
steps: | ||
- task: NuGetAuthenticate@1 | ||
displayName: NuGet Authenticate | ||
|
||
- template: /eng/ci/templates/install-dotnet.yml@self | ||
|
||
- task: DotNetCoreCLI@2 | ||
displayName: Unit Tests | ||
inputs: | ||
command: test | ||
testRunTitle: Unit Tests | ||
arguments: -v n | ||
projects: | | ||
**\ExtensionsMetadataGeneratorTests.csproj | ||
**\WebJobs.Script.Tests.csproj |
Oops, something went wrong.