Skip to content

Commit

Permalink
BE-4921 BE-4783 BE-4784 Add features for TD profile creation settings (
Browse files Browse the repository at this point in the history
…#763)

* BE-4921 Add sub organization option to fastlane plugin
* BE-4783 Add authentication type option to fastlane testing distribution plugin (#756)
* BE-4784 Add testing groups option to fastlane testing distribution plugin (#757)
  • Loading branch information
hiilhan authored Dec 19, 2024
1 parent 9f6ea6f commit fbf8655
Show file tree
Hide file tree
Showing 8 changed files with 95 additions and 26 deletions.
6 changes: 4 additions & 2 deletions docs/marketplace/fastlane/enterprise-app-store/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ https://rubygems.org/gems/fastlane-plugin-appcircle_enterprise_store

**Compatible Agents:**

- macOS 14.2, 14.5
- macOS 14 (arm64)
- RHEL 9 (x86_64)
- Ubuntu 22.04 (x86_64)

**Supported Version:**

Expand All @@ -47,7 +49,7 @@ fastlane add_plugin appcircle_enterprise_app_store

After adding the plugin to your project, configure your Fastfile as follows:

```yml
```ruby
lane :distribute_app_store do
appcircle_enterprise_app_store(
personalAPIToken: "$(AC_PERSONAL_API_TOKEN)",
Expand Down
93 changes: 79 additions & 14 deletions docs/marketplace/fastlane/testing-distribution/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ tags:
sidebar_position: 1
---

<!-- ATTENTION: Documentation at rubydoc (or README in the repository)
has table of contents that references to the titles in this document. -->

# Setting Up Appcircle Testing Distribution Plugin

The Appcircle Testing Distribution plugin allows users to upload their apps and start distribution to test groups or individuals.
Expand All @@ -22,11 +25,13 @@ The Appcircle Testing Distribution plugin allows users to upload their apps and
You can discover more about this action and install it from:
https://rubygems.org/gems/fastlane-plugin-appcircle_testing_distribution

## System Requirements
### System Requirements

**Compatible Agents:**

- macOS 14.2, 14.5
- macOS 14 (arm64)
- RHEL 9 (x86_64)
- Ubuntu 22.04 (x86_64)

**Supported Version:**

Expand All @@ -37,6 +42,14 @@ https://rubygems.org/gems/fastlane-plugin-appcircle_testing_distribution
Currently, plugins are only compatible to use with **Appcircle Cloud**. **Self-hosted** support will be available in future releases.
:::

### User Permission Requirements

To perform operations such as generating a Personal API Token, creating a testing distribution profile, and managing testing groups, your user role must have the necessary permissions in the target organization. For more information about user roles and permissions, please refer to the relevant sections of the Role Management documentation below.

- Access to organization or sub-organization and generating PAT: [Organization Management Permissions](/account/my-organization/profile-and-team/role-management#organization-management-permissions).
- Testing distribution operations and profile management: [Testing Distribution Permissions](/account/my-organization/profile-and-team/role-management#testing-distribution-permissions).
- Testing group management: [Testing Group Permissions](/account/my-organization/profile-and-team/role-management#testing-group-permissions).

### How to Add the Appcircle Distribute Action to Your Pipeline

To use the Appcircle Testing Distribution action, install the plugin and add the following step to your pipeline at the end:
Expand All @@ -45,35 +58,87 @@ To use the Appcircle Testing Distribution action, install the plugin and add the
fastlane add_plugin appcircle_testing_distribution
```

```yml
```ruby
appcircle_testing_distribution(
personalAPIToken: "$(AC_PERSONAL_API_TOKEN)",
profileName: "$(AC_PROFILE_NAME)",
createProfileIfNotExists: Boolean,
appPath: "$(AC_APP_PATH)",
message: "$(AC_MESSAGE)",
personalAPIToken: ENV["AC_PERSONAL_API_TOKEN"],
subOrganizationName: ENV["AC_SUB_ORGANIZATION_NAME"],
profileName: ENV["AC_PROFILE_NAME"],
createProfileIfNotExists: ENV["AC_CREATE_PROFILE_IF_NOT_EXISTS"],
profileCreationSettings: {
authType: ENV["AC_PROFILE_AUTH_TYPE"],
username: ENV["AC_PROFILE_USERNAME"],
password: ENV["AC_PROFILE_PASSWORD"],
testingGroupNames: ENV["AC_PROFILE_TESTING_GROUP_NAMES"]
},
appPath: ENV["AC_APP_PATH"],
message: ENV["AC_MESSAGE"]
)
```

- `personalAPIToken`: The Appcircle Personal API token is used to authenticate and secure access to Appcircle services. Add this token to your credentials to enable its use in your pipeline and ensure authorized actions within the platform.
- `personalAPIToken`: The Appcircle Personal API token used to authenticate and authorize access to Appcircle services within this plugin.
- `subOrganizationName` (optional): Required when the Root Organization's `personalAPIToken` is used, and you want to create the profile under a sub-organization. In this case, provide the name of the sub-organization in this field. If you directly used the sub-organization's `personalAPIToken`, this parameter is not needed.
- `profileName`: Specifies the profile that will be used for uploading the app.
- `createProfileIfNotExists`: Ensures that a user profile is automatically created if it does not already exist; if the profile name already exists, the app will be uploaded to that existing profile instead.
- `createProfileIfNotExists` (optional): Ensures that a testing distribution profile is automatically created if it does not already exist; if the profile name already exists, the app will be uploaded to that existing profile instead.
- `profileCreationSettings` (optional): If `createProfileIfNotExists` is `true` and a new profile being created, the profile will be configured with these settings.
- `authType`: Authentication type of the profile. `none`: None, `static`: Static Username and Password, `ldap`: LDAP Login, `sso`: SSO Login.
- `username`: The username for the profile if authentication type set to `static` (Static Username and Password).
- `password`: The password for the profile if authentication type set to `static` (Static Username and Password).
- `testingGroupNames`: Uploaded versions will be automatically shared with these testing groups. Example format: `group1, group2, group3`.
- `appPath`: Indicates the file path to the application package that will be uploaded to Appcircle Testing Distribution Profile.
- `message`: Your message to testers, ensuring they receive important updates and information regarding the application.

### Leveraging Environment Variables

Utilize environment variables seamlessly by substituting the parameters with `$(VARIABLE_NAME)` in your task inputs. The extension automatically retrieves values from the specified environment variables within your pipeline.
:::tip
Profile creation settings are only used when a new profile is created. If you need to update these settings, please go to the [profile settings](https://docs.appcircle.io/testing-distribution/create-or-select-a-distribution-profile#settings) in the Appcircle dashboard.
:::

:::caution Build Steps Order
Ensure that this action is added after build steps have been completed.

:::

:::caution
If multiple workflows start simultaneously, the order in which versions are shared in the Testing Distribution is determined by the execution order of the publish step. The version that completes its build and triggers the publish plugin first will be shared first, followed by the others in sequence.
:::

### Distributing to Sub-Organizations

To distribute your app to a sub-organization, you can use one of the following methods:

#### 1. Using the Root Organization's Personal API Token

- Obtain the `personalAPIToken` for the Root Organization. This token is used to authenticate and authorize actions within Appcircle.
- Specify the `subOrganizationName` parameter in your configuration. This parameter indicates the target sub-organization where the profile will be created and the app will be distributed.

#### 2. Using the Sub-Organization's Personal API Token

- Invite your user to the sub-organization and obtain the `personalAPIToken` for the sub-organization. This token directly authenticates and authorizes actions within the specific sub-organization.
- Use the sub-organization's `personalAPIToken` in your configuration.

With this configuration, the profile will be created and the app will be distributed within the sub-organization.

### CLI Usage

Recommended method of using the action is adding it to the `Fastfile` as described [above](#how-to-add-the-appcircle-distribute-action-to-your-pipeline).

If you prefer to use it from the terminal, you can execute the following command and enter the inputs interactively:

```bash
fastlane run appcircle_testing_distribution
```

To pass parameters with the command, you can use the `:symbol` format. For example:

```bash
fastlane run appcircle_testing_distribution parameter1:"value1" parameter2:"value2"
```

:::caution IMPORTANT NOTE
The CLI only supports primitive types such as integers, floats, booleans, and strings. Arrays can be passed as a comma-separated string (e.g., `parameter:"value1,value2,value3"`). Hashes are not currently supported, so to use parameters like `profileCreationSettings`, it is recommended to add the action to the `Fastfile` as described.
:::

### Leveraging Environment Variables

Utilize environment variables seamlessly by substituting the parameters with `ENV["VARIABLE_NAME"]` in your task inputs. The extension automatically retrieves values from the specified environment variables within your pipeline.

## References

- For details on generating an Appcircle Personal API Token, visit [Generating/Managing Personal API Tokens](/appcircle-api-and-cli/api-authentication#generatingmanaging-the-personal-api-tokens).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ The Appcircle Enterprise App Store action allows users to publish their apps to

**Compatible Agents:**

- macos-14 (arm64)
- Ubuntu-22.04
- macOS 14 (arm64)
- Ubuntu 22.04 (x86_64)

:::caution
Currently, plugins are only compatible to use with **Appcircle Cloud**. **Self-hosted** support will be available in future releases.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ https://github.com/marketplace/actions/appcircle-testing-distribution

**Compatible Agents:**

- macos-14 (arm64)
- Ubuntu-22.04
- macOS 14 (arm64)
- Ubuntu 22.04 (x86_64)

:::caution
Currently, plugins are only compatible to use with **Appcircle Cloud**. **Self-hosted** support will be available in future releases.
Expand Down
3 changes: 2 additions & 1 deletion docs/marketplace/jenkins/enterprise-app-store/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ The Appcircle Enterprise App Store plugin enables users to publish their apps to

**Compatible Agents:**

- macOS 14.2, 14.5
- macOS 14 (arm64)
<!-- - Ubuntu 22.04 (x86_64) -->

**Supported Version:**

Expand Down
3 changes: 2 additions & 1 deletion docs/marketplace/jenkins/testing-distribution/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ https://plugins.jenkins.io/appcircle-testing-distribution/

**Compatible Agents:**

- macOS 14.2, 14.5
- macOS 14 (arm64)
<!-- - Ubuntu 22.04 (x86_64) -->

**Supported Version:**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ https://marketplace.visualstudio.com/items?itemName=Appcircle.enterprise-app-sto

**Compatible Agents:**

- macos-14
- ubuntu-22.04
- macOS 14 (arm64)
- Ubuntu 22.04 (x86_64)

:::caution
Currently, plugins are only compatible to use with **Appcircle Cloud**. **Self-hosted** support will be available in future releases.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ https://marketplace.visualstudio.com/items?itemName=Appcircle.build-release-task

**Compatible Agents:**

- macos-14
- ubuntu-22.04
- macOS 14 (arm64)
- Ubuntu 22.04 (x86_64)

:::caution
Currently, plugins are only compatible to use with **Appcircle Cloud**. **Self-hosted** support will be available in future releases.
Expand Down

0 comments on commit fbf8655

Please sign in to comment.