> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/Arvo-AI/aurora/llms.txt
> Use this file to discover all available pages before exploring further.

# CI/CD Integrations

> Connect Aurora to GitHub, Jenkins, and Bitbucket for continuous integration and deployment

Aurora integrates with popular CI/CD platforms to provide visibility into your deployment pipeline and automate infrastructure workflows.

## Available Integrations

<CardGroup cols={2}>
  <Card title="GitHub" icon="github" href="#github">
    OAuth App authentication
  </Card>

  <Card title="Jenkins" icon="jenkins" href="#jenkins">
    Username + API Token
  </Card>

  <Card title="Bitbucket" icon="bitbucket" href="#bitbucket">
    OAuth or API Token
  </Card>
</CardGroup>

## GitHub

### Authentication Method

OAuth App

### Setup Overview

1. **Create OAuth App**
   * Go to [GitHub > Settings > Developer settings > OAuth Apps](https://github.com/settings/developers)
   * Click New OAuth App
   * Fill in:
     * Application name: `Aurora`
     * Homepage URL: `http://localhost:3000`
     * Authorization callback URL: `http://localhost:5000/github/callback`

2. **Copy Credentials**
   * Copy the Client ID
   * Click Generate a new client secret
   * Copy the Client Secret

3. **Configure Environment Variables**
   ```bash theme={null}
   GH_OAUTH_CLIENT_ID=your-github-client-id
   GH_OAUTH_CLIENT_SECRET=your-github-client-secret
   ```

4. **Restart Aurora**
   ```bash theme={null}
   make down
   make dev
   ```

5. **Connect via OAuth Flow**
   * Go to Aurora UI
   * Click Connect GitHub
   * Authorize the app

### Features

* **Repository Access**: Browse and manage repositories
* **Pull Requests**: View and track PR status
* **Issues**: Monitor and manage issues
* **Webhooks**: Receive events for automated workflows
* **Commit History**: Track changes and deployments

### Troubleshooting

**"No authorization code provided"** — Verify callback URL in GitHub OAuth App matches exactly: `http://localhost:5000/github/callback`.

**"OAuth app not found"** — Ensure `GH_OAUTH_CLIENT_ID` and `GH_OAUTH_CLIENT_SECRET` are set correctly.

<Tip>
  For production, update the callback URL to your production domain: `https://your-aurora-domain/github/callback`.
</Tip>

## Jenkins

### Authentication Method

Username + API Token (HTTP Basic Auth)

### Setup Overview

1. **Generate API Token**
   * Log in to Jenkins
   * Click your username (top-right) > Configure
   * Scroll to API Token section
   * Click Add new Token
   * Name: `Aurora`
   * Click Generate
   * Copy the token (you won't see it again)

2. **Enter Credentials in Aurora UI**
   * Jenkins URL (e.g., `https://jenkins.example.com`)
   * Username
   * API Token

3. **Test Connection**
   * Aurora will verify credentials by fetching server info

### Features

* **Server Info**: View Jenkins version and system details
* **Jobs**: List and monitor jobs
* **Builds**: View build history and status
* **Console Output**: Read build logs
* **Build Queue**: Monitor queued builds
* **Nodes**: View Jenkins agents/nodes

### Supported Operations (Read-Only)

| Operation          | Description                           |
| ------------------ | ------------------------------------- |
| Get Server Info    | Jenkins version and system details    |
| List Jobs          | All jobs with build info              |
| Get Job Details    | Specific job configuration and builds |
| Get Build Info     | Build status, duration, and results   |
| Get Console Output | Full build logs                       |
| Get Build Queue    | Currently queued builds               |
| List Nodes         | Jenkins agents and their status       |

### Security Notes

* Jenkins connector is **read-only** for safety
* Uses HTTP Basic Auth (username + API token)
* Credentials stored securely in Vault
* No write operations (no triggering builds or config changes)

### Troubleshooting

**"Invalid credentials"** — Check username and API token are correct.

**"Forbidden"** — User lacks required permissions. Grant at least Global/Read and Job/Read.

**"Connection refused"** — Verify Jenkins URL is accessible from Aurora server.

<Warning>
  Ensure your Jenkins user has at least **Global/Read** and **Job/Read** permissions.
</Warning>

## Bitbucket

### Authentication Methods

OAuth 2.0 or API Token

### Option A: OAuth 2.0 (Recommended)

1. **Create OAuth Consumer**
   * Go to Bitbucket Settings > OAuth consumers (workspace or personal)
   * Click Add consumer
   * Fill in:
     * Name: `Aurora`
     * Callback URL: `{NEXT_PUBLIC_BACKEND_URL}/bitbucket/callback`
     * Permissions:
       * Account: Read
       * Repositories: Read
       * Pull requests: Read
       * Issues: Read
       * Projects: Read

2. **Copy Credentials**
   * Key (Client ID)
   * Secret (Client Secret)

3. **Configure Environment Variables**
   ```bash theme={null}
   BB_OAUTH_CLIENT_ID=your-oauth-consumer-key
   BB_OAUTH_CLIENT_SECRET=your-oauth-consumer-secret
   NEXT_PUBLIC_ENABLE_BITBUCKET=true
   ```

4. **Restart Aurora**
   ```bash theme={null}
   make down
   make dev
   ```

5. **Connect via OAuth Flow**
   * Go to Aurora UI
   * Click Connect Bitbucket
   * Authorize the app

### Option B: API Token

<Warning>
  Bitbucket deprecated App Passwords in September 2025. They will be fully disabled in June 2026. Use API tokens instead.
</Warning>

1. **Create API Token**
   * Go to [Atlassian Account > Security > API tokens](https://id.atlassian.com/manage-profile/security/api-tokens)
   * Click Create API token with scopes
   * Select scopes:
     * Account: Read
     * Repositories: Read
     * Pull requests: Read
     * Issues: Read
     * Projects: Read
   * Save the token

2. **Enter Credentials in Aurora UI**
   * Bitbucket email
   * API token

### Features

* **Workspaces**: List and select workspaces
* **Projects**: Browse projects within workspaces
* **Repositories**: View and filter repositories
* **Branches**: List branches for each repository
* **Pull Requests**: Monitor PR status and changes
* **Issues**: Track issues and bugs

### API Endpoints

All endpoints require `X-User-ID` header:

| Method | Path                                          | Description                 |
| ------ | --------------------------------------------- | --------------------------- |
| POST   | `/bitbucket/login`                            | Initiate OAuth or API token |
| GET    | `/bitbucket/callback`                         | OAuth callback              |
| GET    | `/bitbucket/status`                           | Check connection status     |
| POST   | `/bitbucket/disconnect`                       | Disconnect account          |
| GET    | `/bitbucket/workspaces`                       | List workspaces             |
| GET    | `/bitbucket/projects/<workspace>`             | List projects               |
| GET    | `/bitbucket/repos/<workspace>`                | List repositories           |
| GET    | `/bitbucket/branches/<workspace>/<repo>`      | List branches               |
| GET    | `/bitbucket/pull-requests/<workspace>/<repo>` | List pull requests          |
| GET    | `/bitbucket/issues/<workspace>/<repo>`        | List issues                 |

### OAuth Scopes

| Scope         | Purpose                      |
| ------------- | ---------------------------- |
| `repository`  | Read access to repositories  |
| `pullrequest` | Read access to pull requests |
| `issue`       | Read access to issues        |
| `account`     | Read access to user account  |
| `project`     | Read access to projects      |

### Troubleshooting

**"OAuth not enabled"** — Ensure `NEXT_PUBLIC_ENABLE_BITBUCKET=true`.

**"Invalid callback URL"** — Callback URL must match `{NEXT_PUBLIC_BACKEND_URL}/bitbucket/callback`.

**"No workspaces found"** — User must have access to at least one workspace.

<Note>
  Bitbucket integration supports Bitbucket Cloud only. Bitbucket Server is not currently supported.
</Note>

## Use Cases

### Deployment Tracking

* **GitHub/Bitbucket**: Monitor commits and PR merges
* **Jenkins**: Track build and deployment status
* **Aurora**: Correlate code changes with infrastructure deployments

### Automated Workflows

* **Trigger**: GitHub webhook on PR merge
* **Build**: Jenkins builds and tests
* **Deploy**: Aurora provisions infrastructure
* **Notify**: Slack notification on completion

### Incident Response

* **GitHub Issues**: Create incident tickets
* **Bitbucket**: Link to related code changes
* **Jenkins**: Check recent deployments
* **Aurora**: Rollback or deploy hotfixes

## Next Steps

<CardGroup cols={2}>
  <Card title="Cloud Providers" icon="cloud" href="/integrations/cloud-providers">
    Connect your GCP, AWS, Azure, and OVH accounts
  </Card>

  <Card title="Observability" icon="chart-line" href="/integrations/observability">
    Integrate monitoring and alerting tools
  </Card>
</CardGroup>
