I am wanting to implement a tool called pulse into my CI/CD which is bitbucket pipelines. I am required to do the following:
1) Use Bitbucket Pipelines script to figure out what are the new commits since the previous build (to the main branch)
2) Install Pulse CLI (the latest version is 1.9.4)
3) Use the Pulse CLI to push all new commits as changes
4) Use the Pulse CLI to push the new build as a deployment
These data points will allow us to analyze two metrics: Deployment Frequency, Lead time for changes.
To do this I have built the following script:
image: bitnami/git
pipelines:
branches: # matched against branches in your Git repository
staging: # branch name
- step:
name: Autodeploy staging
deployment: staging
script:
- apt-get update
- apt-get -qq install git-ftp
- git ftp push -v --user $stageUser --passwd $stagePass ftp.yetitech.nz
- step:
name: Manually deploy production
deployment: production
trigger: manual # manually trigger the deployment if the sync list in the previous step looks good
script:
- GET /2.0/repositories/{workspace}/{repo_slug}/pipelines/ # Get git tag version
- apt-get update
- apt-get -qq install git-ftp
- git ftp push --user $prodUser --passwd $prodPass ftp.yetitech.nz
- step:
name: install pulse
script:
- curl -fsSL -o pulse-event-cli https://artifacts.codacy.com/codacy/pulse/event-cli/1.9.4/pulse-event-cli_linux_amd64/pulse-event-cli && \
chmod +x pulse-event-cli
- step:
name: pulse
script:
- ./pulse-event-cli push git deployment \
- --api-key "QcWp63bs3oEqRtjmNqVF6jl3YYJhgLRg4L5VK2n3/Sro00NnaTTStA==" \
- --timestamp "$(date +%s)" \
I am having difficulty as it's erroring on the curl script. Can anyone please help guide me as to why this is happening? I'm also unsure if I'm performing the correct approach for grabbing the git version tags