Job-Specification

---
key: meta
name: Meta
context:
  tasks:
    git-branch-current:
      key: git-branch-current
      name: git tree contains latest commit from origin/master
      traits: {}
      scripts:
        main:
          body: |
            #!/usr/bin/env bash
            set -exu
            git fetch --all
            #
            # check if your tree still contains the current commit from master
            git rev-list --children HEAD | grep -q "$(git rev-parse origin/master)"
    database-submodule-consistency:
      key: database-submodule-consistency
      name: database and legacy/database point to the same commit
      traits: {}
      scripts:
        main:
          body: |
            #!/usr/bin/env bash
            set -exu
            git fetch --all
            git submodule update --init --recursive
            sha1=$(git submodule status database | cut -f 2 -d ' ')
            sha2=$(git submodule status --recursive | grep legacy/database | cut -f 2 -d ' ')
            test $sha1 == $sha2
  task_defaults:
    traits:
      Ruby: true
    max_trials: 1
run_when:
  always:
    type: branch
    exclude_match: "^.*no-ci.*$"
    include_match: "^.*$"
description: 'Various superordinate quality assurance tasks

  '