~emersion/dalligi

A CI bridge from GitLab to SourceHut
readme: move to GitLab
Add pages deployment support
Make JobCredentials.ID

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~emersion/dalligi
read/write
git@git.sr.ht:~emersion/dalligi

You can also use your local clone with git send-email.

#dalligi

Warning: this project has moved to GitLab.

A CI bridge from GitLab to SourceHut.

#Usage

  • In your GitLab project, go to Settings → CI/CD → General pipelines and set "CI/CD configuration file" to this URL: https://git.sr.ht/~emersion/dalligi/blob/master/templates/generate.yml

  • In your GitLab project, go to Settings → CI/CD → Runners. In "Specific runners", grab the URL and token.

  • Go to the meta.sr.ht OAuth2 page. Generate a token with read-write permissions for builds.sr.ht.

  • Register a new GitLab runner with:

    dalligi register -gitlab-endpoint=<url> config.json
    

    dalligi will ask for the GitLab and sr.ht tokens.

  • Start the runner with: dalligi run config.json.

Make sure your repository has a sr.ht build manifest. You're all set!

#Manual GitLab CI configuration

If you prefer to ship your own GitLab CI configuration file, you can manually ask dalligi to run a sr.ht manifest. The upside is that this gets rid of the intermediate dalligi parent pipeline, but the downside is that the GitLab CI config needs to be kept in sync with the sr.ht build manifests.

If you have a single top-level .build.yml manifest:

include: https://git.sr.ht/~emersion/dalligi/blob/master/templates/single.yml

If you have multiple manifests in .builds/, for instance alpine.yml and freebsd.yml:

include: https://git.sr.ht/~emersion/dalligi/blob/master/templates/multi.yml
alpine:
  extends: .dalligi
freebsd:
  extends: .dalligi

#Custom runner tag

To override the default runner tag "dalligi", set -gitlab-tags when registering the runner.

#Artifacts

Because of limitations of GitLab (only supports .zip archives) and sr.ht (doesn't support directories as artifacts), only the first .zip artifact generated by builds.sr.ht will be uploaded back to GitLab.

#Pages deployment

GitLab pages requires a special "pages" job for deployment. dalligi can copy over artifacts from a previous stage:

include:
  - https://git.sr.ht/~emersion/dalligi/blob/master/templates/multi.yml
  - https://git.sr.ht/~emersion/dalligi/blob/master/templates/pages.yml
alpine:
  extends: .dalligi
pages:
  dependencies:
    - alpine

#License

AGPLv3