Skip to content

Commit

Permalink
[1ES] Add end to end integration tests pipeline (#767)
Browse files Browse the repository at this point in the history
* Add 1ES pipeline for end to end tests

* Stagger nightly build runs
  • Loading branch information
kamperiadis authored Jun 11, 2024
1 parent 96f8e01 commit 387e2eb
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 8 deletions.
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

0 comments on commit 387e2eb

Please sign in to comment.