Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor github actions #1030

Open
5 of 6 tasks
NdibeRaymond opened this issue Dec 14, 2023 · 1 comment
Open
5 of 6 tasks

refactor github actions #1030

NdibeRaymond opened this issue Dec 14, 2023 · 1 comment
Assignees

Comments

@NdibeRaymond
Copy link
Collaborator

NdibeRaymond commented Dec 14, 2023

as @yokwejuste pointed out in the recent auto-create-test-vm action PR, our github actions are a bit outdated and requires some refactoring. Though they still work, it makes sense to update them. Things that needs to be done in no particular order:

  • use matrix strategy for similar jobs to save time
  • update version of third-party actions
  • use composite actions
  • improve readability
  • add action to auto perform docker system prune on all desired vm before or after each deployment.
  • remove QEMU from github actions (since we are not doing multi-platform build)
@NdibeRaymond NdibeRaymond self-assigned this Dec 14, 2023
@yokwejuste
Copy link
Collaborator

Also, I was thinking of us having some few variables there and making the code more human-readable. We can be dropping the suggestions here.

@NdibeRaymond NdibeRaymond changed the title update third-party actions for all github actions refactor github actions Dec 18, 2023
NdibeRaymond pushed a commit that referenced this issue Dec 19, 2023
* use matrix strategy for similar jobs to save time
* update version of third-party actions
* reuse workflows

Issue: #1030
Signed-off-by: Ndibe Raymond Olisaemeka <rolisaemeka-ctr@wikimedia.org>
NdibeRaymond added a commit that referenced this issue Dec 19, 2023
* use matrix strategy for similar jobs to save time
* update version of third-party actions
* reuse workflows

Issue: #1030

Signed-off-by: Ndibe Raymond Olisaemeka <rolisaemeka-ctr@wikimedia.org>
Co-authored-by: Ndibe Raymond Olisaemeka <rolisaemeka-ctr@wikimedia.org>
NdibeRaymond pushed a commit that referenced this issue Dec 20, 2023
* use matrix strategy for similar jobs to save time
* update version of third-party actions
* use composite actions

Issue: #1030
Signed-off-by: Ndibe Raymond Olisaemeka <rolisaemeka-ctr@wikimedia.org>
NdibeRaymond added a commit that referenced this issue Dec 20, 2023
* use matrix strategy for similar jobs to save time
* update version of third-party actions
* use composite actions

Issue: #1030

Signed-off-by: Ndibe Raymond Olisaemeka <rolisaemeka-ctr@wikimedia.org>
Co-authored-by: Ndibe Raymond Olisaemeka <rolisaemeka-ctr@wikimedia.org>
NdibeRaymond pushed a commit that referenced this issue Dec 20, 2023
fix error in composite action.
for context see #1041

Issue: #1030
Signed-off-by: Ndibe Raymond Olisaemeka <rolisaemeka-ctr@wikimedia.org>
NdibeRaymond added a commit that referenced this issue Dec 20, 2023
fix error in composite action.
for context see #1041

Issue: #1030
Signed-off-by: Ndibe Raymond Olisaemeka <rolisaemeka-ctr@wikimedia.org>
NdibeRaymond pushed a commit that referenced this issue Dec 20, 2023
fix error in composite action.
for context see #1041

Issue: #1030
Signed-off-by: Ndibe Raymond Olisaemeka <rolisaemeka-ctr@wikimedia.org>
NdibeRaymond added a commit that referenced this issue Dec 21, 2023
fix error in composite action.
for context see #1041

Issue: #1030
Signed-off-by: Ndibe Raymond Olisaemeka <rolisaemeka-ctr@wikimedia.org>
NdibeRaymond pushed a commit that referenced this issue Dec 21, 2023
* use matrix strategy for similar jobs to save time
* update version of third-party actions
* use composite actions

Issue: #1030
Signed-off-by: Ndibe Raymond Olisaemeka <rolisaemeka-ctr@wikimedia.org>
NdibeRaymond added a commit that referenced this issue Dec 21, 2023
* use matrix strategy for similar jobs to save time
* update version of third-party actions
* use composite actions

Issue: #1030
Signed-off-by: Ndibe Raymond Olisaemeka <rolisaemeka-ctr@wikimedia.org>
NdibeRaymond pushed a commit that referenced this issue Dec 21, 2023
fix error in github actions.
for context see #1044

