I am trying to setup CI/CD pipeline with Google Cloud Build for deploying the Google Cloud Functions with GitHub repository.
I have managed to create the trigger and whenever i push changes to master branch, the build is triggering. But after the deployment and Cloud Function Version is incremented, when i invoke the cloud function, it still executing the old function.
Following is the buildconfig.yaml
steps:
- name: gcr.io/cloud-builders/git
args: ['clone', 'https://github.com/mayuran19/GCP-CloudFunction']
- name: gcr.io/cloud-builders/git
args: ['pull', 'https://github.com/mayuran19/GCP-CloudFunction', 'master']
- name: 'gcr.io/cloud-builders/gcloud'
args: ['functions', 'deploy', 'function-1', '--trigger-http', '--runtime', 'nodejs8', '--entry-point', 'helloWorld']
dir: './'