开源 企业版 高校版 私有云 模力方舟 AI 队友
代码拉取完成,页面将自动刷新
加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
已有帐号? 立即登录
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
项目仓库所选许可证以仓库主分支所使用许可证为准
master
分支 (1)
标签 (71)
master
795.ve8e151429b_27
770.va_6c69e063442
765.v0357cc6e6eb_3
763.v66351b_9c297f
761.vea_2b_25523e84
757.v05365583a_455
749.vfb_dca_a_9b_6549
746.vd2a_674fb_4f6f
722.v0662a_9b_e22a_c
714.v28a_34f8c563f
705.v5295cffec284
702.va_c09cb_6e51cf
698.v393f578eb_ddc
697.v12c6e8c8fb_34
686.v6fd37018d7c2
684.vde867d759462
681.va_a_298c7f9c01
680.vb_9a_ceb_a_d7c98
copyartifact-1.48
copyartifact-1.47
克隆/下载
克隆/下载
提示
下载代码请复制以下命令到终端执行
为确保你提交的代码身份被 Gitee 正确识别,请执行以下命令完成配置
初次使用 SSH 协议进行代码克隆、推送等操作时,需按下述提示完成 SSH 配置
1 生成 RSA 密钥
2 获取 RSA 公钥内容,并配置到 SSH公钥
在 Gitee 上使用 SVN,请访问 使用指南
使用 HTTPS 协议时,命令行会出现如下账号密码验证步骤。基于安全考虑,Gitee 建议 配置并使用私人令牌 替代登录密码进行克隆、推送等操作
Username for 'https://gitee.com': userName
Password for 'https://userName@gitee.com': # 私人令牌
贡献代码
同步代码
对比差异 通过 Pull Request 同步
同步更新到分支
通过 Pull Request 同步
将会在向当前分支创建一个 Pull
Request,合入后将完成同步
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

Copy Artifact plugin

Adds a build step to copy artifacts from another project.

The plugin lets you specify which build to copy artifacts from (e.g. the last successful/stable build, by build number, or by a build parameter). You can also control the copying process by filtering the files being copied, specifying a destination directory within the target project, etc. Click the help icon on each field to learn the details, such as selecting Maven or multiconfiguration projects or using build parameters. You can also copy from the workspace of the latest completed build of the source project, instead of its artifacts. All artifacts copied are automatically Pipeline syntax

  • To copy artifacts from the latest stable build of "sourceproject"

    copyArtifacts(projectName: 'sourceproject');
  • To copy artifacts from the specific build of "downstream"

    def built = build('downstream'); // https://plugins.jenkins.io/pipeline-build-step
    copyArtifacts(projectName: 'downstream', selector: specific("${built.number}"));
  • Parameters of copyArtifacts

    parameter type description

    projectName

    string

    the name of project (required)

    selector

    BuildSelector

    the selector to select the build to copy from. If not specified, latest stable build is used.

    parameters

    string

    comma-separated name and value pairs (name1=value1,name2=value2) to filter the build to copy from.

    filter

    string

    ant-expression to filter artifacts to copy

    excludes

    string

    ant-expression to exclude artifacts to copy

    target

    string

    target directory to copy to

    flatten

    boolean

    ignore directory structures of artifacts

    optional

    boolean

    do not fail the step even if no appropriate build is found.

    fingerprintArtifacts

    boolean

    fingerprint artifacts to track builds using those artifacts. false for default if the parameter isn’t specified (Snippet Generator defaults this to true and specifies the parameter).

    resultVariableSuffix

    boolean

    useless for pipelines

    includeBuildNumberInTargetPath

    boolean

    Include source build number in target path.

  • selectors

    name feature

    lastSuccessful

    Latest successful build

    specific

    Specific build

    permalink

    Specified by permalink

    lastCompleted

    completed build (ignoring build status)

    latestSavedBuild

    Latest saved build (marked "keep forever")

    buildParameter

    Specified by a build parameter

    upstream

    Upstream build that triggered this job

Configuration Notes

  • When using this plugin with a Windows agent node that is configured as a Windows service, the service should have permission to interact with desktop (select "Allow service to interact with desktop" from Jenkins Agent service properties). Otherwise you may see errors similar to this:

    ERROR: Failed to copy artifacts from ...
    hudson.util.IOException2: java.lang.IllegalAccessError: class hudson.remoting.Pipe$ConnectCommand cannot
     access its superclass hudson.remoting.Command
    at hudson.FilePath.copyRecursiveTo(FilePath.java:1526)
    at hudson.FilePath.copyRecursiveTo(FilePath.java:1451)
    at hudson.plugins.copyartifact.FilePathCopyMethod.copyAll(FilePathCopyMethod.java:51)
    ...

Recommended usage of copy artifact

  • Artifacts should be stored as archived files.

    • Copyartifact tries to copy artifacts preserving file attributes like permissions and symbolic links. Though, it may fail in some situations (like for security issues).

    • It’s highly recommended to pack files to copy into an archive file, using tar command or Permissions to copy artifact

      Note
      Since version 1.44, Copy Artifact checks permissions more thoroughly in its default Production mode. If you have permission issues when upgrading from copyartifact 1.43.1 or earlier you can use Migration Mode. You should convert to Production mode as soon as possible.

      When you face a following message and fail to copy artifacts, this may be caused by permission to the job with artifacts. Please read this section once.

      Unable to find project for artifact copy: YOUR_PROJECT_WITH_ARTIFACTS
      This may be due to incorrect project name or permission settings; see help for project name in job configuration.
      Build step 'Copy artifacts from another project' marked build as failure

      You can configure to allow Copy Artifact to access source jobs in the following ways.

      The message will not be encountered if the "Authenticated" user group has the "job/read" permission enabled. If this issue appears on your controller, check if this configuration has recently changed.

      Specify projects who can copy artifacts

      • In the job configuration pages, you can specify jobs to allow copy artifacts from that project:
        image

      • Use copyArtifactPermission in pipelines:

        • Declarative pipeline:

          pipeline {
           agent any;
           options {
           copyArtifactPermission('job1,job2,...');
           }
           stages{...}
          }
        • Scripted pipeline

          properties([
           copyArtifactPermission('job1,job2,...'),
          ]);
          node {
           ...
          }
      • You can specify multiple jobs separated by commas.

      • You can use wildcard character ('*') to specify name patterns.

      Authorize builds as a user

      • Migration Mode

        Migration mode is available and automatically enabled for users upgrading Copy Artifact from 1.43.1 or earlier.

        Migration mode performs permission checks when configuring jobs or when running builds if the name of the source job is configured with variables. This is the behavior compatible to Copy Artifact 1.43.1 or earlier.

        This may cause security vulnerabilities allowing malicious users to bypass permission checks. This mode is provided only to allow users to upgrade job configurations and migrate to Production mode easily. You should migrate to Production mode as soon as you can.

        Build executions that would fail in Production mode are recorded and displayed as warnings to administrators.

        migration mode warnings

        Administrators should check those warnings and update the job configurations to successfully use Production mode.

        Migration helper

      Use with declarative pipelines

      One example:

      stages {
       stage('Copy Archive') {
       steps {
       script {
       step ([$class: 'CopyArtifact',
       projectName: 'Create_archive',
       filter: "packages/infra*.zip",
       target: 'Infra']);
       }
       }
       }
      ...
      }

      What that is doing:

      • Go to the project/workspace named "Create_archive".

      • Look in the folder "packages" for the file(s) "infra*.zip".

      • Copy that file(s) into the folder "Infra", in the local workspace. Folder will be created if it doesn’t already exist.

      Reporting Issues

      Report issues in the "How to Report an Issue" guidelines when reporting issues.

      • Release History

        Changelogs for current releases are recorded in legacy changelog.

举报
举报成功
我们将于2个工作日内通过站内信反馈结果给你!
请认真填写举报原因,尽可能描述详细。
请选择举报类型
取消
发送
误判申诉

此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。

如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。

取消
提交

简介

https://github.com/mamh-java/copyartifact-plugin
取消

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
编辑仓库简介
简介内容
主页
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mamh-java/copyartifact-plugin.git
git@gitee.com:mamh-java/copyartifact-plugin.git
mamh-java
copyartifact-plugin
copyartifact-plugin
master
登录提示
该操作需登录 Gitee 帐号,请先登录后再操作。
立即登录
没有帐号,去注册

AltStyle によって変換されたページ (->オリジナル) /