deploy-cloudrun
deploy-cloudrun copied to clipboard
feat: enable using Cloud Run Job
Summary
Enables updating Cloud Run Jobs using this action for #364 . It creates a new input called job
which is the name of the job (similar to, but distinct from a "service" in Google Cloud Run). If and only if job is specified and service is not specified in the inputs then it will construct the appropriate gcloud
command for updating a job with the provided image. Note that the job has to be created first. This action will only update the job. Also note that the gcloud
command for updating jobs is in beta still, and so the user of the action must add gcloud_component: beta
(or alpha
) in the inputs for this to work (as noted in the README instructions). See here for documentation on the relevant gcloud
CLI command.
So the workflow step might look something like this if a user wanted to update a job:
- name: Deploy to Cloud Run
id: deploy
uses: 'spencercorwin/deploy-cloudrun@enable-jobs'
with:
job: ${{ env.JOB }}
gcloud_component: beta
region: ${{ env.REGION }}
# NOTE: If using a pre-built image, update the image name here
image: ${{ env.GAR_LOCATION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.REGISTRY_REPO }}/${{ env.SERVICE }}:${{ github.sha }}
Note that it looks like Cloud Run Jobs are in beta, so perhaps the maintainers don't want to merge this until the feature is out of beta and we can create a more thorough and stable PR 🙂
Test Plan
-
yarn test
-> all tests pass, including new ones - Also tested manually in my own GitHub workflow by using
uses: 'spencercorwin/deploy-cloudrun@enable-jobs'
and the workflow successfully updated my Cloud Run Job with the new image.
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
View this failed invocation of the CLA check for more information.
For the most up to date status, view the checks section at the bottom of the pull request.
Hi @spencercorwin - thank you for the Pull Request. I think we need to discuss this as a team and decide whether to extend the existing action or to create a new action. If we choose to extend this action, this is likely the approach we'll take.
Hi @sethvargo, is there any update on this feature?
@sethvargo any update on this now that cloud run jobs is not in Beta anymore?
@sethvargo hello, any updates on this? This feature would be great
@spencercorwin do you need to accept Google's CLA for this PR to be reviewed?
@spencercorwin do you need to accept Google's CLA for this PR to be reviewed?
I believe the CLA is needed before merging, but not before being reviewed. I'll sign the CLA soon regardless though :)
It would be great to be able to use this. Any updates or ETA?
really surprised that this issue isn't on a higher priority. current it is hard to to CI/CD with cloud run jobs since it isn't connected to cloud build, and it is difficult to deploy with github action after 9 months(counting).
@spencercorwin Thank you for opening this PR! Any updates on moving this forward? Happy to help you ping the right people to get some attention on this.
@spencercorwin Thank you for opening this PR! Any updates on moving this forward? Happy to help you ping the right people to get some attention on this.
I'm sorry I've been MIA. I'm just really busy and this isn't a priority for me.
I tried to sign the Google CLA a few weeks ago but I don't sign my commits with my personal email because I don't want that to be public. But the Google CLA process needs me to sign it with the same email that's on the PR/commit. So that's where I left off.
And now it looks like there are also some merge conflicts to be resolved.
I'm sorry, I just don't have the bandwidth to get this done right now. I'll try to get to it, but if someone wants to just copy my code and everything and open a new PR that would be great.
For anyone else subscribed to this that was surprised by its closure, it wasn't immediately clear that this PR was superseded by #474