ストリーミングはほとんどのブラウザと
Developerアプリで視聴できます。
-
Xcode Cloudワークフローの拡張
Xcode Cloudをそれぞれの開発ニーズに適応させる方法を確認しましょう。開始条件、カスタムエイリアス、カスタムスクリプト、Webhook、App Store Connect APIを使用してテストと配信を自動化し、ワークフローを効率化する方法をご紹介します。
関連する章
- 0:00 - Introduction
- 1:08 - Essential Workflow Concepts
- 3:00 - Scale your workflows
- 11:38 - Connect other systems
- 12:33 - App Store Connect API
- 16:35 - Webhooks
- 20:33 - Wrap up
リソース
- Configuring start conditions
- Configuring webhooks in Xcode Cloud
- Environment variable reference
- Forum: Developer Tools & Services
- Sharing build configurations across Xcode Cloud workflows
- Writing custom build scripts
関連ビデオ
WWDC23
WWDC21
-
ダウンロードArray
-
-
10:02 - Custom Script
#!/bin/sh set -e if [[ $CI_XCODEBUILD_ACTION == "test-without-building" && $CI_WORKFLOW_ID == "82D89C93-B69C-46B5-A794-A2BCFD3EE487" ]] then curl https://example.com/health --fail fi
-
14:01 - App Store Connect API - Client Extension
extension Client { func repoID(workflowID: String) async throws -> String { return try await ciWorkflowsGetInstance( path: .init(id: workflowID), query: .init(include: [.repository]) ).ok.body.json.data.relationships!.repository!.data!.id } func branchID(repoID: String, name: String) async throws -> String { return try await scmRepositoriesGitReferencesGetToManyRelated( path: .init(id: repoID) ) .ok.body.json.data .filter { $0.attributes!.kind == .BRANCH && $0.attributes!.name == name } .first!.id } func startBuild(workflowID: String, gitReferenceID: String) async throws { _ = try await ciBuildRunsCreateInstance( body: .json(.init( data: .init( _type: .ciBuildRuns, relationships: .init( workflow: .init(data: .init( _type: .ciWorkflows, id: workflowID )), sourceBranchOrTag: .init(data: .init( _type: .scmGitReferences, id: gitReferenceID )) ) ) )) ).created } }
-
14:43 - App Store Connect API - Main Function
static func main() async throws { let client = try Client( serverURL: Servers.server1(), configuration: .init(dateTranscoder: .iso8601WithFractionalSeconds), transport: URLSessionTransport(), middlewares: [AuthMiddleware(token: ProcessInfo.processInfo.environment["TOKEN"]!)] ) let workflowID = "82D89C93-B69C-46B5-A794-A2BCFD3EE487" let repoID = try await client.repoID(workflowID: workflowID) let branchName = "main" let branchID = try await client.branchID(repoID: repoID, name: branchName) try await client.startBuild(workflowID: workflowID, gitReferenceID: branchID) }
-
17:09 - Webhook Handler Implementation
struct WebhookPayload: Content { let ciWorkflow: CiWorkflow let ciBuildRun: CiBuildRun struct CiWorkflow: Content { let id: String } struct CiBuildRun: Content { let id: String let executionProgress: String let completionStatus: String } } func routes(_ app: Application) throws { let deploymentService = ExampleDeploymentClient() let workflowID = "82D89C93-B69C-46B5-A794-A2BCFD3EE487" app.post("webhook") { req async throws -> HTTPStatus in return HTTPStatus.ok } }
-
-
特定のトピックをお探しの場合は、上にトピックを入力すると、関連するトピックにすばやく移動できます。
クエリの送信中にエラーが発生しました。インターネット接続を確認して、もう一度お試しください。