The following plugin provides functionality available through Pipeline-compatible steps. Read more about how to integrate steps into your Pipeline in the Steps section of the Pipeline Syntax page.

For a list of other such plugins, see the Pipeline Steps Reference page.

Buildstash

step([$class: 'BuildstashBuilder']): Upload to Buildstash

Buildstash Builder Help

Buildstash Upload Builder

This build step uploads build artifacts to the Buildstash web service in Freestyle projects.

Required Parameters

  • API Key: Your Buildstash API key for authentication
  • Primary File Path: Path to the file you want to upload (relative to workspace)
  • Major Version: Major version component (e.g., "1")
  • Minor Version: Minor version component (e.g., "0")
  • Patch Version: Patch version component (e.g., "0")
  • Platform: Target platform (e.g., "ios", "android")
  • Stream: Build stream (e.g., "development", "production")

Optional Parameters

  • Structure: Upload structure type ("file" or "file+expansion")
  • Expansion File Path: Path to expansion file (required if structure is "file+expansion")
  • Extra Version: Extra version component (e.g., "beta")
  • Meta Version: Meta version component (e.g., "build.123")
  • Custom Build Number: Custom build number
  • Labels: Labels for the build (comma-seperated)
  • Architectures: Supported architectures (comma-seperated)
  • Notes: Additional notes about the build

CI/CD Parameters

  • CI Pipeline: Name of the CI pipeline (automatically set to the project/job name)
  • CI Run ID: CI run identifier (automatically set to build number)
  • CI Run URL: URL to the CI run (automatically set to build URL)
  • CI Build Duration: Build duration (automatically set to actual build duration in HH:mm:ss format)

Note: CI/CD parameters are automatically populated from Jenkins context and cannot be manually set in Freestyle projects.

Version Control Parameters

  • VC Host Type: Version control host type (default: "git")
  • VC Host: Version control host (default: "github")
  • VC Repo Name: Repository name
  • VC Repo URL: Repository URL
  • VC Branch: Branch name
  • VC Commit SHA: Commit SHA
  • VC Commit URL: Commit URL

Dynamic Values with Environment Variables

All fields support dynamic values using environment variables. Use ${VAR_NAME} syntax in any field to reference environment variables set in previous build steps.

Example:

  • In a shell script step: export PLATFORM=ios
  • In the Platform field: ${PLATFORM}
  • Result: The field will use "ios" at runtime

This works for all fields including file paths, version components, platform, stream, labels, architectures, and SCM fields.

Usage in Freestyle Projects

  1. Create a new Freestyle project in Jenkins
  2. Configure your build steps (compile, test, etc.)
  3. Optionally set environment variables in shell script steps
  4. Add a new build step and select "Upload to Buildstash"
  5. Configure the required parameters (use ${VAR_NAME} for dynamic values)
  6. Save and run the build

Build Results

After a successful upload, you can view the upload results on the build page. The build action will show:

  • Build ID
  • Build Info URL
  • Download URL
  • Processing status

For more information, visit the Buildstash Documentation.

  • apiKey : String (optional)
  • architectures : String (optional)
  • customBuildNumber : String (optional)
  • expansionFilePath : String (optional)
  • labels : String (optional)
  • notes : String (optional)
  • platform : String (optional)
  • primaryFilePath : String (optional)
  • stream : String (optional)
  • structure : String (optional)
  • vcBranch : String (optional)
  • vcCommitSha : String (optional)
  • vcCommitUrl : String (optional)
  • vcHost : String (optional)
  • vcHostType : String (optional)
  • vcRepoName : String (optional)
  • vcRepoUrl : String (optional)
  • versionComponent1Major : String (optional)
  • versionComponent2Minor : String (optional)
  • versionComponent3Patch : String (optional)
  • versionComponentExtra : String (optional)
  • versionComponentMeta : String (optional)

buildstash: Upload to Buildstash

Buildstash Step Help

Buildstash Upload Step

