コード例 #1
0
    def to_dict(self):
        task = super(MatrixTask, self).to_dict()
        commands = task['commands']
        commands.append(
            func('fetch build', BUILD_NAME=self.depends_on['name']))

        stapling = 'mustStaple'
        if self.test in ['test_3', 'test_4', 'soft_fail_test', 'cache']:
            stapling = 'disableStapling'
        if self.test in ['malicious_server_test_1', 'malicious_server_test_2']:
            stapling = 'mustStaple-disableStapling'

        orchestration_file = '%s-basic-tls-ocsp-%s' % (self.cert, stapling)
        orchestration = bootstrap(VERSION=self.version, TOPOLOGY='server', SSL='ssl', OCSP='on', ORCHESTRATION_FILE=orchestration_file)

        # The cache test expects a revoked response from an OCSP responder, exactly like TEST_4.
        test_column = 'TEST_4' if self.test == 'cache' else self.test.upper()

        commands.append(shell_mongoc(
            'TEST_COLUMN=%s CERT_TYPE=%s USE_DELEGATE=%s sh .evergreen/run-ocsp-responder.sh' % (
            test_column, self.cert, 'on' if self.delegate == 'delegate' else 'off')))
        commands.append(orchestration)
        if self.test == 'cache':
            commands.append(shell_mongoc('CERT_TYPE=%s .evergreen/run-ocsp-cache-test.sh' % self.cert))
        else:
            commands.append(shell_mongoc(
                'TEST_COLUMN=%s CERT_TYPE=%s sh .evergreen/run-ocsp-test.sh' % (self.test.upper(), self.cert)))

        return task
コード例 #2
0
    def to_dict(self):
        task = super(MatrixTask, self).to_dict()
        commands = task['commands']
        commands.append(func('fetch build',
                             BUILD_NAME=self.depends_on['name']))

        stapling = 'mustStaple'
        if self.test in ['test_3', 'test_4', 'soft_fail_test']:
            stapling = 'disableStapling'
        if self.test in ['malicious_server_test_1', 'malicious_server_test_2']:
            stapling = 'mustStaple-disableStapling'

        orchestration_file = '%s-basic-tls-ocsp-%s' % (self.cert, stapling)
        orchestration = bootstrap(TOPOLOGY='server',
                                  SSL='ssl',
                                  OCSP='on',
                                  ORCHESTRATION_FILE=orchestration_file)

        commands.append(
            shell_mongoc(
                'TEST_COLUMN=%s CERT_TYPE=%s USE_DELEGATE=%s sh .evergreen/run-ocsp-responder.sh'
                % (self.test.upper(), self.cert,
                   'on' if self.delegate == 'delegate' else 'off')))
        commands.append(orchestration)
        commands.append(
            shell_mongoc(
                'TEST_COLUMN=%s CERT_TYPE=%s sh .evergreen/run-ocsp-test.sh' %
                (self.test.upper(), self.cert)))

        return task
コード例 #3
0
ファイル: tasks.py プロジェクト: asd617140123/mongo-c-driver
    def __init__(self,
                 version,
                 patch,
                 cflags=None,
                 fips=False,
                 enable_ssl=False,
                 **kwargs):
        full_version = version + patch + ('-fips' if fips else '')
        script = ''
        if cflags:
            script += 'export CFLAGS=%s\n' % (cflags, )

        script += "DEBUG=ON CC='${CC}' MARCH='${MARCH}' SASL=OFF"
        if enable_ssl:
            script += " SSL=" + enable_ssl
        elif 'libressl' in version:
            script += " SSL=LIBRESSL"
        else:
            script += " SSL=OPENSSL"

        if fips:
            script += " OPENSSL_FIPS=1"

        script += " sh .evergreen/compile.sh"

        super(SSLTask, self).__init__(commands=[
            func('install ssl', SSL=full_version),
            shell_mongoc(script),
            func('run auth tests', **kwargs),
            func('upload build')
        ])

        self.version = version
        self.fips = fips
        self.enable_ssl = enable_ssl
コード例 #4
0
ファイル: tasks.py プロジェクト: jmikola/mongo-c-driver
    def __init__(self, version, patch, cflags=None, fips=False, **kwargs):
        full_version = version + patch + ('-fips' if fips else '')
        script = ''
        if cflags:
            script += 'export CFLAGS=%s\n' % (cflags,)

        script += "DEBUG=ON CC='${CC}' MARCH='${MARCH}' SASL=OFF"
        if 'libressl' in version:
            script += " SSL=LIBRESSL"
        else:
            script += " SSL=OPENSSL"

        if fips:
            script += " OPENSSL_FIPS=1"

        script += " sh .evergreen/compile.sh"

        super(SSLTask, self).__init__(commands=[
            func('install ssl', SSL=full_version),
            shell_mongoc(script),
            func('run auth tests', **kwargs),
            func('upload build')])

        self.version = version
        self.fips = fips
コード例 #5
0
ファイル: tasks.py プロジェクト: jmikola/mongo-c-driver
    def to_dict(self):
        task = super(CompileTask, self).to_dict()

        script = ''
        for opt, value in sorted(self.compile_sh_opt.items()):
            script += 'export %s="%s"\n' % (opt, value)

        script += "CC='${CC}' MARCH='${MARCH}' sh .evergreen/compile.sh"
        task['commands'].append(shell_mongoc(script))
        task['commands'].append(func('upload build'))
        task['commands'].extend(self.extra_commands)
        return task
