~bigbes/ci-cacher

202baab18cf97619495b606f1959c080150b124f — Eugene Blikh 2 days ago d44d75d
publish.yml: override hut pages origin to public URL

The srht.bigb.es OAuth worker writes the internal docker-compose
hostname (http://pages:5112) into ~/.config/hut/config, which is
unreachable from outside the cluster. sed the config to use the
public origin (https://pages.srht.bigb.es) before publish.

This is a srht admin-side gotcha; only `builds` and `meta` get
public origins in the worker config, the other services
(pages/git/hub/todo/paste) all keep internal hostnames.
1 files changed, 5 insertions(+), 0 deletions(-)

M .builds/publish.yml
M .builds/publish.yml => .builds/publish.yml +5 -0
@@ 102,6 102,11 @@ tasks:
      cd /home/build/pages
      tar -czvf /home/build/site.tar.gz .
  - publish_pages: |
      # The srht.bigb.es OAuth worker writes the per-service origin
      # `http://pages:5112` (internal docker-compose hostname) into
      # ~/.config/hut/config. Override with the public origin before
      # hut runs, or it can't reach the API from outside the cluster.
      sed -i 's|http://pages:5112|https://pages.srht.bigb.es|' ~/.config/hut/config
      hut pages publish -d "$PAGES_DOMAIN" -s "$PAGES_SUBPATH" /home/build/site.tar.gz
  - stage_artifacts: |
      # `artifacts:` paths resolve relative to /home/build. Copy the four