diff --git a/eng/ci/integration-tests.yml b/eng/ci/integration-tests.yml new file mode 100644 index 00000000..f2946658 --- /dev/null +++ b/eng/ci/integration-tests.yml @@ -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 \ No newline at end of file diff --git a/eng/ci/official-build.yml b/eng/ci/official-build.yml index 5730600e..12e6f64e 100644 --- a/eng/ci/official-build.yml +++ b/eng/ci/official-build.yml @@ -1,5 +1,5 @@ schedules: -- cron: "0 0 * * *" +- cron: "0 20 * * *" displayName: Nightly Build branches: include: @@ -53,7 +53,6 @@ extends: - stage: TestLinux dependsOn: - - Build - TestWindows jobs: diff --git a/eng/ci/templates/official/jobs/run-e2e-tests-linux.yml b/eng/ci/templates/official/jobs/run-e2e-tests-linux.yml index d98df664..0d078d6d 100644 --- a/eng/ci/templates/official/jobs/run-e2e-tests-linux.yml +++ b/eng/ci/templates/official/jobs/run-e2e-tests-linux.yml @@ -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 @@ -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' diff --git a/eng/ci/templates/official/jobs/run-e2e-tests-windows.yml b/eng/ci/templates/official/jobs/run-e2e-tests-windows.yml index 2d7edff7..cb9e9d30 100644 --- a/eng/ci/templates/official/jobs/run-e2e-tests-windows.yml +++ b/eng/ci/templates/official/jobs/run-e2e-tests-windows.yml @@ -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 @@ -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' @@ -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"