<commit_before>## ======================================================================
## resources
## ======================================================================

resource_types:
  - name: pull_request_with_submodule
    type: docker-image
    source:
      repository: jtarchie/pr
      tag: 'v20'

resources:
  - name: gpdb_pr
    type: pull_request_with_submodule
    source:
      repo: greenplum-db/gpdb
      access_token: {{gpdb-git-access-token}}
      private_key: {{gpdb-git-key}}

  - name: centos-gpdb-dev-6
    type: docker-image
    source:
      repository: pivotaldata/centos-gpdb-dev
      tag: '6-gcc6.2-llvm3.7'
      username: {{docker_username}}
      password: <PASSWORD>}}

  - name: installer_rhel6_gpdb_rc
    type: s3
    source:
      access_key_id: {{bucket-access-key-id}}
      bucket: {{bucket-name}}
      region_name: {{aws-region}}
      secret_access_key: {{bucket-secret-access-key}}
      versioned_file: gpdb_pr/deliverables/greenplum-db-(.*)-build-1-rhel6-x86_64.zip

  - name: installer_rhel6_gpdb_rc_md5
    type: s3
    source:
      access_key_id: {{bucket-access-key-id}}
      bucket: {{bucket-name}}
      region_name: {{aws-region}}
      secret_access_key: {{bucket-secret-access-key}}
      versioned_file: gpdb_pr/deliverables/greenplum-db-(.*)-build-1-rhel6-x86_64.zip.md5

  - name: qautils_rhel6_tarball
    type: s3
    source:
      access_key_id: {{bucket-access-key-id}}
      bucket: {{bucket-name}}
      region_name: {{aws-region}}
      secret_access_key: {{bucket-secret-access-key}}
      versioned_file: gpdb_pr/deliverables/QAUtils-rhel6-x86_64.tar.gz

  - name: gpaddon_src
    type: git
    source:
      branch: {{gpaddon-git-branch}}
      private_key: {{gpdb-git-key}}
      uri: {{gpaddon-git-remote}}

  - name: bin_gpdb_centos
    type: s3
    source:
      access_key_id: {{bucket-access-key-id}}
      bucket: {{bucket-name}}
      region_name: {{aws-region}}
      secret_access_key: {{bucket-secret-access-key}}
      versioned_file: gpdb_pr/gpdb_artifacts/bin_gpdb.tar.gz

jobs:
  - name: compile_gpdb_open_source_centos6
    public: true
    max_in_flight: 1
    plan:
    - aggregate:
      - get: gpdb_pr
        trigger: true
        version: every
      - get: centos-gpdb-dev-6
    - task: compile_gpdb
      file: gpdb_pr/concourse/tasks/compile_gpdb_open_source.yml
      image: centos-gpdb-dev-6
      input_mapping:
        gpdb_src: gpdb_pr
      on_failure:
        put: gpdb_pr
        params:
          path: gpdb_pr
          status: failure

  - name: compile_gpdb_centos6
    max_in_flight: 1
    plan:
    - aggregate:
      - get: gpdb_pr
        trigger: true
        version: every
      - get: gpaddon_src
      - get: centos-gpdb-dev-6
    - put: gpdb_pr
      params:
        path: gpdb_pr
        status: pending
    - task: compile_gpdb
      file: gpdb_pr/concourse/tasks/compile_gpdb.yml
      image: centos-gpdb-dev-6
      input_mapping:
        gpdb_src: gpdb_pr
      params:
        IVYREPO_HOST: {{ivyrepo_host}}
        IVYREPO_REALM: {{ivyrepo_realm}}
        IVYREPO_USER: {{ivyrepo_user}}
        IVYREPO_PASSWD: {{ivyrepo_passwd}}
        TARGET_OS: centos
        TARGET_OS_VERSION: 6
        BLD_TARGETS: ""
      on_failure:
        put: gpdb_pr
        params:
          path: gpdb_pr
          status: failure
    - aggregate:
      - put: bin_gpdb_centos
        params:
          file: gpdb_artifacts/bin_gpdb.tar.gz

  # Stage 2: Run tests
  - name: icw_planner_centos6
    plan:
    - aggregate:
      - get: gpdb_pr
        passed:
        - compile_gpdb_centos6
        - compile_gpdb_open_source_centos6
      - get: bin_gpdb
        resource: bin_gpdb_centos
        passed: [compile_gpdb_centos6]
        version: every
        trigger: true
      - get: centos-gpdb-dev-6
    - task: ic_gpdb
      file: gpdb_pr/concourse/tasks/ic_gpdb.yml
      image: centos-gpdb-dev-6
      input_mapping:
        gpdb_src: gpdb_pr
      params:
        MAKE_TEST_COMMAND: PGOPTIONS='-c optimizer=off -c codegen=off' installcheck-world
        BLDWRAP_POSTGRES_CONF_ADDONS: "fsync=off"
        TEST_OS: centos
      timeout: 2h30m
      on_failure:
        put: gpdb_pr
        params:
          path: gpdb_pr
          status: failure

  - name: icw_gporca_codegen_centos6
    plan:
    - aggregate:
      - get: gpdb_pr
        passed:
        - compile_gpdb_centos6
        - compile_gpdb_open_source_centos6
      - get: bin_gpdb
        resource: bin_gpdb_centos
        passed: [compile_gpdb_centos6]
        version: every
        trigger: true
      - get: centos-gpdb-dev-6
    - task: ic_gpdb
      file: gpdb_pr/concourse/tasks/ic_gpdb.yml
      image: centos-gpdb-dev-6
      input_mapping:
        gpdb_src: gpdb_pr
      params:
        MAKE_TEST_COMMAND: PGOPTIONS='-c optimizer=on -c codegen=on' installcheck-world
        BLDWRAP_POSTGRES_CONF_ADDONS: "fsync=off"
        TEST_OS: centos
      timeout: 2h30m
      on_failure:
        put: gpdb_pr
        params:
          path: gpdb_pr
          status: failure

  - name: MU_check_centos
    plan:
    - aggregate:
      - get: gpdb_pr
        passed:
        - compile_gpdb_centos6
        - compile_gpdb_open_source_centos6
      - get: bin_gpdb
        resource: bin_gpdb_centos
        passed: [compile_gpdb_centos6]
        version: every
        trigger: true
      - get: centos-gpdb-dev-6
    - task: MU_check_centos
      file: gpdb_pr/concourse/tasks/gpMgmt_check_gpdb.yml
      image: centos-gpdb-dev-6
      input_mapping:
        gpdb_src: gpdb_pr
      params:
        TEST_OS: centos
      on_failure:
        put: gpdb_pr
        params:
          path: gpdb_pr
          status: failure

  - name: report_pr_success
    plan:
    - aggregate:
      - get: gpdb_pr
        passed:
        - icw_planner_centos6
        - icw_gporca_codegen_centos6
        - MU_check_centos
        trigger: true
    - put: gpdb_pr
      params:
        path: gpdb_pr
        status: success

  # Stage 3: Packaging
  - name: gpdb_rc_packaging_centos
    plan:
    - aggregate:
      - get: gpdb_pr
        passed:
        - icw_planner_centos6
        - MU_check_centos
      - get: bin_gpdb
        resource: bin_gpdb_centos
        passed:
        - icw_planner_centos6
        - MU_check_centos
        trigger: true
      - get: centos-gpdb-dev-6
      - get: gpaddon_src
    - task: separate_qautils_files_for_rc
      file: gpdb_pr/concourse/tasks/separate_qautils_files_for_rc.yml
      image: centos-gpdb-dev-6
      input_mapping:
        gpdb_src: gpdb_pr
      params:
        QAUTILS_TARBALL: rc_bin_gpdb/QAUtils-rhel6-x86_64.tar.gz
    - task: gpdb_rc_packaging_centos
      file: gpdb_pr/concourse/tasks/gpdb_packaging.yml
      image: centos-gpdb-dev-6
      input_mapping:
        bin_gpdb: rc_bin_gpdb
        gpdb_src: gpdb_pr
      output_mapping:
        packaged_gpdb: packaged_gpdb_rc
      params:
        INSTALL_SCRIPT_SRC: gpdb_src/gpAux/addon/license/installer-header-rhel-gpdb.sh
        INSTALLER_ZIP: packaged_gpdb/greenplum-db-@GP_VERSION@-build-1-rhel6-x86_64.zip
        ADD_README_INSTALL: true
    - aggregate:
      - put: installer_rhel6_gpdb_rc
        params:
          file: packaged_gpdb_rc/greenplum-db-*-build-1-rhel6-x86_64.zip
      - put: installer_rhel6_gpdb_rc_md5
        params:
          file: packaged_gpdb_rc/greenplum-db-*-build-1-rhel6-x86_64.zip.md5
      - put: qautils_rhel6_tarball
        params:
          file: rc_bin_gpdb/QAUtils-rhel6-x86_64.tar.gz<commit_msg>Add timeout for PR pipeline for each job<commit_after>## ======================================================================
## resources
## ======================================================================

resource_types:
  - name: pull_request_with_submodule
    type: docker-image
    source:
      repository: jtarchie/pr
      tag: 'v20'

