Open
Conversation
Author
|
@HeavyWombat @Luke-Roy-IBM is it possible to integrate this feature? |
Member
|
@sauterle Thanks a lot for the Pull request I will look into this 👍 |
Signed-off-by: Stefan Sauterleute <stefan.sauterleute@byteleaf.de>
Signed-off-by: Stefan Sauterleute <stefan.sauterleute@byteleaf.de>
Signed-off-by: Stefan Sauterleute <stefan.sauterleute@byteleaf.de>
Signed-off-by: Stefan Sauterleute <stefan.sauterleute@byteleaf.de>
Luke-Roy-IBM
requested changes
Jan 13, 2025
Member
Luke-Roy-IBM
left a comment
There was a problem hiding this comment.
@sauterle Thanks for your pull request and your patience. Please address the changes and i will be able to update the Github action with Cron support
| if: ( inputs.component == 'subscription' || inputs.component == 'sub' ) && inputs.subscription-type == 'cron' | ||
| run: | | ||
| if ibmcloud ce sub cron get --name ${{ inputs.name }} ; then | ||
| ibmcloud ce sub cron update --name ${{ inputs.name }} --destination-type ${{ inputs.destination-type }} --destination ${{ inputs.destination }} --path ${{ inputs.path }} --extension ${{ inputs.extension }} --schedule ${{ inputs.schedule }} --wait ${{ steps.set-resources.outputs.cpu }} ${{ steps.set-resources.outputs.memory }} |
Member
There was a problem hiding this comment.
Please replace with following code in order to update existing subscription
Suggested change
| ibmcloud ce sub cron update --name ${{ inputs.name }} --destination-type ${{ inputs.destination-type }} --destination ${{ inputs.destination }} --path ${{ inputs.path }} --extension ${{ inputs.extension }} --schedule ${{ inputs.schedule }} --wait ${{ steps.set-resources.outputs.cpu }} ${{ steps.set-resources.outputs.memory }} | |
| ibmcloud ce sub cron update --name ${{ inputs.name }} --destination-type ${{ inputs.destination-type }} --destination ${{ inputs.destination }} --path ${{ inputs.path }} --extension ${{ inputs.extension }} --schedule "${{ inputs.schedule }}" |
| if ibmcloud ce sub cron get --name ${{ inputs.name }} ; then | ||
| ibmcloud ce sub cron update --name ${{ inputs.name }} --destination-type ${{ inputs.destination-type }} --destination ${{ inputs.destination }} --path ${{ inputs.path }} --extension ${{ inputs.extension }} --schedule ${{ inputs.schedule }} --wait ${{ steps.set-resources.outputs.cpu }} ${{ steps.set-resources.outputs.memory }} | ||
| else | ||
| ibmcloud ce sub cron create --name ${{ inputs.name }} --destination-type ${{ inputs.destination-type }} --destination ${{ inputs.destination }} --path ${{ inputs.path }} --extension ${{ inputs.extension }} --schedule ${{ inputs.schedule }} --wait ${{ steps.set-resources.outputs.cpu }} ${{ steps.set-resources.outputs.memory }} |
Member
There was a problem hiding this comment.
Please replace with the following in order to create a cron subscription
Suggested change
| ibmcloud ce sub cron create --name ${{ inputs.name }} --destination-type ${{ inputs.destination-type }} --destination ${{ inputs.destination }} --path ${{ inputs.path }} --extension ${{ inputs.extension }} --schedule ${{ inputs.schedule }} --wait ${{ steps.set-resources.outputs.cpu }} ${{ steps.set-resources.outputs.memory }} | |
| ibmcloud ce sub cron create --name ${{ inputs.name }} --destination-type ${{ inputs.destination-type }} --destination ${{ inputs.destination }} --path ${{ inputs.path }} --extension ${{ inputs.extension }} --schedule "${{ inputs.schedule }}" --wait |
| cpu: 1 | ||
| memory: 4G | ||
| ``` | ||
| *Deploy a Cron Subscription: `deploy-cron-sub.yml`*: Deploy your Cron Subscription to `Default` resource-group in `eu-de` to the project `MY-PROJECT` with its source code in the root of the repository the name of the job is`my-cron-sub`. |
Member
There was a problem hiding this comment.
Suggested change
| *Deploy a Cron Subscription: `deploy-cron-sub.yml`*: Deploy your Cron Subscription to `Default` resource-group in `eu-de` to the project `MY-PROJECT` with its source code in the root of the repository the name of the job is`my-cron-sub`. | |
| *Deploy a Cron Subscription: `deploy-cron-sub.yml`*: Deploy your Cron Subscription to `Default` resource-group in `eu-de` to the project `MY-PROJECT` with its source code in the root of the repository the name of the job is`cron-app`. See the docs for more infromation https://cloud.ibm.com/docs/codeengine?topic=codeengine-subscribe-cron-tutorial. |
Comment on lines
+186
to
+200
| api-key: ${{ secrets.IBM_IAM_API_KEY }} | ||
| resource-group: 'Default' | ||
| region: 'eu-de' | ||
| project: 'MY-PROJECT' | ||
| component: 'sub' | ||
| subscription-type: 'cron' | ||
| destination-type: 'app' | ||
| destination: 'my-app' | ||
| path: '/events' | ||
| extension: 'extA=A' | ||
| schedule: '*/2 * * * *' | ||
| name: 'my-cron-sub' | ||
| build-source: './' | ||
| cpu: 1 | ||
| memory: 4G |
Member
There was a problem hiding this comment.
Please update docs as this is the way it was tested
Suggested change
| api-key: ${{ secrets.IBM_IAM_API_KEY }} | |
| resource-group: 'Default' | |
| region: 'eu-de' | |
| project: 'MY-PROJECT' | |
| component: 'sub' | |
| subscription-type: 'cron' | |
| destination-type: 'app' | |
| destination: 'my-app' | |
| path: '/events' | |
| extension: 'extA=A' | |
| schedule: '*/2 * * * *' | |
| name: 'my-cron-sub' | |
| build-source: './' | |
| cpu: 1 | |
| memory: 4G | |
| api-key: ${{ secrets.IBM_IAM_API_KEY }} | |
| resource-group: 'Default' | |
| region: 'eu-de' | |
| project: 'MY-PROJECT' | |
| component: 'sub' | |
| subscription-type: 'cron' | |
| destination-type: 'app' | |
| destination: 'cron-app' | |
| path: '/events' | |
| extension: 'extA=A' | |
| schedule: '*/2 * * * *' | |
| name: 'cron-sub' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add Subscription (cron) and general structure for component
subscription