Skip to content

Upgrades release/client/2.23 pipeline deployment jobs to be 1ES compliant #24118

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

Merged
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
8 changes: 8 additions & 0 deletions tools/pipelines/templates/build-docker-service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,14 @@ resources:
type: git
name: 1ESPipelineTemplates/M365GPT
ref: refs/tags/release
# Listing a pipeline as a resource makes its artifacts available for download in any job
pipelines:
# Access to this pipelines artifacts allows 1ES deployment jobs to install build tools without checking out out a repo.
- pipeline: buildTools-resource
project: internal
source: Build - build-tools
branch: main

extends:
# The pipeline extends the 1ES pipeline template which will inject different SDL and compliance tasks.
# Read more: https://eng.ms/docs/cloud-ai-platform/devdiv/one-engineering-system-1es/1es-docs/1es-pipeline-templates/onboarding/overview
Expand Down
7 changes: 7 additions & 0 deletions tools/pipelines/templates/build-npm-client-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,13 @@ resources:
type: git
name: 1ESPipelineTemplates/M365GPT
ref: refs/tags/release
# Listing a pipeline as a resource makes its artifacts available for download in any job
pipelines:
# Access to this pipelines artifacts allows 1ES deployment jobs to install build tools without checking out out a repo.
- pipeline: buildTools-resource
project: internal
source: Build - build-tools
branch: main

extends:
# The pipeline extends the 1ES pipeline template which will inject different SDL and compliance tasks.
Expand Down
7 changes: 7 additions & 0 deletions tools/pipelines/templates/build-npm-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,13 @@ resources:
type: git
name: 1ESPipelineTemplates/M365GPT
ref: refs/tags/release
# Listing a pipeline as a resource makes its artifacts available for download in any job
pipelines:
# Access to this pipelines artifacts allows 1ES deployment jobs to install build tools without checking out out a repo.
- pipeline: buildTools-resource
project: internal
source: Build - build-tools
branch: main

extends:
# The pipeline extends the 1ES pipeline template which will inject different SDL and compliance tasks.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,21 +51,41 @@ jobs:
variables:
version: $[ stageDependencies.build.build.outputs['SetVersion.version']]
isLatest: $[ stageDependencies.build.build.outputs['SetVersion.isLatest']]
templateContext:
type: releaseJob
# in() returns true if the first parameter is equal to any of the others
isProduction: ${{ in(variables['release'], 'release', 'prerelease') }}

# This 'inputs' section downloads initial required artifacts/data for this job.
inputs:
- input: pipelineArtifact
pipeline: buildTools-resource
artifactName: pack
targetPath: $(Pipeline.Workspace)/buildTools-zip

- input: pipelineArtifact
artifactName: pack
buildType: current
targetPath: $(Pipeline.Workspace)/pack
strategy:
runOnce:
deploy:
steps:
- checkout: self
clean: true
persistCredentials: true # Necessary for creation of git tags to work
- download: current
artifact: pack
- template: /tools/pipelines/templates/include-use-node-version.yml@self
- template: /tools/pipelines/templates/include-install-build-tools.yml@self
parameters:
buildDirectory: ${{ parameters.buildDirectory }}
buildToolsVersionToInstall: ${{ parameters.buildToolsVersionToInstall }}
pnpmStorePath: ${{ parameters.pnpmStorePath }}

- task: Bash@3
name: InstallBuildToolsFromTarball
displayName: Install Fluid Build Tools from artifact tarball
inputs:
targetType: 'inline'
workingDirectory: '$(Pipeline.Workspace)/buildTools-zip/tarballs'
script: |
set -eu -o pipefail
echo "Listing files in directory: $(pwd)"
ls -la
echo "Attempting install of build tools from build tools pipeline artifact tarball"
npm i -g ./*.tgz

- template: /tools/pipelines/templates/include-publish-npm-package-steps.yml@self
parameters:
artifactPath: tarballs
Expand Down
Loading