Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

convert the following static pipeline to dynamic pipeline

Siva Abbannagari June 27, 2024

I already have the static pipelines with number of steps, now I wnated to convert that to the dynamic pipeline, can somebody suggests how to convert the following steps of my static pipeline into dynamic

 


 

steps:
    - step: &commonstep
         runs-on:
           - 'self.hosted'
           - 'mylocalrunner'
           - 'linux'
         clone:
           enabled: false
         name: Get Tag
         image: atlassian/default-image:3
         script:
           - cd ${BITBUCKET_CLONE_DIR}
           - git clone git@bitbucket.org:mywkspace/init-repo -b master
           - chmod +x ./init-repo/commonstep.sh
           - bash ./init-repo/commonstep.sh
         artifacts:
           - common_artifact.txt

    - step: &Buildmyimage
         runs-on:
           - 'self.hosted'
           - 'mylocalrunner'
           - 'linux'
         name: BUILD my image
         script:
           - apk add jq
           - export devops_branch=$(cat common_artifact.txt| grep devops_branch|awk -F':' '{print $2}')
           - git clone git@bitbucket.org:mywkspace/mydevops.git -b ${devops_branch} && sh mydevops/setup-oci.sh
           - cd ${BITBUCKET_CLONE_DIR}
           - bash ${BITBUCKET_CLONE_DIR}/mydevops/build.sh myimage
         services: [small-memory-build]
         artifacts:
           - common_artifact.txt
         condition:
            changesets:
              includePaths:
                  - "my-code-dir/**"
                  - "my-common-code/**"

  

1 answer

1 vote
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 2, 2024

Hi Siva,

We have the following tutorial app:

This app adds a step to the default pipeline, so you can check its source code.

You can also check the documentation of Forge here (dynamic Pipelines operate by utilizing Atlassian's Forge extensibility platform):

If you need assistance with the implementation, I suggest posting your question to this group (this group is specifically for Forge with Bitbucket Cloud):

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events