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

Pipelines errors if variable for service is empty

    XMLWordPrintable

Details

    Description

      when adding services to my pipeline config I receive the following message: “The step provided was invalid.”

      Here is my config:

      image: circleci/ruby:2.6.3-node-browsers
      
      pipelines:
        default:
          - step:          # non-parallel step
              name: Build
              script:
                - ./.ci/build.sh
              caches:
                - vendor-bundle
                - yarn-cache
                - node-modules
                - cache-cypress
              artifacts:
                - node_modules/**
                - vendor/bundle/**
          - parallel:
              - step:
                  name: Rspec
                  services:
                    - postgres
                  script:
                    - ./.ci/rspec.sh
              - step:
                  name: Cypress
                  script:
                    - ./.ci/cypress.sh
              - step:
                  name: Jest
                  script:
                    - ./.ci/jest.sh
              - step:
                  name: Static Analyisis
                  script:
                    - ./.ci/static_analysis.sh
      
      definitions:
        services:
          postgres:
            image: postgres
            variables:
              POSTGRES_USER: nexl_db_user
              POSTGRES_DB: nexl_test
              POSTGRES_PASSWORD: ""
        caches:
          vendor-bundle: vendor/bundle
          yarn-cache: ~/.cache/yarn
          node-modules: node_modules
          cache-cypress: ~/.cache/Cypress
      

      When I “services:” at line 20, i get the error.

      Can you please assist.

      Attachments

        Activity

          People

            Unassigned Unassigned
            ab05d2548b5a Gman
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: