Uploaded image for project: 'Bitbucket Cloud'
  1. Bitbucket Cloud
  2. BCLOUD-20328

Pass Pipeline Variables to schedule jobs

XMLWordPrintable

    • 6
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      Currently we can't pass pipeline variables for custom pipelines to schedule jobs, so if that functionality can be added that would be great.

      If that we can do by with the API only like below:-

      curl -X POST -is -u UID:PWD \
      -H 'Content-Type: application/json' \
      https://api.bitbucket.org/2.0/repositories/repo1/slack/pipelines_config/schedules/ \
      -d '

      { "type":"pipeline_schedule", "uuid":"\{714a83a6-9064-495e-97ce-db28e3848a87}

      ",
      "enabled":true,
      "target":{
      "type":"pipeline_ref_target",
      "ref_type":"branch",
      "ref_name":"test",
      "selector":

      { "type":"custom", "pattern":"sonar" }

      ,
      "variables": [

      { "key": "BITBUCKET_DEPLOYMENT_ENVIRONMENT", "value": "test" }

      ]
      },
      "cron_pattern":"15 * * * * ? *",
      "created_on":"2020-07-23T15:17:10.661Z",
      "updated_on":"2020-07-23T16:32:11.13Z"
      }'

              57465700c4e1 Edmund Munday
              5b51411c8993 gaurav pant
              Votes:
              133 Vote for this issue
              Watchers:
              54 Start watching this issue

                Created:
                Updated: