version: '1.0'
steps:
  BuildDockerImage:
    title: Building Docker Image
    type: build
    image_name: iris
    dockerfile: Dockerfile
  RunUnitTests:
    title: Running Unit Tests
    image: ${{BuildDockerImage}}
    working_directory: /home/app
    commands:
      - npm start validate
      - npm start report-coverage
    on_success:
      metadata:
        set:
          - '${{BuildDockerImage.imageId}}':
              - CF_QUALITY: true
    on_fail:
      metadata:
        set:
          - '${{BuildDockerImage.imageId}}':
              - CF_QUALITY: false
  RunIntegrationTests:
    type: composition
    title: Running Integration Tests
    description: Running integration tests with kafka
    composition: docker-compose.ci-integration.yml
    composition_candidates:
      integration_tests:
        image: ${{BuildDockerImage}}
        command: npm start test.integrationCi && npm start report-coverage
    on_success:
      metadata:
        set:
          - '${{BuildDockerImage.imageId}}':
              - CF_QUALITY: true
    on_fail:
      metadata:
        set:
          - '${{BuildDockerImage.imageId}}':
              - CF_QUALITY: false
  PublishModule:
    title: Publishing my module
    image: ${{BuildDockerImage}}
    working_directory: /home/app
    when:
      branch:
        only: [ master ]
    commands:
      - npm start build
      - npm start release


version: '1.0'
steps:
  BuildDockerImage:
    title: Building Docker Image
    type: build
    image_name: iris
    dockerfile: Dockerfile
  RunUnitTests:
    title: Running Unit Tests
    image: ${{BuildDockerImage}}
    working_directory: /home/app
    commands:
      - npm start validate
      - npm start report-coverage
    on_success:
      metadata:
        set:
          - '${{BuildDockerImage.imageId}}':
              - CF_QUALITY: true
    on_fail:
      metadata:
        set:
          - '${{BuildDockerImage.imageId}}':
              - CF_QUALITY: false
  RunIntegrationTests:
    type: composition
    title: Running Integration Tests
    description: Running integration tests with kafka
    composition: docker-compose.ci-integration.yml
    composition_candidates:
      integration_tests:
        image: ${{BuildDockerImage}}
        working_directory: /home/app
        command: npm start test.integrationCi && npm start report-coverage
    on_success:
      metadata:
        set:
          - '${{BuildDockerImage.imageId}}':
              - CF_QUALITY: true
    on_fail:
      metadata:
        set:
          - '${{BuildDockerImage.imageId}}':
              - CF_QUALITY: false
  PublishModule:
    title: Publishing my module
    image: ${{BuildDockerImage}}
    working_directory: /home/app
    when:
      branch:
        only: [ master ]
    commands:
      - npm start build
      - npm start release


Update cf file to have a working directory
ci(CF): Update cf file to have a working directory

integration image should have a working_directory