コード例 #6
0
ファイル: tasks.py プロジェクト: sunnyszy/mongo-c-driver
    def to_dict(self):
        task = super(CompileTask, self).to_dict()

        script = ''
        for opt, value in sorted(self.compile_sh_opt.items()):
            script += 'export %s="%s"\n' % (opt, value)

        script += "CC='${CC}' MARCH='${MARCH}' sh .evergreen/compile.sh"
        task['commands'].append(shell_mongoc(script))
        task['commands'].append(func('upload build'))
        task['commands'].extend(self.extra_commands)
        return task
コード例 #7
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',
コード例 #8
0
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)-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),
     )),
コード例 #9
0
ファイル: tasks.py プロジェクト: asd617140123/mongo-c-driver
            bootstrap_commands = [bootstrap()]
        else:
            bootstrap_commands = []

        super(LinkTask,
              self).__init__(task_name=task_name,
                             depends_on=OD([('name', 'make-release-archive'),
                                            ('variant', 'releng')]),
                             commands=bootstrap_commands + suffix_commands,
                             **kwargs)


all_tasks = [
    NamedTask('check-headers',
              commands=[
                  shell_mongoc('sh ./.evergreen/check-public-decls.sh'),
                  shell_mongoc('python ./.evergreen/check-preludes.py .')
              ]),
    FuncTask('make-release-archive', 'release archive', 'upload docs',
             'upload man pages', 'upload release', 'upload build'),
    CompileTask(
        'hardened-compile',
        tags=['hardened'],
        compression=None,
        CFLAGS=
        '-fno-strict-overflow -D_FORTIFY_SOURCE=2 -fstack-protector-all -fPIE -O',
        LDFLAGS='-pie -Wl,-z,relro -Wl,-z,now'),
    FuncTask('abi-compliance-check', 'abi report'),
    CompileTask('debug-compile-compression-zlib',
                tags=['zlib', 'compression'],
                compression='zlib'),
コード例 #10
0
ファイル: tasks.py プロジェクト: gk017/mongo-c-driver
            bootstrap_commands = [bootstrap()]
        else:
            bootstrap_commands = []

        super(LinkTask,
              self).__init__(task_name=task_name,
                             depends_on=OD([('name', 'make-release-archive'),
                                            ('variant', 'releng')]),
                             commands=bootstrap_commands + extra_commands,
                             **kwargs)


all_tasks = [
    NamedTask('check-headers',
              commands=[
                  shell_mongoc('sh ./.evergreen/check-public-decls.sh'),
                  shell_mongoc('python ./.evergreen/check-preludes.py .')
              ]),
    FuncTask('make-release-archive', 'release archive', 'upload docs',
             'upload man pages', 'upload release', 'upload build'),
    CompileTask(
        'hardened-compile',
        tags=['hardened'],
        compression=None,
        CFLAGS=
        '-fno-strict-overflow -D_FORTIFY_SOURCE=2 -fstack-protector-all -fPIE -O',
        LDFLAGS='-pie -Wl,-z,relro -Wl,-z,now'),
    FuncTask('abi-compliance-check', 'abi report'),
    CompileTask('debug-compile-compression-zlib',
                tags=['zlib', 'compression'],
                compression='zlib'),
コード例 #11
0
ファイル: functions.py プロジェクト: jmikola/mongo-c-driver
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)-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',
コード例 #12
0
ファイル: tasks.py プロジェクト: jmikola/mongo-c-driver
        elif orchestration:
            bootstrap_commands = [bootstrap()]
        else:
            bootstrap_commands = []

        super(LinkTask, self).__init__(
            task_name=task_name,
            depends_on=OD([('name', 'make-release-archive'),
                           ('variant', 'releng')]),
            commands=bootstrap_commands + extra_commands,
            **kwargs)


all_tasks = [
    NamedTask('check-headers',
              commands=[shell_mongoc('sh ./.evergreen/check-public-decls.sh'), shell_mongoc('python ./.evergreen/check-preludes.py .')]),
    FuncTask('make-release-archive',
             'release archive', 'upload docs', 'upload man pages',
             'upload release', 'upload build'),
    CompileTask('hardened-compile',
                tags=['hardened'],
                compression=None,
                CFLAGS='-fno-strict-overflow -D_FORTIFY_SOURCE=2 -fstack-protector-all -fPIE -O',
                LDFLAGS='-pie -Wl,-z,relro -Wl,-z,now'),
    FuncTask('abi-compliance-check', 'abi report'),
    CompileTask('debug-compile-compression-zlib',
                tags=['zlib', 'compression'],
                compression='zlib'),
    CompileTask('debug-compile-compression-snappy',
                tags=['snappy', 'compression'],
                compression='snappy'),
コード例 #13
0
ファイル: tasks.py プロジェクト: sunnyszy/mongo-c-driver
            bootstrap_commands = [bootstrap()]
        else:
            bootstrap_commands = []

        super(LinkTask,
              self).__init__(task_name=task_name,
                             depends_on=OD([('name', 'make-release-archive'),
                                            ('variant', 'releng')]),
                             commands=bootstrap_commands + extra_commands,
                             **kwargs)


all_tasks = [
    NamedTask('check-headers',
              commands=[
                  shell_mongoc('sh ./.evergreen/check-public-decls.sh'),
                  shell_mongoc('python ./.evergreen/check-preludes.py .')
              ]),
    FuncTask('make-release-archive', 'release archive', 'upload docs',
             'upload man pages', 'upload release', 'upload build'),
    CompileTask(
        'hardened-compile',
        tags=['hardened'],
        compression=None,
        CFLAGS=
        '-fno-strict-overflow -D_FORTIFY_SOURCE=2 -fstack-protector-all -fPIE -O',
        LDFLAGS='-pie -Wl,-z,relro -Wl,-z,now'),
    FuncTask('abi-compliance-check', 'abi report'),
    CompileTask('debug-compile-compression-zlib',
                tags=['zlib', 'compression'],
                compression='zlib'),