resources:
  - name: gpdb_pr
    type: pull_request_with_submodule
    source:
      repo: greenplum-db/gpdb
      access_token: {{gpdb-git-access-token}}
      private_key: {{gpdb-git-key}}

  - name: centos-gpdb-dev-6
    type: docker-image
    source:
      repository: pivotaldata/centos-gpdb-dev
      tag: '6-gcc6.2-llvm3.7'
      username: {{docker_username}}
      password: {{<PASSWORD>}}

  - name: installer_rhel6_gpdb_rc
    type: s3
    source:
      access_key_id: {{bucket-access-key-id}}
      bucket: {{bucket-name}}
      region_name: {{aws-region}}
      secret_access_key: {{bucket-secret-access-key}}
      versioned_file: gpdb_pr/deliverables/greenplum-db-(.*)-build-1-rhel6-x86_64.zip

  - name: installer_rhel6_gpdb_rc_md5
    type: s3
    source:
      access_key_id: {{bucket-access-key-id}}
      bucket: {{bucket-name}}
      region_name: {{aws-region}}
      secret_access_key: {{bucket-secret-access-key}}
      versioned_file: gpdb_pr/deliverables/greenplum-db-(.*)-build-1-rhel6-x86_64.zip.md5

  - name: qautils_rhel6_tarball
    type: s3
    source:
      access_key_id: {{bucket-access-key-id}}
      bucket: {{bucket-name}}
      region_name: {{aws-region}}
      secret_access_key: {{bucket-secret-access-key}}
      versioned_file: gpdb_pr/deliverables/QAUtils-rhel6-x86_64.tar.gz

  - name: gpaddon_src
    type: git
    source:
      branch: {{gpaddon-git-branch}}
      private_key: {{gpdb-git-key}}
      uri: {{gpaddon-git-remote}}

  - name: bin_gpdb_centos
    type: s3
    source:
      access_key_id: {{bucket-access-key-id}}
      bucket: {{bucket-name}}
      region_name: {{aws-region}}
      secret_access_key: {{bucket-secret-access-key}}
      versioned_file: gpdb_pr/gpdb_artifacts/bin_gpdb.tar.gz