Issue: #1030
Signed-off-by: Ndibe Raymond Olisaemeka <rolisaemeka-ctr@wikimedia.org>
NdibeRaymond added a commit that referenced this issue Dec 21, 2023
fix error in github actions.
for context see #1044

Issue: #1030
Signed-off-by: Ndibe Raymond Olisaemeka <rolisaemeka-ctr@wikimedia.org>
NdibeRaymond pushed a commit that referenced this issue Dec 21, 2023
fix error in github actions.
for context see #1044

Issue: #1030
Signed-off-by: Ndibe Raymond Olisaemeka <rolisaemeka-ctr@wikimedia.org>
NdibeRaymond added a commit that referenced this issue Dec 21, 2023
fix error in github actions.
for context see #1044

Issue: #1030
Signed-off-by: Ndibe Raymond Olisaemeka <rolisaemeka-ctr@wikimedia.org>
NdibeRaymond pushed a commit that referenced this issue Dec 21, 2023
fix error in github actions.
for context see #1044

Issue: #1030
Signed-off-by: Ndibe Raymond Olisaemeka <rolisaemeka-ctr@wikimedia.org>
NdibeRaymond added a commit that referenced this issue Dec 21, 2023
fix error in github actions.
for context see #1044

Issue: #1030
Signed-off-by: Ndibe Raymond Olisaemeka <rolisaemeka-ctr@wikimedia.org>
NdibeRaymond pushed a commit that referenced this issue Dec 21, 2023
fix error in github actions.
for context see #1044

Issue: #1030
Signed-off-by: Ndibe Raymond Olisaemeka <rolisaemeka-ctr@wikimedia.org>
NdibeRaymond pushed a commit that referenced this issue Dec 21, 2023
fix error in github actions.
for context see #1044

Issue: #1030
Signed-off-by: Ndibe Raymond Olisaemeka <rolisaemeka-ctr@wikimedia.org>
NdibeRaymond added a commit that referenced this issue Dec 22, 2023
fix error in github actions.
for context see #1052

Issue: #1030
Signed-off-by: Ndibe Raymond Olisaemeka <rolisaemeka-ctr@wikimedia.org>
NdibeRaymond pushed a commit that referenced this issue Dec 22, 2023
fix error in github actions.
for context see #1052

Issue: #1030
Signed-off-by: Ndibe Raymond Olisaemeka <rolisaemeka-ctr@wikimedia.org>
NdibeRaymond added a commit that referenced this issue Dec 22, 2023
fix error in github actions.
for context see #1052

Issue: #1030
Signed-off-by: Ndibe Raymond Olisaemeka <rolisaemeka-ctr@wikimedia.org>
NdibeRaymond pushed a commit that referenced this issue Dec 22, 2023
fix error in github actions.
for context see #1052

Issue: #1030
Signed-off-by: Ndibe Raymond Olisaemeka <rolisaemeka-ctr@wikimedia.org>
NdibeRaymond added a commit that referenced this issue Dec 22, 2023
fix error in github actions.
for context see #1052

Issue: #1030
Signed-off-by: Ndibe Raymond Olisaemeka <rolisaemeka-ctr@wikimedia.org>
NdibeRaymond pushed a commit that referenced this issue Dec 22, 2023
fix error in github actions.
for context see #1052

Issue: #1030
Signed-off-by: Ndibe Raymond Olisaemeka <rolisaemeka-ctr@wikimedia.org>
NdibeRaymond added a commit that referenced this issue Dec 22, 2023
fix error in github actions.
for context see #1052

Issue: #1030
Signed-off-by: Ndibe Raymond Olisaemeka <rolisaemeka-ctr@wikimedia.org>
NdibeRaymond pushed a commit that referenced this issue Dec 22, 2023
fix error in github actions.
for context see #1052

Issue: #1030
Signed-off-by: Ndibe Raymond Olisaemeka <rolisaemeka-ctr@wikimedia.org>
NdibeRaymond added a commit that referenced this issue Dec 22, 2023
fix error in github actions.
for context see #1052

Issue: #1030
Signed-off-by: Ndibe Raymond Olisaemeka <rolisaemeka-ctr@wikimedia.org>
NdibeRaymond pushed a commit that referenced this issue Dec 29, 2023
add action to auto perform docker system prune on all
desired vm before or after each deployment.

