When you try to use - gcloud functions deploy subscribe --stage-bucket [BUCKET_NAME] \ --trigger-topic cloud-builds
It gives you an error because you must specify --runtime. I've tried with nodejs10 and 12 and the function is deploying.
But when I start a build TypeError: callback is not a function at module.exports.subscribe (index.js:25)
So i tried to remove the IF and continue
Then TypeError: Cannot read property 'repoName' of undefined at createSlackMessage (/workspace/index.js:42) at module.exports.subscribe (index.js:25) at Promise.resolve.then (invoker.js:199) at process._tickCallback (next_tick.js:68)
Hi,
I gave it a try Here is some feedback:
gcloud functions deploy subscribe --stage-bucket [BUCKET_NAME] \ --trigger-topic cloud-builds
It gives you an error because you must specify --runtime. I've tried with nodejs10 and 12 and the function is deploying. But when I start a build
TypeError: callback is not a function at module.exports.subscribe (index.js:25)
So i tried to remove the IF and continue ThenTypeError: Cannot read property 'repoName' of undefined at createSlackMessage (/workspace/index.js:42) at module.exports.subscribe (index.js:25) at Promise.resolve.then (invoker.js:199) at process._tickCallback (next_tick.js:68)
I've followed the https://georgealonge.medium.com/how-to-setup-slack-integration-for-google-cloud-build-using-cloud-functions-e357b580c7a1 article.