Ejemplo n.º 1
0
def createBuildSteps():
    buildSteps = []
    buildSteps.extend(common.configureMdbciVmPathProperty())
    buildSteps.append(steps.SetProperties(properties=configureBuildProperties))
    buildSteps.extend(common.cloneRepository())
    buildSteps.append(steps.ShellCommand(
        name="Build MaxScale using MDBCI",
        command=['/bin/bash', '-c', 'BUILD/mdbci/build.sh || BUILD/mdbci/build.sh'],
        timeout=3600,
        workdir=util.Interpolate("%(prop:builddir)s/build")
    ))
    buildSteps.extend(common.destroyVirtualMachine())
    buildSteps.append(common.runSshCommand(
        name="Make dir for build results on the repo server",
        host=util.Property("upload_server"),
        command=["mkdir", "-p", util.Interpolate(constants.UPLOAD_PATH + '/%(prop:target)s')],
    ))
    buildSteps.append(common.rsyncViaSsh(
        name="Rsync builds results to the repo server",
        local=util.Interpolate("%(prop:builddir)s/repository/%(prop:target)s/mariadb-maxscale/"),
        remote=util.Interpolate("%(prop:upload_server)s:" + constants.UPLOAD_PATH + "/%(prop:target)s/")
    ))
    buildSteps.append(common.generateMdbciRepositoryForTarget())
    buildSteps.extend(common.syncRepod())
    buildSteps.append(steps.ShellCommand(
        name="Upgrade test",
        command=['BUILD/mdbci/upgrade_test.sh'],
        timeout=1800,
        doStepIf=(util.Property('run_upgrade_test') == 'yes'),
        workdir=util.Interpolate("%(prop:builddir)s/build")
    ))
    buildSteps.extend(common.cleanBuildDir())
    return buildSteps
Ejemplo n.º 2
0
def createBuildFactory():
    factory = util.BuildFactory()
    factory.addStep(steps.SetProperties(properties=configureBuildProperties))
    factory.addSteps(common.cloneRepository())
    factory.addStep(buildMdbci())
    factory.addStep(publishMdbci())
    factory.addSteps(common.cleanBuildDir())
    return factory
Ejemplo n.º 3
0
def createBuildSteps():
    buildSteps = []
    buildSteps.append(steps.SetProperties(properties=configureBuildProperties))
    buildSteps.extend(common.cloneRepository())
    buildSteps.extend(
        support.executePythonScript("Build MDBCI", remoteBuildMdbci))
    buildSteps.extend(publishMdbci())
    buildSteps.extend(common.cleanBuildDir())
    return buildSteps
Ejemplo n.º 4
0
def createBuildSteps():
    buildSteps = []
    buildSteps.extend(common.configureMdbciVmPathProperty())
    buildSteps.append(steps.SetProperties(properties=configureBuildProperties))
    buildSteps.extend(common.cloneRepository())
    buildSteps.extend(
        support.executePythonScript("Create full repo", remoteBuildMaxscale))
    buildSteps.extend(common.cleanBuildDir())
    buildSteps.extend(common.destroyVirtualMachine())
    return buildSteps
def createBuildSteps():
    buildSteps = []
    buildSteps.extend(common.configureMdbciVmPathProperty())
    buildSteps.append(steps.SetProperties(properties=configureBuildProperties))
    buildSteps.extend(common.cloneRepository())
    buildSteps.extend(
        common.downloadAndRunScript(
            name="Create full repo",
            scriptName="build_maxscale.py",
            args=["--repository", util.Property("ci_url")]))
    buildSteps.extend(common.cleanBuildDir())
    buildSteps.extend(common.destroyVirtualMachine())
    return buildSteps
Ejemplo n.º 6
0
def createRunTestSteps():
    testSteps = []
    testSteps.extend(common.configureMdbciVmPathProperty())
    testSteps.extend(common.cloneRepository())
    testSteps.append(steps.SetProperties(properties=configureCommonProperties))
    testSteps.extend(common.remoteRunScriptAndLog())
    testSteps.extend(common.parseCtestLog())
    testSteps.extend(common.findCoredump())
    testSteps.extend(common.writeBuildsResults())
    testSteps.extend(common.showTestResult(alwaysRun=True))
    testSteps.extend(common.destroyVirtualMachine())
    testSteps.extend(common.removeLock())
    testSteps.extend(common.cleanBuildDir())
    return testSteps
def createRunTestSnapshotSteps():
    testSnapshotSteps = []
    # run_test_snapshot.sh script does not take 'name' argument, but instead defines its own
    # which consists of environmental variables ${box}-${product}-${version}-permanent.
    # This step overwrites property 'name' which is set from scheduler to match 'name' in script
    testSnapshotSteps.append(
        steps.SetProperty(
            property="name",
            value=util.Interpolate(
                "%(prop:box)s-%(prop:product)s-%(prop:version)s-permanent")))
    testSnapshotSteps.extend(common.configureMdbciVmPathProperty())
    testSnapshotSteps.extend(common.cloneRepository())
    testSnapshotSteps.append(
        steps.SetProperties(properties=run_test.configureCommonProperties))
    testSnapshotSteps.extend(common.remoteRunScriptAndLog())
    testSnapshotSteps.extend(common.parseCtestLog())
    testSnapshotSteps.extend(common.findCoredump())
    testSnapshotSteps.extend(common.writeBuildsResults())
    testSnapshotSteps.extend(common.showTestResult(alwaysRun=True))
    testSnapshotSteps.extend(common.removeSnapshotLock())
    testSnapshotSteps.extend(common.removeLock())
    testSnapshotSteps.extend(common.cleanBuildDir())
    return testSnapshotSteps