Operations : static website #23

Closed
opened 2022-03-15 05:02:34 +00:00 by realaravinth · 8 comments
realaravinth commented 2022-03-15 05:02:34 +00:00 (Migrated from git.batsense.net)
There is no content yet.

Implemented pages playbook for Enough and deploy to serve the main branch of https://gitea.hostea.org/Hostea/website (to be switched to the branch that has HTML instead) at https://hostea.org and https://www.hostea.org

The configuration was pushed to the private Enough repository of hostea.org.

Implemented [pages playbook for Enough](https://lab.enough.community/main/infrastructure/-/merge_requests/527) and deploy to serve the main branch of https://gitea.hostea.org/Hostea/website (to be switched to the branch that has HTML instead) at https://hostea.org and https://www.hostea.org The configuration [was pushed to the private Enough repository of hostea.org](https://gitea.hostea.org/Hostea/enough/commit/03b172c703dc4e9383b93ec32510699ca2e75c2b).
dachary added spent time 2022-04-08 15:21:52 +00:00
5h
realaravinth added spent time 2022-04-09 06:11:11 +00:00
1h

Tasks accomplished:

  1. Tagged Docker image and preparing for freezing and tagging v0.1.0.
  2. Pages didn't apply branch changes earlier(user deploys master and then switches to pages branch, Pages didn't deploy pages post change). This behavior is now fixed, deployment branch changes are now applied during both initialization and repository udpates.
## Tasks accomplished: 1. [Tagged Docker image and preparing for freezing and tagging v0.1.0.](https://gitea.hostea.org/Hostea/pages/commit/609373786c749f94dded7534ff94ca5abbb2a2f6) 2. Pages didn't apply branch changes earlier(user deploys `master` and then switches to `pages` branch, Pages didn't deploy `pages` post change). [This behavior is now fixed, deployment branch changes are now applied during both initialization and repository udpates.](https://gitea.hostea.org/Hostea/pages/commit/325d110e9a33d88e83af95191c75b67a3dad4eb3)
realaravinth added spent time 2022-04-09 14:09:33 +00:00
4h

Tasks accomplished

  • Scripts to build and commit to user-provided branch(pages in our case)
  • Scripts to call Pages webhook to pull changes from repository
  • Tried setting up CI for auto-deploy, but it is more complex task than I thought:
    GitHub CI has write access to repositories through auto-injected secrets. So users are able to commit and push to repositories from within the CI environment. In order for pages to deploy files from the repository, Woodpecker will have to be configured to commit and push to Gitea, while avoiding circular CI triggers(Woodpecker push shouldn't trigger another CI run).

    See CI failure build logs.
## Tasks accomplished - Scripts to build and commit to user-provided branch(`pages` in our case) - Scripts to call Pages webhook to pull changes from repository - Tried setting up CI for auto-deploy, but it is more complex task than I thought: GitHub CI has write access to repositories through auto-injected secrets. So users are able to commit and push to repositories from within the CI environment. In order for pages to deploy files from the repository, Woodpecker will have to be configured to commit and push to Gitea, while avoiding circular CI triggers(Woodpecker push shouldn't trigger another CI run).<br /> See [CI failure build logs](https://woodpecker.hostea.org/Hostea/website/build/8/3).

This setup is too complex and tedious to pass on to the user, will have to create a Woodpecker plugin to abstract the process.

This setup is too complex and tedious to pass on to the user, will have to create a Woodpecker plugin to abstract the process.

I think to remember you can restrict woodpecker jobs to push events on particular branches. So if you push to another branch it does not keep going.

I think to remember you can restrict woodpecker jobs to push events on particular branches. So if you push to another branch it does not keep going.

I think to remember you can restrict woodpecker jobs to push events on particular branches. So if you push to another branch it does not keep going.

True, but it is something that doesn't happen by default. From UX perspective, I think we should provide default gaurds against pages triggering CI.

> I think to remember you can restrict woodpecker jobs to push events on particular branches. So if you push to another branch it does not keep going. True, but it is something that doesn't happen by default. From UX perspective, I think we should provide default gaurds against `pages` triggering CI.

For my own education I read the adding secret documentation and saw you added one for the CI of website.

image

For my own education I read the [adding secret documentation](https://woodpecker-ci.org/docs/usage/secrets#adding-secrets) and saw you [added one](https://woodpecker.hostea.org/Hostea/website/settings#secrets) for the CI of [website](https://gitea.hostea.org/Hostea/website). ![image](/attachments/cee1c4dd-6fd3-4555-9ce0-297d709c7d7e)
dachary added spent time 2022-04-09 14:30:18 +00:00
15min

Complete and working as intended.

Complete and working as intended.
dachary changed title from Operations : website to Operations : static website 2022-05-16 11:52:20 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Total Time Spent: 10 hours 15 minutes
dachary
5 hours 15 minutes
realaravinth
5 hours
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Hostea/july-mvp#23
There is no content yet.