I already have pipeline triggers between repositories working without any issues.
Now, I have a new custom pipeline in a third repo (all are in the same workspace). In my existing repo where I already have a pipeline trigger for a custom pipeline, when I call the new pipeline, I keep getting "Account, repository or branch doesn't exist."
This new pipeline works perfectly when I run it manually from its repo. I copy / pasted the repo name, branch and pipeline names. All repos in the workspace use the same SSH key.
In the following, &chart step works but &deploy-cdk doesn't. What am I missing? They are pretty similar except for the number of variables. I tried adding ACCOUNT variable with workspace name, removing BRANCH_NAME (target repo only has "main" branch), nothing works.
- step: &chart # Update Helm chart in non production flow. ** Assumes a chart is present
name: Update helm chart value with the build number
script:
- cat tag.sh
- source tag.sh
- pipe: atlassian/trigger-pipeline:5.0.0
variables:
BITBUCKET_USERNAME: '${BB_PIPE_USER}'
BITBUCKET_APP_PASSWORD: '${BB_PIPE_PW}'
REPOSITORY: 'microservices-charts'
BRANCH_NAME: 'master'
CUSTOM_PIPELINE_NAME: 'update-k8s-values'
PIPELINE_VARIABLES: >
[{
"key": "REPO_SLUG",
"value": "${BITBUCKET_REPO_SLUG}"
},
{
"key": "IMAGE_TAG",
"value": "${IMAGE_TAG}"
},
{
"key": "VACV_ENV",
"value": "dev"
}]
WAIT: 'true'
- step: &deploy-cdk
name: deploy CDK
script:
- echo "Commit hash is ${BITBUCKET_COMMIT}"
- pipe: atlassian/trigger-pipeline:5.0.0
variables:
BITBUCKET_USERNAME: '${BB_PIPE_USER}'
BITBUCKET_APP_PASSWORD: '${BB_PIPE_PW}'
REPOSITORY: 'packages-spa-deployment'
BRANCH_NAME: 'main'
CUSTOM_PIPELINE_NAME: 'dev-build'
PIPELINE_VARIABLES: >
[{
"key": "BUILD_HASH",
"value": "${BITBUCKET_COMMIT}"
}]
WAIT: 'true'
DEBUG: 'true'
Custom pipe being called:
pipelines:
custom:
dev-build:
- variables:
- name: BUILD_HASH
- step:
name: log commit hash
script:
- echo "Updating dev bucket with latest commit $BUILD_HASH"
- step: *build-cdk
- step: *cdk-deploy-np