Issue: #1030
Signed-off-by: Ndibe Raymond Olisaemeka <rolisaemeka-ctr@wikimedia.org>
NdibeRaymond pushed a commit that referenced this issue Dec 29, 2023
add action to auto perform docker system prune on all
desired vm before or after each deployment.

Issue: #1030
Signed-off-by: Ndibe Raymond Olisaemeka <rolisaemeka-ctr@wikimedia.org>
NdibeRaymond added a commit that referenced this issue Dec 29, 2023
add action to auto perform docker system prune on all
desired vm before or after each deployment.

Issue: #1030

Signed-off-by: Ndibe Raymond Olisaemeka <rolisaemeka-ctr@wikimedia.org>
Co-authored-by: Ndibe Raymond Olisaemeka <rolisaemeka-ctr@wikimedia.org>
NdibeRaymond pushed a commit that referenced this issue Dec 29, 2023
turns out you can't use values that are identical to values in the
secrets context in a way that it appears in the logs
(github doesn't allow this).
Moving all non-sensitive values from secrets to vars should fix this.

Issue: #1030
Signed-off-by: Ndibe Raymond Olisaemeka <rolisaemeka-ctr@wikimedia.org>
NdibeRaymond added a commit that referenced this issue Dec 29, 2023
turns out you can't use values that are identical to values in the
secrets context in a way that it appears in the logs
(github doesn't allow this).
Moving all non-sensitive values from secrets to vars should fix this.

Issue: #1030
Signed-off-by: Ndibe Raymond Olisaemeka <rolisaemeka-ctr@wikimedia.org>
NdibeRaymond pushed a commit that referenced this issue Dec 29, 2023
use `docker volume rm "$volume" 2> /dev/null || true`
so an error (like volume still in use) won't cause action to exit with 1

Issue: #1030
Signed-off-by: Ndibe Raymond Olisaemeka <rolisaemeka-ctr@wikimedia.org>
NdibeRaymond added a commit that referenced this issue Dec 29, 2023
use `docker volume rm "$volume" 2> /dev/null || true`
so an error (like volume still in use) won't cause action to exit with 1

Issue: #1030

Signed-off-by: Ndibe Raymond Olisaemeka <rolisaemeka-ctr@wikimedia.org>
Co-authored-by: Ndibe Raymond Olisaemeka <rolisaemeka-ctr@wikimedia.org>
NdibeRaymond pushed a commit that referenced this issue Dec 29, 2023
Issue: #1030
Signed-off-by: Ndibe Raymond Olisaemeka <rolisaemeka-ctr@wikimedia.org>
NdibeRaymond added a commit that referenced this issue Dec 29, 2023
Issue: #1030

Signed-off-by: Ndibe Raymond Olisaemeka <rolisaemeka-ctr@wikimedia.org>
Co-authored-by: Ndibe Raymond Olisaemeka <rolisaemeka-ctr@wikimedia.org>
NdibeRaymond pushed a commit that referenced this issue Dec 30, 2023
improve the conditions of `destroy_test_vm` to only run
when:
* pr is closed and PR still has the `create-test-vm` label
* `create-test-vm` label is removed from PR

This ensures that the `destory_test_vm` only runs when
neccessary and doesn't spam the github actions tab.

issue: #1030
Signed-off-by: Ndibe Raymond Olisaemeka <rolisaemeka-ctr@wikimedia.org>
NdibeRaymond added a commit that referenced this issue Dec 30, 2023
* create_destory_test_vm minor improvement

use better checkmarks

Signed-off-by: Ndibe Raymond Olisaemeka <rolisaemeka-ctr@wikimedia.org>

* create_destory_test_vm minor improvement

improve the conditions of `destroy_test_vm` to only run
when:
* pr is closed and PR still has the `create-test-vm` label
* `create-test-vm` label is removed from PR

This ensures that the `destory_test_vm` only runs when
neccessary and doesn't spam the github actions tab.

issue: #1030
Signed-off-by: Ndibe Raymond Olisaemeka <rolisaemeka-ctr@wikimedia.org>

---------

Signed-off-by: Ndibe Raymond Olisaemeka <rolisaemeka-ctr@wikimedia.org>
Co-authored-by: Ndibe Raymond Olisaemeka <rolisaemeka-ctr@wikimedia.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants