Example #1
0
def test_deploy_archive3(datafiles):
    """Test deploy_archives() command when archives dir is a file instead of a dir."""
    os.chdir(str(datafiles))
    workspace_dir = os.path.join(str(datafiles), 'workspace-archivesfile')

    with pytest.raises(OSError) as excinfo:
         deploy_sys.copy_archives(workspace_dir)
    assert workspace_dir in str(excinfo.value)
Example #2
0
def copy_archives(ctx, workspace, pattern):
    """Copy files for archiving.

    Arguments:

        workspace: Typically a Jenkins WORKSPACE to copy files from.
        pattern: Space-separated list of Unix style glob patterns of files to
            copy for archiving. (default: false)
    """
    deploy_sys.copy_archives(workspace, pattern)
Example #3
0
def test_deploy_archive4(cli_runner, datafiles, responses):
    """Test deploy_archives() command when using duplicated patterns."""
    os.chdir(str(datafiles))
    workspace_dir = os.path.join(str(datafiles), 'workspace-patternfile')
    pattern=["**/*.log", "**/hs_err_*.log", "**/target/**/feature.xml", "**/target/failsafe-reports/failsafe-summary.xml", "**/target/surefire-reports/*-output.txt", "**/target/surefire-reports/*-output.txt", "**/target/failsafe-reports/failsafe-summary.xml"]
    result = deploy_sys.copy_archives(workspace_dir, pattern)
    assert result is None