`1ES-Template` Conversion (#1742)
* refactor client.yml entrypoint to utilize 1es templates --------- Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>
This commit is contained in:
Родитель
6015c971c1
Коммит
58c7a21de3
|
@ -8,7 +8,9 @@ jobs:
|
|||
- template: ../variables/globals.yml
|
||||
|
||||
pool:
|
||||
vmImage: '$(OSVmImage)'
|
||||
vmImage: $(MACVMIMAGE)
|
||||
name: $(MACPOOL)
|
||||
os: macOS
|
||||
|
||||
steps:
|
||||
- script: |
|
||||
|
@ -25,34 +27,38 @@ jobs:
|
|||
displayName: 'Install dependencies'
|
||||
|
||||
- script: |
|
||||
mkdir $(Build.ArtifactStagingDirectory)/iphonesimulator/
|
||||
set -o pipefail
|
||||
xcodebuild archive \
|
||||
-workspace AzureSDK.xcworkspace \
|
||||
-scheme ${{parameters.BuildScheme}} \
|
||||
-sdk iphonesimulator \
|
||||
-configuration Release \
|
||||
-archivePath $(Build.ArtifactStagingDirectory)/AzureSDK-iphonesimulator.xcarchive \
|
||||
-archivePath $(Build.ArtifactStagingDirectory)/iphonesimulator/AzureSDK-iphonesimulator.xcarchive \
|
||||
SKIP_INSTALL=NO | xcpretty -c
|
||||
displayName: 'Build and archive libraries for release [iphonesimulator]'
|
||||
|
||||
- publish: $(Build.ArtifactStagingDirectory)/AzureSDK-iphonesimulator.xcarchive
|
||||
displayName: 'Publish release archive [iphonesimulator]'
|
||||
artifact: 'archive-release-iphonesimulator'
|
||||
- template: /eng/common/pipelines/templates/steps/publish-1es-artifact.yml
|
||||
parameters:
|
||||
ArtifactPath: $(Build.ArtifactStagingDirectory)/iphonesimulator/
|
||||
ArtifactName: 'archive-release-iphonesimulator'
|
||||
|
||||
- script: |
|
||||
mkdir $(Build.ArtifactStagingDirectory)/iphoneos/
|
||||
set -o pipefail
|
||||
xcodebuild archive \
|
||||
-workspace AzureSDK.xcworkspace \
|
||||
-scheme ${{parameters.BuildScheme}} \
|
||||
-sdk iphoneos \
|
||||
-configuration Release \
|
||||
-archivePath $(Build.ArtifactStagingDirectory)/AzureSDK-iphoneos.xcarchive \
|
||||
-archivePath $(Build.ArtifactStagingDirectory)/iphoneos/AzureSDK-iphoneos.xcarchive \
|
||||
SKIP_INSTALL=NO | xcpretty -c
|
||||
displayName: 'Build and archive libraries for release [iphoneos]'
|
||||
|
||||
- publish: $(Build.ArtifactStagingDirectory)/AzureSDK-iphoneos.xcarchive
|
||||
displayName: 'Publish release archive [iphoneos]'
|
||||
artifact: 'archive-release-iphoneos'
|
||||
- template: /eng/common/pipelines/templates/steps/publish-1es-artifact.yml
|
||||
parameters:
|
||||
ArtifactPath: $(Build.ArtifactStagingDirectory)/iphoneos/
|
||||
ArtifactName: 'archive-release-iphoneos'
|
||||
|
||||
- ${{if eq(variables['System.TeamProject'], 'internal') }}:
|
||||
- task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
|
||||
|
@ -61,7 +67,7 @@ jobs:
|
|||
inputs:
|
||||
BuildDropPath: $(Build.ArtifactStagingDirectory)
|
||||
|
||||
- template: /eng/common/pipelines/templates/steps/publish-artifact.yml
|
||||
- template: /eng/common/pipelines/templates/steps/publish-1es-artifact.yml
|
||||
parameters:
|
||||
ArtifactPath: '$(Build.ArtifactStagingDirectory)/_manifest'
|
||||
ArtifactName: 'manifest'
|
||||
|
@ -117,7 +123,9 @@ jobs:
|
|||
- template: ../variables/globals.yml
|
||||
|
||||
pool:
|
||||
vmImage: '$(OSVmImage)'
|
||||
vmImage: $(MACVMIMAGE)
|
||||
name: $(MACPOOL)
|
||||
os: macOS
|
||||
|
||||
steps:
|
||||
|
||||
|
@ -176,7 +184,9 @@ jobs:
|
|||
- template: ../variables/globals.yml
|
||||
|
||||
pool:
|
||||
vmImage: '$(OSVmImage)'
|
||||
vmImage: $(MACVMIMAGE)
|
||||
name: $(MACPOOL)
|
||||
os: macOS
|
||||
|
||||
steps:
|
||||
- script: sudo xcode-select --switch /Applications/Xcode_$(XcodeVersion).app
|
||||
|
@ -200,10 +210,11 @@ jobs:
|
|||
test | xcpretty -c
|
||||
displayName: 'Build and test libraries'
|
||||
|
||||
- publish: $(Build.ArtifactStagingDirectory)/Logs/Test
|
||||
displayName: 'Preserve logs on failure'
|
||||
artifact: 'test-failure-logs'
|
||||
condition: failed()
|
||||
- template: /eng/common/pipelines/templates/steps/publish-1es-artifact.yml
|
||||
parameters:
|
||||
ArtifactPath: '$(Build.ArtifactStagingDirectory)/Logs/Test'
|
||||
ArtifactName: 'test-failure-logs'
|
||||
customCondition: failed()
|
||||
|
||||
- script: trainer --path $(Build.ArtifactStagingDirectory) --fail_build false
|
||||
env:
|
||||
|
@ -266,7 +277,9 @@ jobs:
|
|||
- template: ../variables/globals.yml
|
||||
|
||||
pool:
|
||||
vmImage: '$(OSVmImage)'
|
||||
vmImage: $(MACVMIMAGE)
|
||||
name: $(MACPOOL)
|
||||
os: macOS
|
||||
|
||||
steps:
|
||||
- script: sudo xcode-select --switch /Applications/Xcode_$(XcodeVersion).app
|
||||
|
|
|
@ -31,6 +31,9 @@ parameters:
|
|||
- name: UsePlatformContainer
|
||||
type: boolean
|
||||
default: false
|
||||
- name: OSName
|
||||
type: string
|
||||
default: ''
|
||||
|
||||
jobs:
|
||||
- job:
|
||||
|
@ -45,6 +48,7 @@ jobs:
|
|||
pool:
|
||||
name: $(Pool)
|
||||
vmImage: $(OSVmImage)
|
||||
os: ${{ parameters.OSName }}
|
||||
|
||||
${{ if eq(parameters.UsePlatformContainer, 'true') }}:
|
||||
# Add a default so the job doesn't fail when the matrix is empty
|
||||
|
@ -55,7 +59,7 @@ jobs:
|
|||
|
||||
- template: /eng/common/pipelines/templates/steps/verify-agent-os.yml
|
||||
parameters:
|
||||
AgentImage: $(OSVmImage)
|
||||
AgentImage: ${{ parameters.OSName }}
|
||||
|
||||
- template: /eng/common/TestResources/build-test-resource-config.yml
|
||||
parameters:
|
||||
|
|
|
@ -28,8 +28,9 @@ stages:
|
|||
variables:
|
||||
- template: ../variables/globals.yml
|
||||
pool:
|
||||
name: Azure Pipelines
|
||||
vmImage: windows-2022
|
||||
name: azsdk-pool-mms-win-2022-general
|
||||
image: azsdk-pool-mms-win-2022-1espt
|
||||
os: windows
|
||||
strategy:
|
||||
runOnce:
|
||||
deploy:
|
||||
|
@ -52,6 +53,7 @@ stages:
|
|||
pool:
|
||||
name: Azure Pipelines
|
||||
vmImage: macOS-11
|
||||
os: macOS
|
||||
strategy:
|
||||
runOnce:
|
||||
deploy:
|
||||
|
@ -74,7 +76,8 @@ stages:
|
|||
- template: ../variables/globals.yml
|
||||
pool:
|
||||
name: azsdk-pool-mms-ubuntu-2004-general
|
||||
vmImage: ubuntu-20.04
|
||||
image: azsdk-pool-mms-ubuntu-2004-1espt
|
||||
os: linux
|
||||
strategy:
|
||||
runOnce:
|
||||
deploy:
|
||||
|
|
|
@ -1,25 +1,62 @@
|
|||
resources:
|
||||
repositories:
|
||||
- repository: 1ESPipelineTemplates
|
||||
type: git
|
||||
name: 1ESPipelineTemplates/1ESPipelineTemplates
|
||||
ref: refs/tags/release
|
||||
|
||||
parameters:
|
||||
- name: BuildScheme
|
||||
type: string
|
||||
default: sdk
|
||||
- name: ServiceDirectory
|
||||
type: string
|
||||
- name: Artifacts
|
||||
type: object
|
||||
default: []
|
||||
- name: BuildScheme
|
||||
type: string
|
||||
default: sdk
|
||||
- name: ServiceDirectory
|
||||
type: string
|
||||
- name: Artifacts
|
||||
type: object
|
||||
default: []
|
||||
|
||||
stages:
|
||||
- stage: Build
|
||||
jobs:
|
||||
- template: ../jobs/archetype-sdk-client.yml
|
||||
parameters:
|
||||
BuildScheme: ${{parameters.BuildScheme}}
|
||||
extends:
|
||||
${{ if eq(variables['System.TeamProject'], 'internal') }}:
|
||||
template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates
|
||||
${{ else }}:
|
||||
template: v1/1ES.Unofficial.PipelineTemplate.yml@1ESPipelineTemplates
|
||||
parameters:
|
||||
settings:
|
||||
skipBuildTagsForGitHubPullRequests: true
|
||||
sdl:
|
||||
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/azure-sdk/internal/_build/results?buildId=3499746'
|
||||
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
|
||||
credscan:
|
||||
toolVersion: 2.3.12.23
|
||||
|
||||
stages:
|
||||
- stage: Build
|
||||
variables:
|
||||
- template: /eng/pipelines/templates/variables/image.yml@self
|
||||
jobs:
|
||||
- template: /eng/pipelines/templates/jobs/archetype-sdk-client.yml@self
|
||||
parameters:
|
||||
BuildScheme: ${{parameters.BuildScheme}}
|
||||
|
||||
# The Prerelease and Release stages are conditioned on whether we are building a pull request and the branch.
|
||||
- ${{if and(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['System.TeamProject'], 'internal'))}}:
|
||||
- template: /eng/pipelines/templates/stages/archetype-ios-release.yml@self
|
||||
parameters:
|
||||
DependsOn:
|
||||
- Build
|
||||
ServiceDirectory: ${{ parameters.ServiceDirectory }}
|
||||
Artifacts: ${{ parameters.Artifacts }}
|
||||
|
||||
# The Prerelease and Release stages are conditioned on whether we are building a pull request and the branch.
|
||||
- ${{if and(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['System.TeamProject'], 'internal'))}}:
|
||||
- template: archetype-ios-release.yml
|
||||
parameters:
|
||||
DependsOn:
|
||||
- Build
|
||||
ServiceDirectory: ${{ parameters.ServiceDirectory }}
|
||||
Artifacts: ${{ parameters.Artifacts }}
|
|
@ -62,6 +62,7 @@ parameters:
|
|||
|
||||
variables:
|
||||
- template: ../variables/globals.yml
|
||||
- template: ../variables/image.yml
|
||||
|
||||
stages:
|
||||
- ${{ each cloud in parameters.CloudConfig }}:
|
||||
|
@ -70,7 +71,7 @@ stages:
|
|||
- stage: ${{ cloud.key }}
|
||||
dependsOn: []
|
||||
jobs:
|
||||
- template: /eng/common/pipelines/templates/jobs/archetype-sdk-tests-generate.yml
|
||||
- template: /eng/common/pipelines/templates/jobs/generate-job-matrix.yml
|
||||
parameters:
|
||||
JobTemplatePath: /eng/pipelines/templates/jobs/live.tests.yml
|
||||
AdditionalParameters:
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
# Default pool image selection. Set as variable so we can override at pipeline level
|
||||
|
||||
variables:
|
||||
- name: LINUXPOOL
|
||||
value: azsdk-pool-mms-ubuntu-2004-1es-pt
|
||||
- name: WINDOWSPOOL
|
||||
value: azsdk-pool-mms-win-2022-1es-pt
|
||||
- name: MACPOOL
|
||||
value: Azure Pipelines
|
||||
|
||||
- name: LINUXVMIMAGE
|
||||
value: azsdk-pool-mms-ubuntu-2004-1espt
|
||||
- name: LINUXNEXTVMIMAGE
|
||||
value: azsdk-pool-mms-ubuntu-2204-1espt
|
||||
- name: WINDOWSVMIMAGE
|
||||
value: azsdk-pool-mms-win-2022-1espt
|
||||
- name: MACVMIMAGE
|
||||
value: macOS-12
|
||||
|
||||
# Values required for pool.os field in 1es pipeline templates
|
||||
- name: LINUXOS
|
||||
value: linux
|
||||
- name: WINDOWSOS
|
||||
value: windows
|
||||
- name: MACOS
|
||||
value: macOS
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "AzureTemplate",
|
||||
"version": "1.7.0-beta.1",
|
||||
"version": "1.7.0-beta.2",
|
||||
"summary": "Azure Template Dummy Library",
|
||||
"description": "This is a test library for Azure Engineering Systems.",
|
||||
"homepage": "https://github.com/Azure/azure-sdk-for-ios/tree/main/sdk/template/AzureTemplate",
|
||||
|
@ -19,7 +19,7 @@
|
|||
"changelog": "https://github.com/Azure/azure-sdk-for-ios/blob/main/sdk/template/AzureTemplate/CHANGELOG.md",
|
||||
"source": {
|
||||
"git": "https://github.com/Azure/azure-sdk-for-ios.git",
|
||||
"tag": "AzureTemplate_1.7.0-beta.1"
|
||||
"tag": "AzureTemplate_1.7.0-beta.2"
|
||||
},
|
||||
"source_files": "sdk/template/AzureTemplate/Source/**/*.{swift,h,m}",
|
||||
"pod_target_xcconfig": {
|
||||
|
|
|
@ -368,7 +368,7 @@
|
|||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) $(TOOLCHAIN_DIR)/usr/lib/swift/macosx";
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.15;
|
||||
MARKETING_VERSION = 1.7.0-beta.1;
|
||||
MARKETING_VERSION = 1.7.0-beta.2;
|
||||
OTHER_CFLAGS = "$(inherited)";
|
||||
OTHER_LDFLAGS = "$(inherited)";
|
||||
OTHER_SWIFT_FLAGS = "$(inherited)";
|
||||
|
@ -399,7 +399,7 @@
|
|||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) $(TOOLCHAIN_DIR)/usr/lib/swift/macosx";
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.15;
|
||||
MARKETING_VERSION = 1.7.0-beta.1;
|
||||
MARKETING_VERSION = 1.7.0-beta.2;
|
||||
OTHER_CFLAGS = "$(inherited)";
|
||||
OTHER_LDFLAGS = "$(inherited)";
|
||||
OTHER_SWIFT_FLAGS = "$(inherited)";
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
# Release History
|
||||
|
||||
# 1.7.0-beta.2 (2024-03-20)
|
||||
Azure Template release for Engineering System testing.
|
||||
|
||||
# 1.7.0-beta.1 (2022-11-23)
|
||||
Azure Template release for Engineering System testing.
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ specifying the clone URL of this repository and the version specifier you wish t
|
|||
// swift-tools-version:5.3
|
||||
dependencies: [
|
||||
...
|
||||
.package(name: "AzureTemplate", url: "https://github.com/Azure/SwiftPM-AzureTemplate.git", from: "1.7.0-beta.1")
|
||||
.package(name: "AzureTemplate", url: "https://github.com/Azure/SwiftPM-AzureTemplate.git", from: "1.7.0-beta.2")
|
||||
],
|
||||
```
|
||||
|
||||
|
@ -86,7 +86,7 @@ platform :ios, '12.0'
|
|||
use_frameworks!
|
||||
|
||||
target 'MyTarget' do
|
||||
pod 'AzureTemplate', '1.7.0-beta.1'
|
||||
pod 'AzureTemplate', '1.7.0-beta.2'
|
||||
...
|
||||
end
|
||||
```
|
||||
|
|
Загрузка…
Ссылка в новой задаче