Skip to content
Snippets Groups Projects

add a gitlab-ci runner

Merged Matti Picus requested to merge branch/preview into branch/default
1 unresolved thread

Fixes to #9

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
.gitlab-ci.yml 0 → 100644
12 # image: registry.heptapod.net/octobus/ci-dockerfiles/ci-website
13 # stage: deploy
14 # script:
15 # - make build # use artefact eventually
16 # - netlify deploy --site=056ee9b4-122d-4b02-bf62-5a2fc9776196 --auth="$NETLIFY_AUTH_TOKEN" --dir="public"
17
18 deploy:
19 # On a merge, regenerate the content and commit it to the repo
20 image: registry.heptapod.net/pypy/pypy/ci:v1
21 stage: deploy
22 only:
23 - branch/default
24 script:
25 - make build
26 - hg add public
27 - hg commit public
  • @gracinet: does this look right? Do I need to add an hg push line as well?

  • Yes, but you found out before I came back.

    Did it work right away, then? No need to create a deploy key for that?

  • Right, it needs some kind of key. The CI fails with

    abort: http authorization required for https://foss.heptapod.net/pypy/pypy.org
  • Then you need to

    1. create a (SSH) deploy key with write permission: https://foss.heptapod.net/help/user/project/deploy_keys/index.md
    2. Give it to the pipelines for this project as a 'file' variable
    3. push over SSH using that key (either using hg --ssh 'ssh -i the-key or by preparing a .ssh/config)

    See also https://foss.heptapod.net/help/ci/ssh_keys/README.md

    Optionally, if you don't want a new pipeline to be triggered by that push, you can include [skip ci] in the first line of the commit message.

    (I thought that deploy tokens could have write permissions, but it's apparently only to push to the Docker and Package registries)

  • Not clear. Where does the public key go and where does the private key go?

  • The private key goes to pipeline variables, but forget about it, seems I read the doc too fast.

    Try adding a project access token with write_repository scope instead: https://foss.heptapod.net/pypy/pypy.org/-/settings/access_tokens

    • save the token immediately, it's only displayed once
    • the corresponding user name should be project_80_bot (you'll see it in the members list in case of doubt)
    • define a pipeline variable PYPY_WEBSITE_PUSH_TOKEN with the token (there's an option to avoid disclosing it in logs)
    • push to https://project_80_bo:{PYPY_WEBSITE_PUSH_TOKEN}:@foss.heptapod.net

    Bottom line, write deploy tokens seem to exist after all, I haven't yet, but if it doesn't work, that's a bug I will fix for 0.18.1 and/or 0.19.0 final).

  • Thanks that works. The [skip ci] is important, I went to sleep without adding it and got 250 extra commits.

  • Please register or sign in to reply
  • Matti Picus added 1 commit

    added 1 commit

    Compare with previous version

  • Matti Picus mentioned in commit 6755ce52d95d

    mentioned in commit 6755ce52d95d

  • merged

  • Please register or sign in to reply
    Loading