Sunset *.autonomic.zone repositories in favour of coop-cloud/... #18

Closed
opened 2020-09-25 07:42:15 +00:00 by decentral1se · 6 comments
Owner
The wider ticket which follows from https://git.autonomic.zone/autonomic-cooperative/traefik.autonomic.zone/issues/5.
Author
Owner

RE: the question about CI/CD on the monorepo, I think we talked about splitting this up. So, the CI is done on the compose-stacks/* repositories so that we know updates are safe and can be applied. And then the CD is happening in the coop-cloud-apps monorepo.

If you push a commit to the cloud-coop-apps repo, how does drone know which stack to deploy? So, we talked about reading the commit message for this. It might actually work. I just tested the following on the infrastructure repository:

➜  infrastructure (master) ✔ GIT_MESSAGE=$(git log -1 --pretty=%B); echo $GIT_MESSAGE
Add FR microsites backup passphrases                                                 
➜  infrastructure (master) ✔ GIT_MESSAGE=$(git show 47ea896d52c5d897bd4900f6a7e0faf21da52c4c --pretty=%B); echo $GIT_MESSAGE
Merge pull request 'Configure Renovate' (#31) from renovate/configure into master

Reviewed-on: https://git.autonomic.zone/autonomic-cooperative/infrastructure/pulls/31

So we can pull out multi-line git commit messages super easily. Following the approach of making a super slim Drone plugin like in https://git.autonomic.zone/autonomic-cooperative/stack-ssh-deploy, we could do the same with some logic like:

  1. Read the git commit message in to variable
  2. Check for a regex pattern like deploy gitea
  3. Match stack name against an env var instance file
  4. use abra to deploy by passing name + env var file

That might be cool because then if you dont pass "deploy ..." then nothing happens. And that is good when you are just gardening your config files or whatever.

RE: the question about CI/CD on the monorepo, I think we talked about splitting this up. So, the CI is done on the `compose-stacks/*` repositories so that we know updates are safe and can be applied. And then the CD is happening in the coop-cloud-apps monorepo. If you push a commit to the cloud-coop-apps repo, how does drone know which stack to deploy? So, we talked about reading the commit message for this. It might actually work. I just tested the following on the infrastructure repository: ``` ➜ infrastructure (master) ✔ GIT_MESSAGE=$(git log -1 --pretty=%B); echo $GIT_MESSAGE Add FR microsites backup passphrases ➜ infrastructure (master) ✔ GIT_MESSAGE=$(git show 47ea896d52c5d897bd4900f6a7e0faf21da52c4c --pretty=%B); echo $GIT_MESSAGE Merge pull request 'Configure Renovate' (#31) from renovate/configure into master Reviewed-on: https://git.autonomic.zone/autonomic-cooperative/infrastructure/pulls/31 ``` So we can pull out multi-line git commit messages super easily. Following the approach of making a super slim Drone plugin like in https://git.autonomic.zone/autonomic-cooperative/stack-ssh-deploy, we could do the same with some logic like: 1. Read the git commit message in to variable 2. Check for a regex pattern like `deploy gitea` 3. Match stack name against an env var instance file 4. use `abra` to deploy by passing name + env var file That might be cool because then if you dont pass "deploy ..." then nothing happens. And that is good when you are just gardening your config files or whatever.
decentral1se self-assigned this 2020-09-25 19:15:41 +00:00
Author
Owner
TODO for this ticket (just gonna take care of CI for now...): - [x] https://git.autonomic.zone/autonomic-cooperative/id.autonomic.zone - [x] https://git.autonomic.zone/autonomic-cooperative/auth.autonomic.zone - [x] https://git.autonomic.zone/autonomic-cooperative/traefik.autonomic.zone - [x] https://git.autonomic.zone/autonomic-cooperative/git.autonomic.zone - [x] https://git.autonomic.zone/autonomic-cooperative/drone-docker-runner.autonomic.zone - [x] https://git.autonomic.zone/autonomic-cooperative/drone.autonomic.zone - [x] https://git.autonomic.zone/autonomic-cooperative/alerta.autonomic.zone - [x] https://git.autonomic.zone/autonomic-cooperative/nextcloud.test.autonomic.zone (Some of those just need to be archived, so not much work.)
Owner

Done:

  • Traefik
  • Keycloak
Done: - Traefik - Keycloak
Author
Owner

Nice, thank you! One thing for the sun-setting, I just realised that we'll need to take care to disable the Drone CD on the sun-setted repos or else they will still be able to deploy things.

Nice, thank you! One thing for the sun-setting, I just realised that we'll need to take care to disable the Drone CD on the sun-setted repos or else they will still be able to deploy things.
Owner

we’ll need to take care to disable the Drone CD on the sun-setted repos..

I had been doing that, but could well have missed some - please let me know (or just kill them) if you see any.

>we’ll need to take care to disable the Drone CD on the sun-setted repos.. I had been doing that, but could well have missed some - please let me know (or just kill them) if you see any.
Author
Owner
Moved to https://git.autonomic.zone/autonomic-cooperative/infrastructure/issues/55.
decentral1se changed title from Sunset *.autonomic.zone repositories in favour of compose-stacks/* to Sunset *.autonomic.zone repositories in favour of coop-cloud/... 2020-10-27 11:40:33 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
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: coop-cloud/organising#18
No description provided.