I tried to get the variables of a triggered pipeline in the Dynamic pipeline, but cannot find a way to do it. How can I get the pipeline variable values from the forge app, the request or event does not contain it.
Also,
<span>'<a href="https://api.bitbucket.org/2.0/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/pipelines/%7Bpipeline_uuid" target="_blank" rel="nofollow noopener noreferrer">https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid</a>}'<br><br>Is suppose to return the variables of a given pipeline, but I only get <br></span>
"has_variables": false
and do not return my variables.
const res = await api
.asApp()
.requestBitbucket(route`/2.0/repositories/${workspaceUuid}/${repoSlug}/pipelines/${pipelineId}`, {
headers: {
'Accept': 'application/json'
}
})
This is the pipeline I am triggering, Note that I am using the Custom pipeline
image: atlassian/default-image:3
pipelines:
default:
- step:
name: 'Deployment to Staging'
script:
- echo "Your deployment to staging script goes here..."
- step:
name: 'Deployment to Production'
script:
- set -e
- echo "Your deployment to production script goes here..."
custom:
testpipe:
- variables:
- name: Force
default: "no"
allowed-values:
- "no"
- "yes"
- name: env
- step:
script:
- cat test.txt
- echo $Force