Swiftpack.co - Package - richardpiazza/XcodeServer

XcodeServer

A swift framework for interacting with, and persisting data from an "Xcode Server".

Twitter: @richardpiazza

Usage

XcodeServer is distributed using the Swift Package Manager. To install it into a project, add it as a dependency within your Package.swift manifest:

let package = Package(
    ...
    dependencies: [
        .package(url: "https://github.com/richardpiazza/XcodeServer.git", .upToNextMinor(from: "1.1.0")
    ],
    ...
)

Then import the XcodeServer packages wherever you'd like to use it:

import XcodeServer

Prerequisites

macOS, iOS, tvOS, watchOS

none

Linux (Ubuntu)

zlib1g-dev must be pre-installed. sudo apt-get install -y zlib1g-dev

Packages

XcodeServerCommon

Provides shared resources for the other packages, this includes:

  • Enumerations

  • JSON utilities

  • Test Hierarchy Definitions

XcodeServerAPI

All of the DTO definitions for the Xcode Server API. The APIClient class provides endpoint definitions and utilities for downloading Integration coverage data & assets.

XcodeServerCoreData

A CoreData (on Apple platforms) driven implementation of primary Xcode Server entities and their relationships to one another.

XcodeServerProcedures

A operation-driven level that combines the api and persisted storage.

XcodeServer

A Manager class that interacts with the procedures the query and persist data from the server API.

xcscli

The executable xcscli provides a command line interface to the Xcode Server API. To execute from the command line (without building a binary version), you can use the swift run command from the root directory. For instance:

$ swift run xcscli --help

The subcommand include:

ping

Performs a HTTP GET on the /ping endpoint. Will output 'OK' if successful.

$ swift run xcscli ping fully.qualified.domain.name

versions

Performs a HTTP GET on the /versions endpoint. This contains versioning information about the API, Operating System, and Installed Xcode.

$ swift run xcscli versions fully.qualified.domain.name

bots

Performs a HTTP GET on the /bots endpoint. Without any additional options this will return a collection of all the Xcode Bots on the server. A --path option can be specified for additional information. A single Bot is targeted by specifying the --id argument.

Paths:

  • stats: General statistics information about a single Bot.

  • integrations: The last (up to) 10 integrations for the specific Bot.

  • run: Triggers a new integration for the specific Bot.

integrations

Performs a HTTP GET on the /integrations endpoint. A unique identifier must be supplied with --id/-i. --path is available to additional resources.

Paths:

  • commits: The source control history leading to the Integration.

  • issues: Issues that are identified as new/resolved for the Integration.

  • coverage: Unit testing coverage data (can take a while).

sync

On Apple platforms this command will download and persist data from a requested server.

References

Github

link
Stars: 6

Used By

Total: 0

Releases

XcodeServer 1.1.0 - 2020-08-25 13:51:03

This release brings full support to Linux for the XcodeServerAPI and xcscli packages. The underlying networking components of the APIClient have been re-written on top of the AsyncHTTPClient which uses the cross-platform SwiftNIO libraries.

XcodeServer 1.0.5 - 2020-07-18 13:42:02

Fixes a small issue where a triggered integration didn't initially have the right counter number.

XcodeServer 1.0.0 (🎉) - 2020-07-16 18:17:50

1.0.0 Release of the XcodeServer swift package.

XcodeServer 1.0.4 - 2020-07-16 13:35:32

Adds the XCSExportOptions model to the API correcting and expanding the behavior of XCSArchiveExportOptions.

XcodeServer 1.0.3 - 2020-07-09 12:33:08

The 'archiveExportOptions' was added to theXCSConfiguration model.

XcodeServer 1.0.2 - 2020-07-08 20:48:05

A small bug fix that addresses the datatype associated to launch/build arguments.

XcodeServer 1.0.1 - 2020-07-02 21:41:00

Corrects a potential issue with CoreData code.