Use environment variables in step config

XMLWordPrintable

      Hi,

      I was trying to use the BITBUCKET_BRANCH env var as part of the config for a given step but I was not able to do so : 

      The environment '$BITBUCKET_BRANCH' in your bitbucket-pipelines.yml doesn’t match any environment defined in your settings. Either update your yml, or your settings, to use the same name.

      What I was trying to do :

       

      branches: 
        '{master,dev,staging}': 
          - step: 
              name: Update ECS Service 
              deployment: $BITBUCKET_BRANCH   <----- HERE
              <<: *UpdateECSService
      

       

       

      I had to split my steps for each environment and explicitly refer to the deployment (in my case name of the branch = name of the deployment)  : 

      branches:    
        dev:      
          - step :       
            <<: *updateECSService
            deployment: dev
      

      Thanks in advance

      RG

       

              Assignee:
              Unassigned
              Reporter:
              romgal
              Votes:
              4 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: