Fossil + Concourse

Concourse resource for Fossil
Login

Concourse resource for Fossil repos, so you can integrate cool continuous thing-doing in your Fossil project. For more information about installing and using Concourse and writing pipelines, please visit the docs. This program is, in fact, built and deployed using Concourse, here's the latest pipeline.yml. Here's a blog post explaining step-by-step my deployment workflow using this resource.

Pre-requisites

*Some changes to the Fossil source code were recently made in order to fix the JSON API, which wasn't really working entirely (thanks, Stephan!). Those fixes have not yet been incorporated into any release, please use trunk.

Resource type configuration

resource_types:
  - name: fossil-resource
    type: docker-image
    source:
      repository: avalos/fossil-concourse-resource
      tag: latest

Source configuration

Behavior

check. Poll commits on branch

The resource will fetch the /json/timeline endpoint from the specified url, and it will return a ref value containing the ID of the commit.

in. Pull commit from repo

The ref from the check step will be used as the input. The resource will download a tarball from the /tarball/{ref} endpoint and extract it into the destination directory.

out. Not implemented

This resource doesn't allow making pushes yet.

Example

resource_types:
  - name: fossil-resource
    type: docker-image
    source:
      repository: avalos/fossil-concourse-resource
      tag: latest

resources:
  - name: fossil
    type: fossil-resource
    source:
      url: https://fossil.avalos.me/fossil-concourse
      branch: trunk

jobs:
  - name: do-something
    serial: true
    plan:
      - get: fossil
        trigger: true
      - task: build
        config:
          platform: linux
          image_resource:
            type: docker-image
            source:
              repository: alpine
              tag: edge
          inputs:
            - name: fossil
              path: .
          run:
            path: ls
            args:
              - -la

Testing

To be honest, I don't know how to write test scripts. I should learn.

License

Copyright (C) 2020  Iván Ávalos

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.