From 44d384a237947b45874df911eae42c0894e7bc88 Mon Sep 17 00:00:00 2001 From: Norio Nomura Date: Fri, 18 Jan 2019 11:30:29 +0900 Subject: [PATCH 1/3] [Azure Pipelines] Use container shorthand and inline container https://docs.microsoft.com/en-us/azure/devops/release-notes/2018/sprint-143-update#declare-container-resources-inline --- azure-pipelines.yml | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index d1d965b7b..14f5db74d 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,10 +1,3 @@ -resources: - containers: - - container: '4.2.0' - image: norionomura/swiftlint:swift-4.2.0 - - container: '4.2.1' - image: norionomura/swiftlint:swift-4.2.1 - trigger: - master @@ -16,10 +9,10 @@ jobs: maxParallel: 10 matrix: swift420: - containerResource: '4.2.0' + containerImage: norionomura/swiftlint:swift-4.2.0 swift421: - containerResource: '4.2.1' - container: $[ variables['containerResource'] ] + containerImage: norionomura/swiftlint:swift-4.2.1 + container: $[ variables['containerImage'] ] steps: - script: swift test --parallel displayName: swift test From cce5afa94cf003ff8d2628f6105e725b5bafcff5 Mon Sep 17 00:00:00 2001 From: Norio Nomura Date: Fri, 18 Jan 2019 14:53:30 +0900 Subject: [PATCH 2/3] [Azure Pipelines] Use `DEVELOPER_DIR` environment variable instead of executing `xcode-select` That reduces some steps and removes `XCODE_APP` environment variable. --- azure-pipelines.yml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 14f5db74d..4282e489f 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -34,15 +34,14 @@ jobs: maxParallel: 10 matrix: xcode10: - XCODE_APP: 'Xcode_10' + DEVELOPER_DIR: /Applications/Xcode_10.app xcode101: - XCODE_APP: 'Xcode_10.1' + DEVELOPER_DIR: /Applications/Xcode_10.1.app steps: - script: git submodule update --init --recursive displayName: Update git submodules - - script: | - sudo xcode-select -s /Applications/$XCODE_APP.app - displayName: xcode-select + - script: xcodebuild -version + displayName: xcodebuild -version - script: > set -o pipefail && xcodebuild -workspace SourceKitten.xcworkspace -scheme sourcekitten -parallel-testing-enabled NO test | @@ -64,9 +63,9 @@ jobs: - job: CocoaPods pool: vmImage: 'macOS 10.13' + variables: + DEVELOPER_DIR: /Applications/Xcode_10.1.app steps: - - script: sudo xcode-select -s /Applications/Xcode_10.1.app - displayName: xcode-select - script: bundle install --path vendor/bundle displayName: bundle install - script: bundle exec pod lib lint @@ -75,9 +74,9 @@ jobs: - job: Jazzy pool: vmImage: 'macOS 10.13' + variables: + DEVELOPER_DIR: /Applications/Xcode_10.1.app steps: - - script: sudo xcode-select -s /Applications/Xcode_10.1.app - displayName: xcode-select - script: swift build displayName: swift build - script: swift run sourcekitten doc --spm-module SourceKittenFramework > SourceKittenFramework.json From 66285c2bbf30a5460e054f47f6b9ecc42c9c4ab9 Mon Sep 17 00:00:00 2001 From: Norio Nomura Date: Fri, 18 Jan 2019 15:21:04 +0900 Subject: [PATCH 3/3] [Azure Pipelines] Add "Update bundler" step to CocoaPods and Jazzy jobs --- azure-pipelines.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 4282e489f..a3c888a74 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -66,6 +66,8 @@ jobs: variables: DEVELOPER_DIR: /Applications/Xcode_10.1.app steps: + - script: bundle update --bundler + displayName: Update bundler - script: bundle install --path vendor/bundle displayName: bundle install - script: bundle exec pod lib lint @@ -81,6 +83,8 @@ jobs: displayName: swift build - script: swift run sourcekitten doc --spm-module SourceKittenFramework > SourceKittenFramework.json displayName: Generate documentation json + - script: bundle update --bundler + displayName: Update bundler - script: bundle install --path vendor/bundle displayName: bundle install - script: bundle exec jazzy --clean --sourcekitten-sourcefile SourceKittenFramework.json