From 026a4eb7031803fcb4910ebda87b1112192affdb Mon Sep 17 00:00:00 2001 From: Chris Date: Wed, 29 Nov 2023 10:57:13 +1100 Subject: [PATCH 01/16] create swift template --- pipelines/swift/pipeline.yaml | 7 +++++++ pipelines/swift/readme.md | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 pipelines/swift/pipeline.yaml create mode 100644 pipelines/swift/readme.md diff --git a/pipelines/swift/pipeline.yaml b/pipelines/swift/pipeline.yaml new file mode 100644 index 0000000..eeee28e --- /dev/null +++ b/pipelines/swift/pipeline.yaml @@ -0,0 +1,7 @@ +steps: + - label: ':swift: Lint' + command: 'swiftlint' + - label: ':swift: Test' + command: 'xcodebuild test -scheme MyApp -destination 'platform=iOS Simulator,name=iPhone 11'' + - label: ':swift: Build' + command: 'xcodebuild -scheme MyApp -destination 'platform=iOS Simulator,name=iPhone 11'' \ No newline at end of file diff --git a/pipelines/swift/readme.md b/pipelines/swift/readme.md new file mode 100644 index 0000000..84af6e3 --- /dev/null +++ b/pipelines/swift/readme.md @@ -0,0 +1,35 @@ +--- +title: Swift + SwiftLint + Xcode +description: Set up a CI/CD pipeline for a Swift application with linting, testing, and building using SwiftLint and Xcode. +tags: ["CI", "Swift", "SwiftLint", "Xcode"] +author: Buildkite +--- + +# CI/CD for Swift with Linting, Testing, and Building + +This template gives you a continuous integration (CI) pipeline that lints, tests, and builds a Swift application. + +At a glance: + +- For Swift applications +- Uses SwiftLint for linting +- Uses Xcode for testing and building + +## How it works + +This template: + +1. Lints the Swift code with SwiftLint. +2. Runs tests with Xcode. +3. Builds the application with Xcode. + +## Next steps + +After you select Use template, you’ll: + +1. Connect the Git repository with your Swift application. +2. Modify the commands if necessary. +3. Configure the compute—run locally, on-premises, or in the cloud. +4. Run the pipeline. + +You can then play around with the pipeline settings. For example, run the pipeline locally while you iterate on the definition or set a schedule to trigger a nightly build. From fbb891dfa084027c4fe42631ff89bb1bffa41e82 Mon Sep 17 00:00:00 2001 From: Oly Su Date: Tue, 12 Dec 2023 00:22:53 +1100 Subject: [PATCH 02/16] =?UTF-8?q?=F0=9F=90=9B=20Fix=20command=20quotes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pipelines/swift/pipeline.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pipelines/swift/pipeline.yaml b/pipelines/swift/pipeline.yaml index eeee28e..0652466 100644 --- a/pipelines/swift/pipeline.yaml +++ b/pipelines/swift/pipeline.yaml @@ -1,7 +1,7 @@ steps: - - label: ':swift: Lint' - command: 'swiftlint' - - label: ':swift: Test' - command: 'xcodebuild test -scheme MyApp -destination 'platform=iOS Simulator,name=iPhone 11'' - - label: ':swift: Build' - command: 'xcodebuild -scheme MyApp -destination 'platform=iOS Simulator,name=iPhone 11'' \ No newline at end of file + - label: ":swift: Lint" + command: "swiftlint" + - label: ":swift: Test" + command: "xcodebuild test -scheme MyApp -destination 'platform=iOS Simulator,name=iPhone 11'" + - label: ":swift: Build" + command: "xcodebuild -scheme MyApp -destination 'platform=iOS Simulator,name=iPhone 11'" From 29fc81a69ff4a195d5400b10cd98c40612edba6f Mon Sep 17 00:00:00 2001 From: Oly Su Date: Tue, 12 Dec 2023 00:28:07 +1100 Subject: [PATCH 03/16] =?UTF-8?q?=F0=9F=91=B7=20Add=20wait=20step=20-=20Bu?= =?UTF-8?q?ild=20step=20should=20depend=20on=20Lint=20and=20Test=20to=20co?= =?UTF-8?q?mplete=20first=20-=20Use=20wait=20for=20implicit=20dependency?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pipelines/swift/pipeline.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pipelines/swift/pipeline.yaml b/pipelines/swift/pipeline.yaml index 0652466..77232ab 100644 --- a/pipelines/swift/pipeline.yaml +++ b/pipelines/swift/pipeline.yaml @@ -1,7 +1,11 @@ steps: - label: ":swift: Lint" command: "swiftlint" + - label: ":swift: Test" command: "xcodebuild test -scheme MyApp -destination 'platform=iOS Simulator,name=iPhone 11'" + + - wait + - label: ":swift: Build" - command: "xcodebuild -scheme MyApp -destination 'platform=iOS Simulator,name=iPhone 11'" + command: "xcodebuild -scheme MyApp -destination 'platform=iOS Simulator,name=iPhone 11'" \ No newline at end of file From 83bcdfeb2f2aa220e212f8f9d9f0f0a7aa35c62c Mon Sep 17 00:00:00 2001 From: Oly Su Date: Thu, 14 Dec 2023 13:33:48 +1100 Subject: [PATCH 04/16] =?UTF-8?q?=F0=9F=9A=9A=20Move=20swift=20to=20root?= =?UTF-8?q?=20folder=20After=20merging=20recent=20folder=20structure=20cha?= =?UTF-8?q?nge?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- {pipelines/swift => swift}/pipeline.yaml | 0 {pipelines/swift => swift}/readme.md | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename {pipelines/swift => swift}/pipeline.yaml (100%) rename {pipelines/swift => swift}/readme.md (100%) diff --git a/pipelines/swift/pipeline.yaml b/swift/pipeline.yaml similarity index 100% rename from pipelines/swift/pipeline.yaml rename to swift/pipeline.yaml diff --git a/pipelines/swift/readme.md b/swift/readme.md similarity index 100% rename from pipelines/swift/readme.md rename to swift/readme.md From d0ab0b0241e8b796689c5626a14694631bde9b5e Mon Sep 17 00:00:00 2001 From: Oly Su Date: Thu, 14 Dec 2023 13:50:14 +1100 Subject: [PATCH 05/16] =?UTF-8?q?=F0=9F=91=B7=20Add=20docker=20plugin=20to?= =?UTF-8?q?=20swift=20test?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- swift/pipeline.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/swift/pipeline.yaml b/swift/pipeline.yaml index 77232ab..f6e2320 100644 --- a/swift/pipeline.yaml +++ b/swift/pipeline.yaml @@ -3,7 +3,10 @@ steps: command: "swiftlint" - label: ":swift: Test" - command: "xcodebuild test -scheme MyApp -destination 'platform=iOS Simulator,name=iPhone 11'" + command: "swift test" + plugins: + - docker#v5.9.0: + image: "swift:latest" - wait From 50a38eb3b99f2868e3a108e7ca2765053703807c Mon Sep 17 00:00:00 2001 From: Oly Su Date: Thu, 14 Dec 2023 13:52:24 +1100 Subject: [PATCH 06/16] =?UTF-8?q?=F0=9F=91=B7=20Update=20build=20command?= =?UTF-8?q?=20-=20Use=20swift=20build=20-=20Add=20docker=20plugin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- swift/pipeline.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/swift/pipeline.yaml b/swift/pipeline.yaml index f6e2320..0bbb413 100644 --- a/swift/pipeline.yaml +++ b/swift/pipeline.yaml @@ -8,7 +8,8 @@ steps: - docker#v5.9.0: image: "swift:latest" - - wait - - label: ":swift: Build" - command: "xcodebuild -scheme MyApp -destination 'platform=iOS Simulator,name=iPhone 11'" \ No newline at end of file + command: "swift build" + plugins: + - docker#v5.9.0: + image: "swift:latest" \ No newline at end of file From f4a318c2a78c93c7061f0ad43eb5c6bbe84da14b Mon Sep 17 00:00:00 2001 From: Oly Su Date: Thu, 14 Dec 2023 14:05:04 +1100 Subject: [PATCH 07/16] =?UTF-8?q?=F0=9F=91=B7=20Add=20docker=20plugin=20to?= =?UTF-8?q?=20swiftlint?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- swift/pipeline.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/swift/pipeline.yaml b/swift/pipeline.yaml index 0bbb413..ad77662 100644 --- a/swift/pipeline.yaml +++ b/swift/pipeline.yaml @@ -1,6 +1,9 @@ steps: - label: ":swift: Lint" command: "swiftlint" + plugins: + - docker#v5.9.0: + image: "swift:latest" - label: ":swift: Test" command: "swift test" From bb9bc802e6c67056354c005d13b3310487a4f24e Mon Sep 17 00:00:00 2001 From: Oly Su Date: Thu, 14 Dec 2023 14:06:40 +1100 Subject: [PATCH 08/16] =?UTF-8?q?=F0=9F=9A=9A=20Rename=20readme.md=20to=20?= =?UTF-8?q?README.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- swift/{readme.md => README.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename swift/{readme.md => README.md} (100%) diff --git a/swift/readme.md b/swift/README.md similarity index 100% rename from swift/readme.md rename to swift/README.md From 02f829b3a06230f8ddb2e855b29169d80afeb2c9 Mon Sep 17 00:00:00 2001 From: Oly Su Date: Thu, 14 Dec 2023 14:10:14 +1100 Subject: [PATCH 09/16] =?UTF-8?q?=F0=9F=93=9D=20Update=20README=20to=20per?= =?UTF-8?q?tain=20to=20CI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- swift/README.md | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/swift/README.md b/swift/README.md index 84af6e3..d8c4206 100644 --- a/swift/README.md +++ b/swift/README.md @@ -1,20 +1,14 @@ --- -title: Swift + SwiftLint + Xcode -description: Set up a CI/CD pipeline for a Swift application with linting, testing, and building using SwiftLint and Xcode. -tags: ["CI", "Swift", "SwiftLint", "Xcode"] +title: Swift +description: Set up a CI pipeline for a Swift application with SwiftLint, test and build. +tags: ["CI", "Swift", "SwiftLint"] author: Buildkite --- -# CI/CD for Swift with Linting, Testing, and Building +# CI for Swift with Linting, Testing, and Building This template gives you a continuous integration (CI) pipeline that lints, tests, and builds a Swift application. -At a glance: - -- For Swift applications -- Uses SwiftLint for linting -- Uses Xcode for testing and building - ## How it works This template: From 35cc2462c52d8d08e2d5c467eafafd442d28af9e Mon Sep 17 00:00:00 2001 From: Oly Su Date: Mon, 18 Dec 2023 14:23:27 +1100 Subject: [PATCH 10/16] =?UTF-8?q?=F0=9F=93=9D=20Further=20elaborate=20what?= =?UTF-8?q?'s=20included=20-=20Add=20"at=20a=20glance"=20section=20=20=20-?= =?UTF-8?q?=20Link=20to=20tech=20and=20official=20Swift=20guides=20=20=20-?= =?UTF-8?q?=20Mention=20user=20needs=20to=20install=20SwiftLint=20-=20Fix?= =?UTF-8?q?=20"how=20it=20works"=20section?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- swift/README.md | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/swift/README.md b/swift/README.md index d8c4206..0079c5f 100644 --- a/swift/README.md +++ b/swift/README.md @@ -9,13 +9,24 @@ author: Buildkite This template gives you a continuous integration (CI) pipeline that lints, tests, and builds a Swift application. +At a glance: + +- For [Swift](https://www.swift.org/) projects +- Requires [Docker](https://docs.docker.com/get-docker/) +- Uses the [Swift Package Manager](https://swift.org/package-manager/) to: + - [Run unit tests](https://www.swift.org/server/guides/testing.html) with [XCTest](https://developer.apple.com/documentation/xctest) + - [Build the application](https://www.swift.org/server/guides/building.html) +- Lints code with [SwiftLint](https://github.com/realm/SwiftLint) + +Before you start, you’ll need to [install SwiftLint](https://realm.github.io/SwiftLint/#installation) on your CI server or local machine: + ## How it works This template: -1. Lints the Swift code with SwiftLint. -2. Runs tests with Xcode. -3. Builds the application with Xcode. +1. Lints the code with SwiftLint. +2. Runs tests with XCTest. +3. Builds the application. ## Next steps From 3541ef07a0978131fd5eab742549fa0371f3d92e Mon Sep 17 00:00:00 2001 From: Chris Campbell Date: Thu, 29 Feb 2024 16:58:26 +1100 Subject: [PATCH 11/16] Add example project Code taken from: https://github.com/apple/swift-getting-started-package-library With an added dependency to demonstrate artifact cache --- swift/example-project/.gitignore | 12 ++++++++ swift/example-project/Package.resolved | 14 +++++++++ swift/example-project/Package.swift | 29 ++++++++++++++++++ swift/example-project/Sources/MyCLI.swift | 8 +++++ .../Sources/MyLibrary/MyLibrary.swift | 30 +++++++++++++++++++ .../Tests/MyLibraryTests/MyLibraryTests.swift | 23 ++++++++++++++ 6 files changed, 116 insertions(+) create mode 100644 swift/example-project/.gitignore create mode 100644 swift/example-project/Package.resolved create mode 100644 swift/example-project/Package.swift create mode 100644 swift/example-project/Sources/MyCLI.swift create mode 100644 swift/example-project/Sources/MyLibrary/MyLibrary.swift create mode 100644 swift/example-project/Tests/MyLibraryTests/MyLibraryTests.swift diff --git a/swift/example-project/.gitignore b/swift/example-project/.gitignore new file mode 100644 index 0000000..e5068d6 --- /dev/null +++ b/swift/example-project/.gitignore @@ -0,0 +1,12 @@ +.DS_Store +/.build +/Packages +xcuserdata/ +DerivedData/ +.swiftpm/configuration/registries.json +.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata +.netrc + +# Buildkite artifacts +.cache +cache.tgz diff --git a/swift/example-project/Package.resolved b/swift/example-project/Package.resolved new file mode 100644 index 0000000..ae981b6 --- /dev/null +++ b/swift/example-project/Package.resolved @@ -0,0 +1,14 @@ +{ + "pins" : [ + { + "identity" : "example-package-figlet", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/example-package-figlet", + "state" : { + "branch" : "main", + "revision" : "166eef46de0b094d6d1966e749f727d6c4beba0e" + } + } + ], + "version" : 2 +} diff --git a/swift/example-project/Package.swift b/swift/example-project/Package.swift new file mode 100644 index 0000000..b71d140 --- /dev/null +++ b/swift/example-project/Package.swift @@ -0,0 +1,29 @@ +// swift-tools-version: 5.9 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "MyLibrary", + products: [ + // Products define the executables and libraries a package produces, making them visible to other packages. + .library( + name: "MyLibrary", + targets: ["MyLibrary"]), + ], + dependencies: [ + .package(url: "https://github.com/apple/example-package-figlet", branch: "main"), + ], + targets: [ + // Targets are the basic building blocks of a package, defining a module or a test suite. + // Targets can depend on other targets in this package and products from dependencies. + .target( + name: "MyLibrary", + dependencies: [ + .product(name: "Figlet", package: "example-package-figlet") + ]), + .testTarget( + name: "MyLibraryTests", + dependencies: ["MyLibrary"]), + ] +) diff --git a/swift/example-project/Sources/MyCLI.swift b/swift/example-project/Sources/MyCLI.swift new file mode 100644 index 0000000..f0d619e --- /dev/null +++ b/swift/example-project/Sources/MyCLI.swift @@ -0,0 +1,8 @@ +import Figlet + +@main +struct FigletTool { + static func main() { + Figlet.say("Hello, Swift!") + } +} diff --git a/swift/example-project/Sources/MyLibrary/MyLibrary.swift b/swift/example-project/Sources/MyLibrary/MyLibrary.swift new file mode 100644 index 0000000..0dc8067 --- /dev/null +++ b/swift/example-project/Sources/MyLibrary/MyLibrary.swift @@ -0,0 +1,30 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project +// +// Copyright (c) 2023 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See http://swift.org/LICENSE.txt for license information +// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===-------------------------------------------------------------------- + +import Foundation +import Figlet + +struct Email: CustomStringConvertible { + var description: String + + public init(_ emailString: String) throws { + let regex = #"[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,64}"# + guard let _ = emailString.range(of: regex, options: .regularExpression) else { + throw InvalidEmailError(email: emailString) + } + self.description = emailString + } +} + +private struct InvalidEmailError: Error { + let email: String +} diff --git a/swift/example-project/Tests/MyLibraryTests/MyLibraryTests.swift b/swift/example-project/Tests/MyLibraryTests/MyLibraryTests.swift new file mode 100644 index 0000000..5f3099b --- /dev/null +++ b/swift/example-project/Tests/MyLibraryTests/MyLibraryTests.swift @@ -0,0 +1,23 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift open source project +// +// Copyright (c) 2023 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See http://swift.org/LICENSE.txt for license information +// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// +//===-------------------------------------------------------------------- + +@testable import MyLibrary +import XCTest + +final class MyLibraryTests: XCTestCase { + func testEmail() throws { + let email = try Email("john.appleseed@apple.com") + XCTAssertEqual(email.description, "john.appleseed@apple.com") + + XCTAssertThrowsError(try Email("invalid")) + } +} From 343bdd4419458bbc7cb383d3dbecf4562d4d73e1 Mon Sep 17 00:00:00 2001 From: Chris Campbell Date: Thu, 29 Feb 2024 17:42:41 +1100 Subject: [PATCH 12/16] Clean up Swift pipeline --- swift/pipeline.yaml | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/swift/pipeline.yaml b/swift/pipeline.yaml index ad77662..715ac15 100644 --- a/swift/pipeline.yaml +++ b/swift/pipeline.yaml @@ -1,18 +1,22 @@ +env: + SWIFT_CACHE_PATH: .cache + steps: - - label: ":swift: Lint" - command: "swiftlint" + - label: ":swift: Build" + command: "swift build --cache-path $SWIFT_CACHE_PATH" plugins: - docker#v5.9.0: image: "swift:latest" + - artifacts#v1.9.3: + upload: "$SWIFT_CACHE_PATH" + compressed: cache.tgz - label: ":swift: Test" - command: "swift test" + command: "swift test --cache-path $SWIFT_CACHE_PATH" + depends_on: ["build"] plugins: - docker#v5.9.0: image: "swift:latest" - - - label: ":swift: Build" - command: "swift build" - plugins: - - docker#v5.9.0: - image: "swift:latest" \ No newline at end of file + - artifacts#v1.9.3: + download: "$SWIFT_CACHE_PATH" + compressed: cache.tgz From 2c0069656d1b8bf03a22e3b1d219419b229cd786 Mon Sep 17 00:00:00 2001 From: Chris Campbell Date: Thu, 29 Feb 2024 17:47:22 +1100 Subject: [PATCH 13/16] Add linting step --- swift/pipeline.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/swift/pipeline.yaml b/swift/pipeline.yaml index 715ac15..2980033 100644 --- a/swift/pipeline.yaml +++ b/swift/pipeline.yaml @@ -11,6 +11,13 @@ steps: upload: "$SWIFT_CACHE_PATH" compressed: cache.tgz + - label: ":swift: Lint" + command: "swiftlint" + plugins: + - docker#v5.9.0: + image: "ghcr.io/realm/swiftlint:latest" + platform: "linux/amd64" + - label: ":swift: Test" command: "swift test --cache-path $SWIFT_CACHE_PATH" depends_on: ["build"] From 4860f43b618f2c633ad8863088081b7646fed529 Mon Sep 17 00:00:00 2001 From: Chris Campbell Date: Thu, 29 Feb 2024 17:56:02 +1100 Subject: [PATCH 14/16] Update Swift README.md --- swift/README.md | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/swift/README.md b/swift/README.md index 0079c5f..d51c964 100644 --- a/swift/README.md +++ b/swift/README.md @@ -1,38 +1,41 @@ --- -title: Swift -description: Set up a CI pipeline for a Swift application with SwiftLint, test and build. -tags: ["CI", "Swift", "SwiftLint"] +title: CI for Swift +description: Build, lint, and test a Swift project using SwiftLint and XCTest. author: Buildkite +languages: ["Swift"] +use_cases: ["CI", "Mobile", "Web"] +platforms: ["Docker", "macOS", "iOS"] +tools: ["SwiftLint"] +primary_emojis: [":swift:"] --- -# CI for Swift with Linting, Testing, and Building +# CI for Swift -This template gives you a continuous integration (CI) pipeline that lints, tests, and builds a Swift application. +This template gives you a continuous integration (CI) pipeline that lints, tests, and builds a Swift project. At a glance: - For [Swift](https://www.swift.org/) projects - Requires [Docker](https://docs.docker.com/get-docker/) -- Uses the [Swift Package Manager](https://swift.org/package-manager/) to: - - [Run unit tests](https://www.swift.org/server/guides/testing.html) with [XCTest](https://developer.apple.com/documentation/xctest) - - [Build the application](https://www.swift.org/server/guides/building.html) +- Uses the [Swift Package Manager](https://swift.org/package-manager/) - Lints code with [SwiftLint](https://github.com/realm/SwiftLint) - -Before you start, you’ll need to [install SwiftLint](https://realm.github.io/SwiftLint/#installation) on your CI server or local machine: +- Tests code using [XCTest](https://developer.apple.com/documentation/xctest) ## How it works This template: -1. Lints the code with SwiftLint. -2. Runs tests with XCTest. -3. Builds the application. +1. Builds your Swift project, caching dependencies for subsequent steps. +2. Lints the code with SwiftLint. +3. Runs tests with XCTest. + +The runtime environment uses the official [Swift Docker image](https://hub.docker.com/_/swift) with the latest version. ## Next steps After you select Use template, you’ll: -1. Connect the Git repository with your Swift application. +1. Connect the Git repository with your Swift project. 2. Modify the commands if necessary. 3. Configure the compute—run locally, on-premises, or in the cloud. 4. Run the pipeline. From 45ab9ea733bd4526e4a18ead1133c92933254ed3 Mon Sep 17 00:00:00 2001 From: Chris Campbell Date: Thu, 29 Feb 2024 17:56:15 +1100 Subject: [PATCH 15/16] Add docker info on python README --- python-ci/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python-ci/README.md b/python-ci/README.md index cc15f44..829f6e3 100644 --- a/python-ci/README.md +++ b/python-ci/README.md @@ -30,6 +30,8 @@ This template: 3. Runs pytest unit tests. 4. Automatically annotates the build based on junit test output +The runtime environment uses the official [Python Docker image](https://hub.docker.com/_/python) with the latest version. + ## Next steps After you select **Use template**, you’ll: From be6e398872d18ff9fa253e6b7d204d0f6bb7bfe7 Mon Sep 17 00:00:00 2001 From: Chris Campbell Date: Fri, 1 Mar 2024 10:38:02 +1100 Subject: [PATCH 16/16] Add missing key --- swift/pipeline.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/swift/pipeline.yaml b/swift/pipeline.yaml index 2980033..5f1031e 100644 --- a/swift/pipeline.yaml +++ b/swift/pipeline.yaml @@ -3,6 +3,7 @@ env: steps: - label: ":swift: Build" + key: "build" command: "swift build --cache-path $SWIFT_CACHE_PATH" plugins: - docker#v5.9.0: