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

Add automatic dev deployment on push #7657

Draft
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

frcroth
Copy link
Member

@frcroth frcroth commented Feb 28, 2024

Currently working on editing this comment, but the Github Token does not alow for that.

https://___.webknossos.xyz


(Please delete unneeded items, merge only when none are left open)

@frcroth frcroth changed the title Update config.yml Add automatic dev deployment on push Feb 28, 2024
@frcroth frcroth requested a review from fm3 February 28, 2024 13:47
@frcroth frcroth marked this pull request as ready for review February 28, 2024 13:49
@fm3
Copy link
Member

fm3 commented Feb 28, 2024

could we have this maybe only if the PR is ready for review?

@frcroth frcroth marked this pull request as draft February 28, 2024 14:15
@frcroth frcroth marked this pull request as ready for review February 28, 2024 14:17
@fm3 fm3 requested a review from philippotto February 28, 2024 14:27
@frcroth frcroth marked this pull request as draft February 28, 2024 16:15
@frcroth
Copy link
Member Author

frcroth commented Feb 28, 2024

could we have this maybe only if the PR is ready for review?

Done now. As discussed after the presentation, it is not exactly clear how to proceed here. i.e. require a label, what should be the default, is draft status relevant?

@normanrz
Copy link
Member

normanrz commented Mar 4, 2024

I like the idea of a devdeploy label. Draft state shouldn't matter. Can actions be triggered when a label has been added/removed?

@frcroth
Copy link
Member Author

frcroth commented Mar 4, 2024

I like the idea of a devdeploy label. Draft state shouldn't matter. Can actions be triggered when a label has been added/removed?

Yes, it is possible to run a GitHub action on a label change (https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request). However, this would then be a GitHub action and not a circleCI action.
This might also make it possible to change the PR comment more easily to include a link to the dev instance.
This would require the secret for kubernetix also be present in this repo.

Another question would be when this should run:

  • Immediately after the label is added and only then
  • If the label is placed on the PR after the CircleCI run is done (once)
  • above but every time the CI run is done and the label is still active.

@normanrz
Copy link
Member

normanrz commented Mar 4, 2024

  • above but every time the CI run is done and the label is still active.

Maybe it would be best to just check at the end of every CircleCI run whether the label is present and deploy/update accordingly. Removing deployments would still be manual.
Running it in a separate Github action seems to introduce a race condition and I wouldn't want to switch to Github actions entirely just for this auto-deploy.

@normanrz
Copy link
Member

normanrz commented Mar 4, 2024

Would it make things easier to use the gh CLI tool in CircleCI? It also seems straight-forward to change the PR text: https://cli.github.com/manual/gh_pr_edit. I think we already have a Github token in CircleCI for releases.

@frcroth frcroth added the autodeploy Automatically create dev deployment on successful CI run label Mar 18, 2024
@frcroth frcroth force-pushed the create-dev-deployment-on-push branch 3 times, most recently from e9152e6 to 7f2603a Compare March 18, 2024 12:21
@frcroth frcroth force-pushed the create-dev-deployment-on-push branch from 7f2603a to c23f1a9 Compare March 18, 2024 12:36
@frcroth frcroth added autodeploy Automatically create dev deployment on successful CI run and removed autodeploy Automatically create dev deployment on successful CI run labels Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autodeploy Automatically create dev deployment on successful CI run
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants