<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Cradicle Explorer</title>
    <link href="/css/bootstrap/bootstrap.min.css" rel="stylesheet">
    <style>
      .form-control-dark::placeholder {
          color: #aaa;
          opacity: 1;
      }
    </style>
    <link rel="stylesheet" href="/assets/fontawesome/css/all.min.css">
    <link rel="icon" type="image/png" href="/favicon.png">


                <link href="/css/dashboard.css" rel="stylesheet">
                </head>
                <body>
                <header class="navbar navbar-dark sticky-top bg-dark flex-md-nowrap p-0 shadow">
                  <a class="navbar-brand col-md-3 col-lg-2 me-0 px-3 fs-6" href="/">Cradicle Explorer</a>
                  <button class="navbar-toggler position-absolute d-md-none collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#sidebarMenu" aria-controls="sidebarMenu" aria-expanded="false" aria-label="Toggle navigation">
                    <span class="navbar-toggler-icon"></span>
                  </button>
                  <form method="get" action="/cgi-bin/main" style="width:100%;"><input class="form-control form-control-dark w-100 rounded-0 border-0" type="text" name="q" placeholder="Search repos" aria-label="Search"></form>
                  <div class="navbar-nav flex-row">
                    <div class="nav-item text-nowrap">
                      <a class="nav-link px-3 active" href="/cgi-bin/repo?id=zBNXLtTqUu9LBZHCPFShAeXnp5Gz">radicle-ci</a>
                    </div>
                  </div>
                </header>
                <div class="container-fluid">
                  <div class="row">
                    <nav id="sidebarMenu" class="col-md-3 col-lg-2 d-md-block bg-dark sidebar collapse">
                      <div class="position-sticky pt-3 sidebar-sticky">
                        <ul class="nav flex-column">
                          <li class="nav-item">
                            <a class="nav-link active" href="/cgi-bin/repo?id=zBNXLtTqUu9LBZHCPFShAeXnp5Gz">
                              <i class="align-text-bottom fa-solid fa-info"></i>
                              Info
                            </a>
                          </li>
                          <li class="nav-item">
                            <a class="nav-link" href="/cgi-bin/repo?id=zBNXLtTqUu9LBZHCPFShAeXnp5Gz&issue=list">
                              <i class="align-text-bottom fa-solid fa-layer-group"></i>
                              Issues
                            </a>
                          </li>
                          <li class="nav-item">
                            <a class="nav-link" href="/cgi-bin/repo?id=zBNXLtTqUu9LBZHCPFShAeXnp5Gz&patch=list">
                              <i class="align-text-bottom fa-solid fa-vest-patches"></i>
                              Patches
                            </a>
                          </li>
                          <li class="nav-item">
                            <a class="nav-link" href="/cgi-bin/repo?id=zBNXLtTqUu9LBZHCPFShAeXnp5Gz&wallet=list">
                              <i class="align-text-bottom fa-solid fa-wallet"></i>
                              Wallets
                            </a>
                          </li>
                          <li class="nav-item">
                            <a class="nav-link" href="/cgi-bin/repo?id=zBNXLtTqUu9LBZHCPFShAeXnp5Gz&source=.">
                              <i class="align-text-bottom fa-solid fa-code"></i>
                              Source
                            </a>
                          </li>
                        <h6 class="sidebar-heading d-flex justify-content-between align-items-center px-3 mt-4 mb-1 text-muted text-uppercase">
                          <span></span>
                        </h6>
                        <ul class="nav flex-column mb-2">
                        
                        </ul>
                      </div>
                    </nav>
                <main class="col-md-9 ms-sm-auto col-lg-10">
                  <div class="container px-1 py-3">
        

    <div class="list-group">
    <div class="list-group-item">
    <div style="font-size:1.3rem;">radicle-ci</div>
    <div class="repo-item">Radicle CI</div>
    <div>rad:zBNXLtTqUu9LBZHCPFShAeXnp5Gz</div>
    </div>
    <div class="list-group-item">
    <div>Visibility</div>
    <div class="repo-item">public</div>
    </div>
    <div class="list-group-item">
    <div>Delegates</div><div class="repo-item">did:key:z6MksQ5b2qdMziW97eTr1FH14UoNAXVAeAfizuTBPzhHjQRX</div><div class="repo-item">did:key:z6MkrnXJWPndzPBxpBUaE3L3BnMeWpaQdT1V1FvkoCPFSFS3</div>
    </div>
    <div class="list-group-item">
    <div>Default branch</div>
    <div><span class="repo-item">main &#8594 8966ff648668dd51fcfbeef0d2a2044ffbe0acfa</span> (Sat Oct 14 10:31:59 2023)</div>
    </div>
    <div class="list-group-item">
    <div>Threshold</div>
    <div class="repo-item">1</div>
    </div>
    </div>
    
        <div class="list-group mt-3">
        <div class="list-group-item">
        <div class="mb-2" style="font-weight:bold;"><i class="fa-solid fa-book"></i> README.md</div>
        <pre style="margin:0; font-size:0.85rem; overflow-x:auto; color:#fafafa;"># Radicle CI Broker

