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/**"

  

0 answers

Suggest an answer

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

Atlassian Community Events