UiPath Documentation
cicd-integrations
2025.10
true
CI/CD 集成用户指南
重要 :
请注意,此内容已使用机器翻译进行了部分本地化。 新发布内容的本地化可能需要 1-2 周的时间才能完成。

UiPath 解决方案包

通过 Jenkins 将 UiPath 解决方案存档打包为可部署包的“UiPath 解决方案包”步骤。

应用程序:解决方案

类型:构建任务

UiPath 解决方案:打包在标准作业和管道中可用,可用于将现有的 UiPath 解决方案打包为 zip 存档。

备注:

目前只有 Automation Cloud 支持解决方案。计划在未来版本中提供对 Automation Suite 的支持。本地部署 (MSI) Orchestrator 不支持解决方案。

备注:

此任务仅与版本 25.10 或更高版本的UiPath.CLI.Windows或UiPath.CLI.Linux兼容。

配置​

作业参数

描述

版本

指定解决方案包版本可更高效追踪已生成的包及其源版本控制。例如,可利用 Microsoft 程序集模式生成 NuGet 包版本:[Major].[Minor].[BuildNumber].[RevisionNumber]。

工作区路径

解决方案的本地路径。它可以是 Solution.uipx 文件的直接路径或解决方案目录。

输出路径

文件路径,已创建的包应出现在此。

禁用内置 NuGet 订阅源

禁用内置 NuGet 订阅源。默认值为 false

运行工作流分析

在打包前运行工作流分析,通过预定义规则检查项目是否存在违规行为。出现错误时使作业失败。默认值为 false

监管文件路径

传递包含工作流分析器规则的监管策略。可以从 Automation Ops 下载策略,也可以从 Studio 导出的压缩 ZIP 文件中提取策略。请参阅文档以了解详细信息。

源代码版本信息和 Automation Hub 概念 URL

启用包元数据,包括源代码版本信息和 Automation Hub 概念 URL。默认值为 false

远程存储库中 project.json 的完整路径远程存储库中 project.json 的完整路径。仅在启用包元数据时可见。
提交 ID用于源代码跟踪的提交 ID。仅在启用包元数据时可见。
存储库分支用于源代码跟踪的存储库分支。仅在启用包元数据时可见。
存储库的类型(例如:Git)存储库的类型(例如 git)。仅在启用包元数据时可见。
Automation Hub 概念 URL用于链接到原始自动化概念的 Automation Hub 概念 URL。仅在启用包元数据时可见。
发行说明包版本的发行说明。仅在启用包元数据时可见。

使用 Orchestrator

打包库时,使用 Orchestrator 订阅源。Orchestrator 版本必须为 20.4 或以上。库订阅源需要允许在“租户” \> “设置” \> “部署”中进行 API 密钥身份验证。

Orchestrator 地址

还原库依赖项的 Orchestrator 实例地址。

Orchestrator 租户

应从中还原库依赖项的 Orchestrator 租户。

身份验证

对于面向 Automation Cloud Orchestrator 的身份验证,您需要预先在 Jenkins 中创建凭据。解决方案仅支持外部应用程序身份验证。有关创建外部应用程序和获取所需凭据的详细信息,请参阅管理外部应用程序。

追踪日志记录级别

用于启用跟踪日志记录的设置为以下级别之一:

  • 无
  • 重要事项
  • 错误
  • Warning
  • 信息
  • 详情。(默认设置为无)。

    可用于调试目的。

证书文件的路径

用于对生成的包进行签名的签名证书文件 ( .pfx ) 的路径。启用签名时为必填项。

证书密码

签名证书文件的密码(如果.pfx受保护)。可选。

时间戳服务器 URL

对包进行签名以添加受信任时间戳时使用的符合 RFC 3161 的时间戳服务器的 URL。可选。

管道示例​

pipeline {
  agent any
  environment {
      MAJOR = '1'
      MINOR = '0'
  }
  stages {
    stage ('Pack Solution') {
      steps {
        UiPathSolutionPack(
            version: '1.2.3',
            workspacePath: 'path/to/solution/folder',
            outputPath: 'output/path',
            traceLevel: 'Information',
        )
      }
    }
  }
}
pipeline {
  agent any
  environment {
      MAJOR = '1'
      MINOR = '0'
  }
  stages {
    stage ('Pack Solution') {
      steps {
        UiPathSolutionPack(
            version: '1.2.3',
            workspacePath: 'path/to/solution/folder',
            outputPath: 'output/path',
            traceLevel: 'Information',
        )
      }
    }
  }
}
pipeline {
  agent any
  environment {
      MAJOR = '1'
      MINOR = '0'
  }
  stages {
    stage ('Uninstall Deployment') {
      steps {
        script {
            orchestratorCredentials = ExternalApp(
                applicationId: 'External application identifier',
                applicationScope: 'AutomationSolutions Solutions.Deployments Solutions.Packages',
                applicationSecret: 'External application secret',
                accountForApp: 'Organization identifier'
            )

            UiPathSolutionPack(
                version: '1.2.3',
                workspacePath: 'path/to/solution/folder',
                outputPath: 'output/path',
                traceLevel: 'Information',
                disableBuiltInNugetFeeds: true,
                runWorkflowAnalysis: true,
                governanceFilePath: 'path/to/governance/file',
                credentials: orchestratorCredentials,
                orchestratorAddress: 'OrchestratorUrl',
                orchestratorTenant: 'Tenant name',
            )
        }
      }
    }
  }
}
pipeline {
  agent any
  environment {
      MAJOR = '1'
      MINOR = '0'
  }
  stages {
    stage ('Uninstall Deployment') {
      steps {
        script {
            orchestratorCredentials = ExternalApp(
                applicationId: 'External application identifier',
                applicationScope: 'AutomationSolutions Solutions.Deployments Solutions.Packages',
                applicationSecret: 'External application secret',
                accountForApp: 'Organization identifier'
            )

            UiPathSolutionPack(
                version: '1.2.3',
                workspacePath: 'path/to/solution/folder',
                outputPath: 'output/path',
                traceLevel: 'Information',
                disableBuiltInNugetFeeds: true,
                runWorkflowAnalysis: true,
                governanceFilePath: 'path/to/governance/file',
                credentials: orchestratorCredentials,
                orchestratorAddress: 'OrchestratorUrl',
                orchestratorTenant: 'Tenant name',
            )
        }
      }
    }
  }
}
pipeline {
  agent any
  environment {
      MAJOR = '1'
      MINOR = '0'
  }
  stages {
    stage ('Pack Solution') {
      steps {
        UiPathSolutionPack(
            version: '1.2.3',
            workspacePath: 'path/to/solution/folder',
            outputPath: 'output/path',
            certificatePath: 'path/to/certificate',
            password: 'certificatePasswordSecretId',
            timestampServerUrl: 'timestampserver.url'
            traceLevel: 'Information',
        )
      }
    }
  }
}
pipeline {
  agent any
  environment {
      MAJOR = '1'
      MINOR = '0'
  }
  stages {
    stage ('Pack Solution') {
      steps {
        UiPathSolutionPack(
            version: '1.2.3',
            workspacePath: 'path/to/solution/folder',
            outputPath: 'output/path',
            certificatePath: 'path/to/certificate',
            password: 'certificatePasswordSecretId',
            timestampServerUrl: 'timestampserver.url'
            traceLevel: 'Information',
        )
      }
    }
  }
}
  • 配置​
  • 管道示例​

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新