This project is a proof of concept for a CI broker that can be used to integrate Radicle projects with external CI systems. It is currently in a very early stage of development and, for the time being, only supports [Concourse CI](https://concourse-ci.org/) for scheduling and executing CI pipelines.

The Radicle CI Broker  subscribes to node events and is specifically interested in `radicle::node::Event::RefsFetched` events. It looks for `RefUpdate::Updated` and `RefUpdate::Updated` references related to patches. 

It will then trigger a pipeline job for each patch that was updated or created. The pipeline job will clone the repository, checkout the patch, and execute whatever is declared in the `{project_root_folder}/.concourse/config.yaml` file. This configuration file contains a description of pipelines and tasks that Concourse CI will execute.

Please also take a look at the [architecture.md](architecture.md) for a broader overview.

## Installation

### 1. Docker Compose

To install and run Concourse CI, you will first need Docker Compose. Follow the steps documented in the
[official guide](https://docs.docker.com/compose/install/) for your system.

### 2. Concourse CI

Once Docker Compose is installed, proceed with the installation of Concourse CI by following the
[official quick start guide](https://concourse-ci.org/quick-start.html). The installation guide is divided into two
sections.

The first section involves downloading the Docker Compose configuration and executing `docker-compose up` from the
folder where the configuration was stored. This step is necessary as it will download all the required images and spin
up the containers. After this step, Concourse CI will be running, and a UI client will be accessible at
`http://localhost:8080`. The default username and password are both `test`.

The second part is the installation of the fly CLI. While not a strict requirement, it is recommended as it simplifies
interactions and experimentation with the CI.

## Running

Before running Radicle CI Broker, ensure that both the Radicle node and Concourse CI are up and running. Executing `cargo run` from the root folder of the project is more than enough.

The CLI accepts the following required parameters:

1. `--concourse-url`: This is where Concourse runs. For example, if run locally, it will be `http://localhost:8080`.
2. `--concourse-user`: The username used to authenticate with Concourse.
3. `--concourse-pass`: The password used to authenticate with Concourse.
4. `--radicle-api-url`: This is where the `radicle-httpd` runs. This will be used by Concourse to `git clone` a
   repository.

For the time being, Radicle CI makes one assumption. The repository that will be cloned to trigger a pipeline job
contains a configuration file located at the following path: `{project_root_folder}/.concourse/config.yaml`.

## License

Radicle CI Broker is distributed under the terms of both the MIT license and the Apache License (Version 2.0).

See [LICENSE-APACHE](LICENSE-APACHE) and [LICENSE-MIT](LICENSE-MIT) for details.</pre>
        </div>
        </div>

</div>
</main>
</div>
</div>


</body>
</html>

