Exemplo n.º 1
0
build_path = '${build_variant}/${revision}/${version_id}/${build_id}'

all_functions = OD([
    ('fetch source', Function(
        OD([('command', 'git.get_project'),
            ('params', OD([
                ('directory', 'mongoc'),
            ]))]),
        OD([('command', 'git.apply_patch'),
            ('params', OD([
                ('directory', 'mongoc'),
            ]))]),
        shell_mongoc(r'''
        if [ "${is_patch}" = "true" ]; then
           VERSION=$(git describe --abbrev=7 --match='1.*')-patch-${version_id}
        else
           VERSION=latest
        fi
        echo "CURRENT_VERSION: $VERSION" > expansion.yml
        ''', test=False),
        OD([('command', 'expansions.update'),
            ('params', OD([
                ('file', 'mongoc/expansion.yml'),
            ]))]),
        shell_exec(r'''
        rm -f *.tar.gz
        curl --retry 5 https://s3.amazonaws.com/mciuploads/${project}/${branch_name}/mongo-c-driver-${CURRENT_VERSION}.tar.gz --output mongoc.tar.gz -sS --max-time 120
        ''', test=False, continue_on_err=True),
    )),
    ('upload release', Function(
        shell_exec(
            r'[ -f mongoc/cmake_build/mongo*gz ] && mv mongoc/cmake_build/mongo*gz mongoc.tar.gz',
Exemplo n.º 2
0
 ('fetch source',
  Function(
      OD([('command', 'git.get_project'),
          ('params', OD([
              ('directory', 'mongoc'),
          ]))]),
      OD([('command', 'git.apply_patch'),
          ('params', OD([
              ('directory', 'mongoc'),
          ]))]),
      shell_mongoc(r'''
     if [ "${is_patch}" = "true" ]; then
        VERSION=$(git describe --abbrev=7)-patch-${version_id}
     else
        VERSION=latest
     fi
     echo "CURRENT_VERSION: $VERSION" > expansion.yml
     ''',
                   test=False),
      OD([('command', 'expansions.update'),
          ('params', OD([
              ('file', 'mongoc/expansion.yml'),
          ]))]),
      shell_exec(r'''
     rm -f *.tar.gz
     curl --retry 5 https://s3.amazonaws.com/mciuploads/${project}/${branch_name}/mongo-c-driver-${CURRENT_VERSION}.tar.gz --output mongoc.tar.gz -sS --max-time 120
     ''',
                 test=False,
                 continue_on_err=True),
  )),
 ('upload release',