Skip to content

Commit

Permalink
Refactor pipelines - Spring Grove (#1031)
Browse files Browse the repository at this point in the history
* refactor pipelines to be compatible with 1es templates
* add build-in release phase utilizing ESRP task
  • Loading branch information
scbedd authored Jun 6, 2024
1 parent 10557cd commit b3a9b4c
Show file tree
Hide file tree
Showing 27 changed files with 99,022 additions and 108,098 deletions.
50 changes: 0 additions & 50 deletions .ci/validate-examples-regression-sample.yml

This file was deleted.

3 changes: 2 additions & 1 deletion ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Change Log - oav

## 05/31/2024 3.3.6
## 06/03/2024 3.3.6

- Support all current LTS Node versions (>=18.0.0)
- Bump `newman` dependency to `~6.0.0`.

## 05/7/2024 3.3.5

Expand Down
79 changes: 0 additions & 79 deletions azure-pipelines-securitytasks.yml

This file was deleted.

61 changes: 0 additions & 61 deletions azure-pipelines.yml

This file was deleted.

17 changes: 17 additions & 0 deletions ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
trigger:
branches:
include:
- develop
- hotfix/*
- release/*

pr:
branches:
include:
- develop
- feature/*
- hotfix/*
- release/*

extends:
template: /eng/templates/stages/oav.yml
9 changes: 0 additions & 9 deletions credScanSuppressions.json

This file was deleted.

19 changes: 19 additions & 0 deletions eng/scripts/determine-release-tag.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Read the package.json file
$packageJsonPath = "$PSScriptRoot/../../package.json"
$packageJson = Get-Content $packageJsonPath -Raw | ConvertFrom-Json

# Function to check if a version is non-GA
function Is-NonGA($version) {
return $version -match "-(alpha|beta|rc|pre)"
}


$pkgVersion = $packageJson.version

if (Is-NonGA($pkgVersion)) {
Write-Host "##vso[task.setvariable variable=Tag;]beta"
}
else {
Write-Host "##vso[task.setvariable variable=Tag;]latest"
}

File renamed without changes.
2 changes: 1 addition & 1 deletion scripts/testNetwork.ts → eng/scripts/testNetwork.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as oav from "../index";
import * as oav from "../../index";
//import * as fs from "fs"
//import * as path from "path"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# TODO: refactor the hilariously common jobs

parameters:
- name: BeforeVersion
type: string
Expand All @@ -8,9 +6,13 @@ parameters:
type: string
default: 'LOCAL' #specialcase value that will install the local version of oav

variables:
- template: /eng/templates/variables/image.yml

pool:
name: azsdk-pool-mms-ubuntu-2004-general
vmImage: MMSUbuntu20.04
name: $(LINUXPOOL)
image: $(LINUXVMIMAGE)
os: linux

jobs:
- job: RegressionASpecs
Expand All @@ -22,7 +24,7 @@ jobs:
timeoutInMinutes: 360
displayName: Run ${{ parameters.BeforeVersion }} Specs
steps:
- template: ./regression-steps.yml
- template: ../steps/deep-regression-steps.yml
parameters:
TargetVersion: ${{ parameters.BeforeVersion }}
Type: "validate-spec"
Expand All @@ -36,7 +38,7 @@ jobs:
timeoutInMinutes: 360
displayName: Run ${{ parameters.BeforeVersion }} Examples
steps:
- template: ./regression-steps.yml
- template: ../steps/deep-regression-steps.yml
parameters:
TargetVersion: ${{ parameters.BeforeVersion }}
Type: "validate-example"
Expand All @@ -50,7 +52,7 @@ jobs:
timeoutInMinutes: 360
displayName: Run ${{ parameters.AfterVersion }} Specs
steps:
- template: ./regression-steps.yml
- template: ../steps/deep-regression-steps.yml
parameters:
TargetVersion: ${{ parameters.AfterVersion }}
Type: "validate-spec"
Expand All @@ -64,7 +66,7 @@ jobs:
timeoutInMinutes: 360
displayName: Run ${{ parameters.AfterVersion }} Examples
steps:
- template: ./regression-steps.yml
- template: ../steps/deep-regression-steps.yml
parameters:
TargetVersion: ${{ parameters.AfterVersion }}
Type: "validate-example"
Expand Down
64 changes: 64 additions & 0 deletions eng/templates/stages/1es-redirect.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
resources:
repositories:
- repository: 1ESPipelineTemplates
type: git
name: 1ESPipelineTemplates/1ESPipelineTemplates
ref: refs/tags/release
- repository: 1ESPipelineTemplatesCanary
type: git
name: 1ESPipelineTemplates/1ESPipelineTemplates
ref: refs/tags/canary

parameters:
- name: stages
type: stageList
default: []
- name: Use1ESOfficial
type: boolean
default: true
- name: oneESTemplateTag
type: string
default: release

extends:
${{ if and(parameters.Use1ESOfficial, eq(parameters.oneESTemplateTag, 'canary')) }}:
template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplatesCanary
${{ elseif eq(parameters.oneESTemplateTag, 'canary') }}:
template: v1/1ES.Unofficial.PipelineTemplate.yml@1ESPipelineTemplatesCanary
${{ elseif and(parameters.Use1ESOfficial, eq(variables['System.TeamProject'], 'internal')) }}:
template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates
${{ else }}:
template: v1/1ES.Unofficial.PipelineTemplate.yml@1ESPipelineTemplates
parameters:
${{ if eq(parameters.oneESTemplateTag, 'canary') }}:
# Enable 1es template team to verify validation has been run on canary
customBuildTags:
- 1ES.PT.Tag-refs/tags/canary
settings:
skipBuildTagsForGitHubPullRequests: true
sdl:
git:
longpaths: true
submodules: false
sourceRepositoriesToScan:
include:
- repository: self
submodule: false
runInSingleJob: true
sourceAnalysisPool:
name: azsdk-pool-mms-win-2022-general
image: azsdk-pool-mms-win-2022-1espt
os: windows
eslint:
enabled: false
justificationForDisabling: "ESLint injected task has failures because it uses an old version of mkdirp. We should not fail for tools not controlled by the repo. See: https://dev.azure.com/azur 19 e-sdk/internal/_build/results?buildId=3556850"
codeql:
compiled:
enabled: false
justificationForDisabling: "CodeQL times our pipelines out by running for 2+ hours before being force canceled."
psscriptanalyzer:
compiled: true
break: true
policy: M365

stages: ${{ parameters.stages }}
Loading

0 comments on commit b3a9b4c

Please sign in to comment.