Skip to main content

Pipeline Authentication

CI/CD pipelines need non-interactive authentication. Aethrix CLI supports this through Personal Access Tokens (PAT), which can be passed directly or via environment variables.

Authentication Methods​

MethodUse Case
Interactive loginDeveloper workstation — aeth login prompts for email and password
Non-interactive loginScripted setups — pass -u and -p flags
CI tokenCI/CD pipelines — --ci-token with a Personal Access Token
Environment variableCI/CD pipelines — AETHRIX_CI_TOKEN is checked automatically

Personal Access Tokens​

A PAT is created from the CLI with aeth license --create-token <name> (or in Aethrix Studio under Account → Personal Access Tokens). It authenticates the CLI without exposing your password.

Creating a PAT​

# Authenticate interactively first
aeth login

# Create a token (the value is shown only once)
aeth license --create-token "ci-pipeline"

The output includes the token ID, name, expiry, and the token value. Store the value securely.

Using a CI Token​

aeth login --ci-token "$AETHRIX_CI_TOKEN"

The CLI also checks the AETHRIX_CI_TOKEN environment variable automatically — if set, you don't need to pass it explicitly.

CI Token Behavior​

  • Authenticates the session but does not persist local state — no license cache, no refresh token
  • The session lasts for the lifetime of the process
  • Suitable for stateless CI/CD runners

Region Selection​

Account services are deployed per region. Use --region to target your account's region:

RegionAccount Service URL
global (default)https://accounts.aethrixstudio.com
euhttps://accounts-eu.aethrixstudio.com
ushttps://accounts-us.aethrixstudio.com
cnhttps://accounts-cn.aethrixstudio.com
staginghttps://accounts.stg.aethrixstudio.com (debug builds only)
localhttps://localhost:7100 (debug builds only)
aeth login --region eu --ci-token "$PAT"

The region is persisted after the first interactive login and reused automatically for subsequent commands.

License Activation in CI​

After authenticating with a CI token, the CLI's in-memory license is derived from the authenticated account — no separate license file installation is needed. Manage PATs with the license command:

aeth license --list-tokens # List your tokens
aeth license --revoke-token <token-id> # Revoke a token

Logging Out​

aeth logout

Clears the locally persisted refresh token and signs out from the Account Service. In CI/CD pipelines (CI token mode), logout is typically unnecessary since no state is persisted.

Environment Variables Reference​

VariablePurpose
AETHRIX_CI_TOKENPersonal Access Token for CI/CD authentication

CI/CD Pipeline Examples​

GitHub Actions​

- name: Authenticate Aethrix CLI
run: aeth login --ci-token "${{ secrets.AETHRIX_PAT }}"

- name: Run tests
run: aeth run MyProject.aprj --env staging --output ./results --junit

Azure DevOps​

- script: |
aeth login --ci-token "$(AethrixPat)"
aeth run MyProject.aprj --env staging --output $(Build.ArtifactStagingDirectory)/results --junit
displayName: 'Run Aethrix API Tests'

Jenkins​

withCredentials([string(credentialsId: 'aethrix-pat', variable: 'AETHRIX_CI_TOKEN')]) {
sh 'aeth login --ci-token "$AETHRIX_CI_TOKEN"'
sh 'aeth run MyProject.aprj --env staging --output ./results --junit'
}

See Also​