주요 콘텐츠

Migrate from Pipeline Generator Version 1 to Version 2

Pipeline generator version 2 contains improvements to generated pipeline file size, pipeline file propagation, and integration with artifact management systems. If you are using pipeline generator version 1, you can migrate to version 2 to take advantage of these improvements. Because the setup and architecture for version 2 differ from version 1, you must update your pipeline generation setup to support version 2.

Advantages of Version 2

Pipeline generator version 2 provides these improvements over version 1:

  • Smaller generated pipeline files. Version 2 generates smaller pipeline files that avoid the Method too large errors that can occur with version 1 when using complex pipeline architectures.

  • Artifact management integration. You can store pipeline artifacts in Amazon S3™, Azure® Blob Storage, or JFrog Artifactory instead of relying on CI platform artifact storage.

  • Container support. You can specify a container image for pipeline jobs by using the RunnerType and ImageTag properties of the pipeline generator options object.

  • Subfolder project support. Version 2 supports projects that are in subfolders of the repository root by using the RelativeProjectPath property of the pipeline generator options object.

  • Simplified configuration. You can specify all configuration as properties on the options object instead of using repository or environment variables.

How to Migrate

To migrate from pipeline generator version 1 to version 2:

  1. Follow the version 2 setup for your CI platform. The setup for version 2 differs from version 1. Follow the full setup instructions for your CI platform:

  2. Update your pipeline generation code. When you create your pipeline generator options object, specify GeneratorVersion=2. For example:

    options = padv.pipeline.GitHubOptions(GeneratorVersion=2);

    For more information, see the pipeline generator options object for your CI platform:

  3. Move environment variable settings to object properties. In version 1, you provide configuration details such as the MATLAB® installation location by using repository or environment variables. In version 2, you specify these details as properties of your pipeline generation options object. For example, instead of setting a PATH_TO_MATLAB environment variable, make sure MATLAB is available on the system PATH of your build agent.

  4. Update your template files. Version 2 uses different template files from version 1. Copy the new template files from the support package as described in the setup instructions for your CI platform.

  5. Remove version 1 properties that version 2 ignores. Depending on which CI platform you use, version 2 does not use the following version 1 properties:

    • ArtifactsExpireIn (GitLab® only)

    • EnablePipelineCaching

    • MatlabInstallationLocation

    • RetentionDays (GitHub® only)

    • ShellEnvironment

    Remove these properties from your pipeline generation code. If you previously used the ShellEnvironment property, version 2 automatically detects the operating system of the build agent and uses the appropriate shell.

  6. Regenerate your pipeline file. Run the padv.pipeline.generatePipeline function with the new options object to generate the version 2 pipeline file.

See Also

| | | |

Topics