This step uploads build artifacts to the Buildstash web service.

Required Parameters

  • API Key: Your Buildstash API key for authentication
  • Primary File Path: Path to the file you want to upload (relative to workspace)
  • Major Version: Major version component (e.g., "1")
  • Minor Version: Minor version component (e.g., "0")
  • Patch Version: Patch version component (e.g., "0")
  • Platform: Target platform (e.g., "ios", "android")
  • Stream: Build stream (e.g., "development", "production")

Optional Parameters

  • Structure: Upload structure type ("file" or "file+expansion")
  • Expansion File Path: Path to expansion file (required if structure is "file+expansion")
  • Extra Version: Extra version component (e.g., "beta")
  • Meta Version: Meta version component (e.g., "build.123")
  • Custom Build Number: Custom build number
  • Labels: Labels for the build (comma-seperated)
  • Architectures: Supported architectures (comma-seperated)
  • Notes: Additional notes about the build

CI/CD Parameters

  • CI Pipeline: Name of the CI pipeline (automatically set to the project/job name)
  • CI Run ID: CI run identifier (automatically set to build number)
  • CI Run URL: URL to the CI run (automatically set to build URL)
  • CI Build Duration: Build duration (automatically set to actual build duration in HH:mm:ss format)

Note: CI/CD parameters are automatically populated from Jenkins context and cannot be manually set in pipeline steps.

Version Control Parameters

  • VC Host Type: Version control host type (default: "git")
  • VC Host: Version control host (default: "github")
  • VC Repo Name: Repository name
  • VC Repo URL: Repository URL
  • VC Branch: Branch name
  • VC Commit SHA: Commit SHA
  • VC Commit URL: Commit URL

Dynamic Values with Environment Variables

All fields support dynamic values using environment variables. In pipeline scripts, you can use Groovy variables directly or string expansion.

Examples:

  • Direct variable: platform: env.PLATFORM
  • String expansion: platform: '${PLATFORM}'
  • File path: primaryFilePath: "${env.WORKSPACE}/build/app.ipa"

This works for all fields including file paths, version components, platform, stream, labels, architectures, and SCM fields.

Example Usage


// Using environment variables
buildstash(
    apiKey: 'your-api-key',
    structure: 'file',
    primaryFilePath: "${env.WORKSPACE}/build/app.ipa",
    versionComponent1Major: '1',
    versionComponent2Minor: '0',
    versionComponent3Patch: '0',
    platform: env.PLATFORM,      // Using environment variable
    stream: env.STREAM            // Using environment variable
)

// Or with string expansion
buildstash(
    apiKey: 'your-api-key',
    primaryFilePath: '${WORKSPACE}/build/app.ipa',
    versionComponent1Major: '1',
    versionComponent2Minor: '0',
    versionComponent3Patch: '0',
    platform: '${PLATFORM}',     // String expansion
    stream: '${STREAM}'            // String expansion
)
    

For more information, visit the Buildstash Documentation.

  • apiKey : String (optional)
  • architectures : String (optional)
  • customBuildNumber : String (optional)
  • expansionFilePath : String (optional)
  • labels : String (optional)
  • notes : String (optional)
  • platform : String (optional)
  • primaryFilePath : String (optional)
  • stream : String (optional)
  • structure : String (optional)
  • vcBranch : String (optional)
  • vcCommitSha : String (optional)
  • vcCommitUrl : String (optional)
  • vcHost : String (optional)
  • vcHostType : String (optional)
  • vcRepoName : String (optional)
  • vcRepoUrl : String (optional)
  • versionComponent1Major : String (optional)
  • versionComponent2Minor : String (optional)
  • versionComponent3Patch : String (optional)
  • versionComponentExtra : String (optional)
  • versionComponentMeta : String (optional)

Was this page helpful?

Please submit your feedback about this page through this quick form.

Alternatively, if you don't wish to complete the quick form, you can simply indicate if you found this page helpful?

    


See existing feedback here.