Skip to content

Commit

Permalink
Simplify build yml (#36567)
Browse files Browse the repository at this point in the history
* make advanced build the default build template choice in preparation for pipelinev3 
* only build windows and mac packages if necessary, as indicated by a service directory of "storage"
* remove job coalesce as unnecessary

---------

Co-authored-by: Wes Haggard <[email protected]>
  • Loading branch information
scbedd and weshaggard authored Jul 25, 2024
1 parent c100927 commit 6f0da99
Show file tree
Hide file tree
Showing 14 changed files with 163 additions and 190 deletions.
5 changes: 1 addition & 4 deletions eng/pipelines/templates/jobs/ci.tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,7 @@ jobs:
InjectedPackages: $(InjectedPackages)
TestProxy: ${{ parameters.TestProxy }}
BeforeTestSteps:
- task: DownloadPipelineArtifact@2
inputs:
artifactName: 'packages'
targetPath: $(Build.ArtifactStagingDirectory)
- template: /eng/pipelines/templates/steps/download-package-artifacts.yml

- template: ../steps/set-dev-build.yml
parameters:
Expand Down
185 changes: 56 additions & 129 deletions eng/pipelines/templates/jobs/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,141 +61,68 @@ parameters:
- name: GenerateApiReviewForManualOnly
type: boolean
default: false
- name: AdvancedBuild
type: boolean
default: false

jobs:
- job: 'Build_Linux'
timeoutInMinutes: 90

- ${{ if eq(parameters['AdvancedBuild'], false) }}:
- job: 'Build'
timeoutInMinutes: 90

pool:
name: $(LINUXPOOL)
image: $(LINUXVMIMAGE)
os: linux

steps:
- template: /eng/pipelines/templates/steps/targeting-string-resolve.yml
parameters:
BuildTargetingString: ${{ parameters.BuildTargetingString }}

- template: ../steps/build-package-artifacts.yml
parameters:
ServiceDirectory: ${{ parameters.ServiceDirectory }}
BeforePublishSteps: ${{ parameters.BeforePublishSteps }}
TestPipeline: ${{ parameters.TestPipeline }}
Artifacts: ${{ parameters.Artifacts }}

- ${{ if eq(parameters['AdvancedBuild'], true) }}:
- job: 'Build_Linux'
timeoutInMinutes: 90

pool:
name: $(LINUXPOOL)
image: $(LINUXVMIMAGE)
os: linux

steps:
- template: /eng/pipelines/templates/steps/targeting-string-resolve.yml
parameters:
BuildTargetingString: ${{ parameters.BuildTargetingString }}

- template: ../steps/build-package-artifacts.yml
parameters:
ServiceDirectory: ${{ parameters.ServiceDirectory }}
BeforePublishSteps: ${{ parameters.BeforePublishSteps }}
TestPipeline: ${{ parameters.TestPipeline }}
Artifacts: ${{ parameters.Artifacts }}
ArtifactSuffix: linux
UseVirtualEnvironment: false

- job: 'Build_Windows'
timeoutInMinutes: 90

pool:
name: $(WINDOWSPOOL)
image: $(WINDOWSVMIMAGE)
os: windows

steps:
- template: /eng/pipelines/templates/steps/targeting-string-resolve.yml
parameters:
BuildTargetingString: ${{ parameters.BuildTargetingString }}

- template: ../steps/build-package-artifacts.yml
parameters:
ServiceDirectory: ${{ parameters.ServiceDirectory }}
BeforePublishSteps: ${{ parameters.BeforePublishSteps }}
TestPipeline: ${{ parameters.TestPipeline }}
Artifacts: ${{ parameters.Artifacts }}
ArtifactSuffix: windows
UseVirtualEnvironment: false

- job: 'Build_MacOS'
timeoutInMinutes: 90

pool:
name: $(MACPOOL)
vmImage: $(MACVMIMAGE)
os: macOS

steps:
- template: /eng/pipelines/templates/steps/targeting-string-resolve.yml
parameters:
BuildTargetingString: ${{ parameters.BuildTargetingString }}
pool:
name: $(LINUXPOOL)
image: $(LINUXVMIMAGE)
os: linux

- template: ../steps/build-package-artifacts.yml
parameters:
ServiceDirectory: ${{ parameters.ServiceDirectory }}
BeforePublishSteps: ${{ parameters.BeforePublishSteps }}
TestPipeline: ${{ parameters.TestPipeline }}
Artifacts: ${{ parameters.Artifacts }}
ArtifactSuffix: mac
UseVirtualEnvironment: false
steps:
- template: /eng/pipelines/templates/steps/build.yml
parameters:
ServiceDirectory: ${{ parameters.ServiceDirectory }}
BuildTargetingString: ${{ parameters.BuildTargetingString }}
BeforePublishSteps: ${{ parameters.BeforePublishSteps }}
TestPipeline: ${{ parameters.TestPipeline }}
ArtifactSuffix: linux
Artifacts: ${{ parameters.Artifacts }}

- job: 'CoalesceBuildArtifacts'
displayName: Combine Built Artifacts
dependsOn:
- 'Build_Linux'
- 'Build_Windows'
- 'Build_MacOS'
timeoutInMinutes: 90
- job: 'Build_Windows'
timeoutInMinutes: 90

pool:
name: $(LINUXPOOL)
image: $(LINUXVMIMAGE)
os: linux
pool:
name: $(WINDOWSPOOL)
image: $(WINDOWSVMIMAGE)
os: windows

steps:
- task: DownloadPipelineArtifact@2
inputs:
artifactName: 'packages_windows'
targetPath: $(Build.ArtifactStagingDirectory)/packages
steps:
- template: /eng/pipelines/templates/steps/build.yml
parameters:
ServiceDirectory: ${{ parameters.ServiceDirectory }}
BuildTargetingString: ${{ parameters.BuildTargetingString }}
BeforePublishSteps: ${{ parameters.BeforePublishSteps }}
TestPipeline: ${{ parameters.TestPipeline }}
ArtifactSuffix: windows
Artifacts: ${{ parameters.Artifacts }}

- task: DownloadPipelineArtifact@2
inputs:
artifactName: 'packages_mac'
targetPath: $(Build.ArtifactStagingDirectory)/packages
- job: 'Build_MacOS'
timeoutInMinutes: 90

- task: DownloadPipelineArtifact@2
inputs:
artifactName: 'packages_linux'
targetPath: $(Build.ArtifactStagingDirectory)/packages
pool:
name: $(MACPOOL)
vmImage: $(MACVMIMAGE)
os: macOS

- template: /eng/common/pipelines/templates/steps/publish-1es-artifact.yml
parameters:
ArtifactPath: '$(Build.ArtifactStagingDirectory)/packages'
ArtifactName: 'packages'
steps:
- template: /eng/pipelines/templates/steps/build.yml
parameters:
ServiceDirectory: ${{ parameters.ServiceDirectory }}
BuildTargetingString: ${{ parameters.BuildTargetingString }}
BeforePublishSteps: ${{ parameters.BeforePublishSteps }}
TestPipeline: ${{ parameters.TestPipeline }}
ArtifactSuffix: mac
Artifacts: ${{ parameters.Artifacts }}

- job: 'Build_Extended'
displayName: Build Extended
dependsOn:
- ${{ if eq(parameters['AdvancedBuild'], true) }}:
- 'CoalesceBuildArtifacts'
- ${{ else }}:
- 'Build'
- 'Build_Linux'
- 'Build_Windows'
- 'Build_MacOS'

timeoutInMinutes: 90

Expand All @@ -205,6 +132,8 @@ jobs:
os: linux

steps:
- template: /eng/pipelines/templates/steps/download-package-artifacts.yml

- template: /eng/pipelines/templates/steps/targeting-string-resolve.yml
parameters:
BuildTargetingString: ${{ parameters.BuildTargetingString }}
Expand Down Expand Up @@ -272,10 +201,9 @@ jobs:
OsVmImage: azsdk-pool-mms-ubuntu-2004-1espt
Pool: azsdk-pool-mms-ubuntu-2004-general
DependsOn:
- ${{ if eq(parameters['AdvancedBuild'], true) }}:
- 'CoalesceBuildArtifacts'
- ${{ else }}:
- 'Build'
- 'Build_Linux'
- 'Build_Windows'
- 'Build_MacOS'
MatrixConfigs: ${{ parameters.MatrixConfigs }}
MatrixFilters: ${{ parameters.MatrixFilters }}
MatrixReplace: ${{ parameters.MatrixReplace }}
Expand Down Expand Up @@ -327,10 +255,9 @@ jobs:
CloudConfig:
Cloud: Public
DependsOn:
- ${{ if eq(parameters['AdvancedBuild'], true) }}:
- 'CoalesceBuildArtifacts'
- ${{ else }}:
- 'Build'
- 'Build_Linux'
- 'Build_Windows'
- 'Build_MacOS'
AdditionalParameters:
BuildTargetingString: ${{ parameters.BuildTargetingString }}
ServiceDirectory: ${{ parameters.ServiceDirectory }}
Expand Down
7 changes: 2 additions & 5 deletions eng/pipelines/templates/jobs/regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,10 @@ jobs:
displayName: 'Use Python 3.9'
inputs:
versionSpec: '3.9'

- template: /eng/pipelines/templates/steps/use-venv.yml

- task: DownloadPipelineArtifact@2
inputs:
artifactName: 'packages'
targetPath: $(Build.ArtifactStagingDirectory)
- template: /eng/pipelines/templates/steps/download-package-artifacts.yml

- pwsh: |
mkdir -p $(TEST_PROXY_FOLDER)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ stages:
deploy:
steps:
- checkout: self

- download: current
artifact: ${{parameters.ArtifactName}}
timeoutInMinutes: 5
Expand Down Expand Up @@ -294,7 +295,6 @@ stages:
name: azsdk-pool-mms-ubuntu-2004-general
os: linux
steps:
- checkout: none
- download: current
artifact: ${{parameters.ArtifactName}}
timeoutInMinutes: 5
Expand Down
4 changes: 0 additions & 4 deletions eng/pipelines/templates/stages/archetype-sdk-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,6 @@ parameters:
- name: GenerateApiReviewForManualOnly
type: boolean
default: false
- name: AdvancedBuild
type: boolean
default: false
- name: oneESTemplateTag
type: string
default: release
Expand Down Expand Up @@ -113,7 +110,6 @@ extends:
ValidateFormatting: ${{ parameters.ValidateFormatting }}
TestProxy: ${{ parameters.TestProxy }}
GenerateApiReviewForManualOnly: ${{ parameters.GenerateApiReviewForManualOnly }}
AdvancedBuild: ${{ parameters.AdvancedBuild }}

variables:
- template: /eng/pipelines/templates/variables/globals.yml
Expand Down
5 changes: 0 additions & 5 deletions eng/pipelines/templates/steps/build-extended-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@ parameters:

# Please use `$(TargetingString)` to refer to the python packages glob string. This was previously `${{ parameters.BuildTargetingString }}`.
steps:
- task: DownloadPipelineArtifact@2
inputs:
artifactName: 'packages'
targetPath: $(Build.ArtifactStagingDirectory)

- task: UsePythonVersion@0
displayName: 'Use Python 3.11'
inputs:
Expand Down
Loading

0 comments on commit 6f0da99

Please sign in to comment.