jobs:
  - name: compile_gpdb_open_source_centos6
    public: true
    max_in_flight: 1
    plan:
    - aggregate:
      - get: gpdb_pr
        trigger: true
        version: every
      - get: centos-gpdb-dev-6
    - task: compile_gpdb
      file: gpdb_pr/concourse/tasks/compile_gpdb_open_source.yml
      image: centos-gpdb-dev-6
      input_mapping:
        gpdb_src: gpdb_pr
      on_failure:
        put: gpdb_pr
        params:
          path: gpdb_pr
          status: failure
      timeout: 30m

  - name: compile_gpdb_centos6
    max_in_flight: 1
    plan:
    - aggregate:
      - get: gpdb_pr
        trigger: true
        version: every
      - get: gpaddon_src
      - get: centos-gpdb-dev-6
    - put: gpdb_pr
      params:
        path: gpdb_pr
        status: pending
    - task: compile_gpdb
      file: gpdb_pr/concourse/tasks/compile_gpdb.yml
      image: centos-gpdb-dev-6
      input_mapping:
        gpdb_src: gpdb_pr
      params:
        IVYREPO_HOST: {{ivyrepo_host}}
        IVYREPO_REALM: {{ivyrepo_realm}}
        IVYREPO_USER: {{ivyrepo_user}}
        IVYREPO_PASSWD: {{<PASSWORD>}}
        TARGET_OS: centos
        TARGET_OS_VERSION: 6
        BLD_TARGETS: ""
      on_failure:
        put: gpdb_pr
        params:
          path: gpdb_pr
          status: failure
      timeout: 45m
    - aggregate:
      - put: bin_gpdb_centos
        params:
          file: gpdb_artifacts/bin_gpdb.tar.gz

  # Stage 2: Run tests
  - name: icw_planner_centos6
    plan:
    - aggregate:
      - get: gpdb_pr
        passed:
        - compile_gpdb_centos6
        - compile_gpdb_open_source_centos6
      - get: bin_gpdb
        resource: bin_gpdb_centos
        passed: [compile_gpdb_centos6]
        version: every
        trigger: true
      - get: centos-gpdb-dev-6
    - task: ic_gpdb
      file: gpdb_pr/concourse/tasks/ic_gpdb.yml
      image: centos-gpdb-dev-6
      input_mapping:
        gpdb_src: gpdb_pr
      params:
        MAKE_TEST_COMMAND: PGOPTIONS='-c optimizer=off -c codegen=off' installcheck-world
        BLDWRAP_POSTGRES_CONF_ADDONS: "fsync=off"
        TEST_OS: centos
      timeout: 1h
      on_failure:
        put: gpdb_pr
        params:
          path: gpdb_pr
          status: failure

  - name: icw_gporca_codegen_centos6
    plan:
    - aggregate:
      - get: gpdb_pr
        passed:
        - compile_gpdb_centos6
        - compile_gpdb_open_source_centos6
      - get: bin_gpdb
        resource: bin_gpdb_centos
        passed: [compile_gpdb_centos6]
        version: every
        trigger: true
      - get: centos-gpdb-dev-6
    - task: ic_gpdb
      file: gpdb_pr/concourse/tasks/ic_gpdb.yml
      image: centos-gpdb-dev-6
      input_mapping:
        gpdb_src: gpdb_pr
      params:
        MAKE_TEST_COMMAND: PGOPTIONS='-c optimizer=on -c codegen=on' installcheck-world
        BLDWRAP_POSTGRES_CONF_ADDONS: "fsync=off"
        TEST_OS: centos
      timeout: 1h30m
      on_failure:
        put: gpdb_pr
        params:
          path: gpdb_pr
          status: failure

  - name: MU_check_centos
    plan:
    - aggregate:
      - get: gpdb_pr
        passed:
        - compile_gpdb_centos6
        - compile_gpdb_open_source_centos6
      - get: bin_gpdb
        resource: bin_gpdb_centos
        passed: [compile_gpdb_centos6]
        version: every
        trigger: true
      - get: centos-gpdb-dev-6
    - task: MU_check_centos
      file: gpdb_pr/concourse/tasks/gpMgmt_check_gpdb.yml
      image: centos-gpdb-dev-6
      input_mapping:
        gpdb_src: gpdb_pr
      params:
        TEST_OS: centos
      on_failure:
        put: gpdb_pr
        params:
          path: gpdb_pr
          status: failure
      timeout: 10m

  - name: report_pr_success
    plan:
    - aggregate:
      - get: gpdb_pr
        passed:
        - icw_planner_centos6
        - icw_gporca_codegen_centos6
        - MU_check_centos
        trigger: true
    - put: gpdb_pr
      params:
        path: gpdb_pr
        status: success

  # Stage 3: Packaging
  - name: gpdb_rc_packaging_centos
    plan:
    - aggregate:
      - get: gpdb_pr
        passed:
        - icw_planner_centos6
        - MU_check_centos
      - get: bin_gpdb
        resource: bin_gpdb_centos
        passed:
        - icw_planner_centos6
        - MU_check_centos
        trigger: true
      - get: centos-gpdb-dev-6
      - get: gpaddon_src
    - task: separate_qautils_files_for_rc
      file: gpdb_pr/concourse/tasks/separate_qautils_files_for_rc.yml
      image: centos-gpdb-dev-6
      input_mapping:
        gpdb_src: gpdb_pr
      params:
        QAUTILS_TARBALL: rc_bin_gpdb/QAUtils-rhel6-x86_64.tar.gz
    - task: gpdb_rc_packaging_centos
      file: gpdb_pr/concourse/tasks/gpdb_packaging.yml
      image: centos-gpdb-dev-6
      input_mapping:
        bin_gpdb: rc_bin_gpdb
        gpdb_src: gpdb_pr
      output_mapping:
        packaged_gpdb: packaged_gpdb_rc
      params:
        INSTALL_SCRIPT_SRC: gpdb_src/gpAux/addon/license/installer-header-rhel-gpdb.sh
        INSTALLER_ZIP: packaged_gpdb/greenplum-db-@GP_VERSION@-build-1-rhel6-x86_64.zip
        ADD_README_INSTALL: true
      timeout: 15m
    - aggregate:
      - put: installer_rhel6_gpdb_rc
        params:
          file: packaged_gpdb_rc/greenplum-db-*-build-1-rhel6-x86_64.zip
      - put: installer_rhel6_gpdb_rc_md5
        params:
          file: packaged_gpdb_rc/greenplum-db-*-build-1-rhel6-x86_64.zip.md5
      - put: qautils_rhel6_tarball
        params:
          file: rc_bin_gpdb/QAUtils-rhel6-x86_64.tar.gz
{'fraction_non_alphanumeric': 0.10798679867986799, 'fraction_numerical': 0.014653465346534653, 'mean_word_length': 2.1630480167014614, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5918543', 'n_tokens_mistral': 5762, 'n_tokens_neox': 5466, 'n_words': 898}