Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1ES] Add end to end integration tests pipeline #767

Merged
merged 2 commits into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions eng/ci/integration-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
trigger: none # ensure this is not ran as a CI build

pr:
branches:
include:
- dev
- release/*

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

extends:
template: v1/1ES.Unofficial.PipelineTemplate.yml@1es
parameters:
pool:
name: 1es-pool-azfunc
image: 1es-windows-2022
os: windows

stages:
- stage: TestWindows
jobs:
- template: /eng/ci/templates/official/jobs/run-e2e-tests-windows.yml@self

- stage: TestLinux
dependsOn:
- TestWindows

jobs:
- template: /eng/ci/templates/official/jobs/run-e2e-tests-linux.yml@self
3 changes: 1 addition & 2 deletions eng/ci/official-build.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
schedules:
- cron: "0 0 * * *"
- cron: "0 20 * * *"
displayName: Nightly Build
branches:
include:
Expand Down Expand Up @@ -53,7 +53,6 @@ extends:

- stage: TestLinux
dependsOn:
- Build
- TestWindows

jobs:
Expand Down
17 changes: 14 additions & 3 deletions eng/ci/templates/official/jobs/run-e2e-tests-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ jobs:
os: linux

variables:
buildNumber: $[ stageDependencies.Build.Build.outputs['output.buildNumber'] ]
ApplicationInsightAgentVersion: 3.5.1
${{ if contains(variables['Build.SourceBranch'], '/tags/' ) }}:
isTagTemp: true
isTag: $[variables.isTagTemp]
ApplicationInsightAgentVersion: 3.5.2

strategy:
maxParallel: 1
Expand Down Expand Up @@ -53,7 +55,16 @@ jobs:
java -version
displayName: 'Check default java version'
- pwsh: |
.\package-pipeline.ps1 -buildNumber $(buildNumber)
if ("$(isTag)"){
$buildNumber="$(Build.SourceBranchName)"
Write-Host "Found git tag."
}
else {
$buildNumber="$(Build.BuildNumber)-v4"
Write-Host "git tag not found. Setting package suffix to '$buildNumber'"
}
Write-Host "##vso[task.setvariable variable=buildNumber;isOutput=true;]$buildNumber"
.\package-pipeline.ps1 -buildNumber $buildNumber
displayName: 'Executing build script'
- task: UseDotNet@2
displayName: 'Install .NET 6'
Expand Down
18 changes: 15 additions & 3 deletions eng/ci/templates/official/jobs/run-e2e-tests-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ jobs:
os: windows

variables:
buildNumber: $[ stageDependencies.Build.Build.outputs['output.buildNumber'] ]
ApplicationInsightAgentVersion: 3.5.1
${{ if contains(variables['Build.SourceBranch'], '/tags/' ) }}:
isTagTemp: true
isTag: $[variables.isTagTemp]
ApplicationInsightAgentVersion: 3.5.2

strategy:
maxParallel: 1
Expand Down Expand Up @@ -43,7 +45,16 @@ jobs:
java -version
displayName: 'Check default java version'
- pwsh: |
.\package-pipeline.ps1 -buildNumber $(buildNumber)
if ("$(isTag)"){
$buildNumber="$(Build.SourceBranchName)"
Write-Host "Found git tag."
}
else {
$buildNumber="$(Build.BuildNumber)-v4"
Write-Host "git tag not found. Setting package suffix to '$buildNumber'"
}
Write-Host "##vso[task.setvariable variable=buildNumber;isOutput=true;]$buildNumber"
.\package-pipeline.ps1 -buildNumber $buildNumber
displayName: 'Executing build script'
- task: UseDotNet@2
displayName: 'Install .NET 6'
Expand All @@ -61,6 +72,7 @@ jobs:
- pwsh: |
.\setup-tests-pipeline.ps1
displayName: 'Setup test environment -- Install the Core Tools'

- pwsh: |
$currDir = Get-Location
$Env:Path = $Env:Path+";$currDir/Azure.Functions.Cli"
Expand Down