From 47ddf824d4d08ef169097507c8b63ea55fed4735 Mon Sep 17 00:00:00 2001 From: Saad Najmi Date: Mon, 23 Oct 2023 15:40:46 -0700 Subject: [PATCH] [CI] Fix publish pipeline (#3171) * Update apple-nuget-publish.yml * Update apple-nuget-publish.yml * Move publish variables to groups * try * Just use the bash script step * Redo variables again * and again * more * fix change * Remove the quotes? * oh... --- .ado/azure-pipelines.publish.yml | 2 +- .ado/azure-pipelines.yml | 22 ++++++++++------------ .ado/templates/apple-nuget-publish.yml | 14 ++++---------- .ado/templates/apple-xcode-select.yml | 13 ------------- .ado/variables/vars.yml | 15 ++++++++++----- 5 files changed, 25 insertions(+), 41 deletions(-) delete mode 100644 .ado/templates/apple-xcode-select.yml diff --git a/.ado/azure-pipelines.publish.yml b/.ado/azure-pipelines.publish.yml index c076691245..362baa7e56 100644 --- a/.ado/azure-pipelines.publish.yml +++ b/.ado/azure-pipelines.publish.yml @@ -87,7 +87,7 @@ jobs: ignoreDirectories: 'node_modules/react-native/template' - job: NuGetPublish - displayName: NuGet Publish + displayName: Apple NuGet Publish pool: vmImage: $(VmImageApple) variables: diff --git a/.ado/azure-pipelines.yml b/.ado/azure-pipelines.yml index 052bccb408..ecd9995d36 100644 --- a/.ado/azure-pipelines.yml +++ b/.ado/azure-pipelines.yml @@ -84,18 +84,17 @@ jobs: workingDirectory: apps/fluent-tester displayName: 'yarn bundle macos' - # Select proper Xcode version - - template: templates/apple-xcode-select.yml - parameters: - xcode_version: $(xcode_version) - xcode_path: $(xcode_path) - - bash: | echo "pod install $(platform)" pod install workingDirectory: apps/fluent-tester/$(platform) displayName: 'pod install $(platform)' + - bash: | + sudo xcode-select --switch '$(xcode_path)' + displayName: Switch Xcode version $(xcode_version) + failOnStderr: true + - script: | brew install xcbeautify displayName: 'Install xcbeautify' @@ -128,18 +127,17 @@ jobs: workingDirectory: apps/fluent-tester displayName: 'yarn bundle ios' - # Select proper Xcode version - - template: templates/apple-xcode-select.yml - parameters: - xcode_version: $(xcode_version) - xcode_path: $(xcode_path) - - bash: | echo "pod install $(platform)" pod install workingDirectory: apps/fluent-tester/$(platform) displayName: 'pod install $(platform)' + - bash: | + sudo xcode-select --switch '$(xcode_path)' + displayName: Switch Xcode version $(xcode_version) + failOnStderr: true + - script: | brew install xcbeautify displayName: 'Install xcbeautify' diff --git a/.ado/templates/apple-nuget-publish.yml b/.ado/templates/apple-nuget-publish.yml index a555cbef77..a880766d60 100644 --- a/.ado/templates/apple-nuget-publish.yml +++ b/.ado/templates/apple-nuget-publish.yml @@ -4,9 +4,6 @@ parameters: type: boolean default: false -variables: - - template: variables/vars.yml - steps: - checkout: self persistCredentials: true @@ -22,20 +19,17 @@ steps: sudo gem install cocoapods displayName: 'Install CocoaPods Environment' - # Select proper Xcode version - - template: apple-xcode-select.yml - parameters: - xcode_version: $(xcode_version) - xcode_path: $(xcode_path) + - bash: | + sudo xcode-select --switch $(xcode_path) + displayName: Switch Xcode version $(xcode_version) + failOnStderr: true - # Pod Install iOS - bash: | echo "pod install --project-directory=ios" pod install --project-directory=ios workingDirectory: apps/fluent-tester displayName: 'pod install iOS' - # Pod Install macOS - bash: | echo "pod install --project-directory=macos" pod install --project-directory=macos diff --git a/.ado/templates/apple-xcode-select.yml b/.ado/templates/apple-xcode-select.yml deleted file mode 100644 index 0ccb9d5087..0000000000 --- a/.ado/templates/apple-xcode-select.yml +++ /dev/null @@ -1,13 +0,0 @@ -# -# Task Group: Xcode select proper version -# - -parameters: - xcode_version: '' - xcode_path: '' - -steps: - - bash: | - sudo xcode-select --switch '${{ parameters.xcode_path }}' - displayName: Switch Xcode version ${{ parameters.xcode_version }} - failOnStderr: true diff --git a/.ado/variables/vars.yml b/.ado/variables/vars.yml index 7d32afb443..9d0b32acab 100644 --- a/.ado/variables/vars.yml +++ b/.ado/variables/vars.yml @@ -1,6 +1,11 @@ variables: - VmImageApple: internal-macos12 - xcode_version: 'Xcode 14.2' - xcode_path: '/Applications/Xcode_14.2.app' - ios_version: '16.2.0' - ios_simulator: 'iPhone 14' + - name: VmImageApple + value: internal-macos12 + - name: xcode_version + value: 'Xcode 14.2' + - name: xcode_path + value: '/Applications/Xcode_14.2.app' + - name: ios_version + value: '16.2.0' + - name: ios_simulator + value: 'iPhone 14'