Call variable under a PS script as a parameter in Jenkins

This topic contains 1 reply, has 2 voices, and was last updated by  Don Jones 1 year, 4 months ago.

  • Author
  • #63726


    I have a config.ps1 script which has a variable "$versionNumber = "1.0.0"". I need enter the variable value of users choice and save the config.ps1 file. I need to do this task using Jenkins Parameter.

    My config.ps1

    # Pack parameters used to create the .nupkg file.

    # Specify the Version Number to use for the NuGet package. If not specified, the version number of the assembly being packed will be used.
    # NuGet version number guidance: and the Semantic Versioning spec:
    # e.g. "" (use assembly's version), "1.2.3" (stable version), "1.2.3-alpha" (prerelease version).
    $versionNumber = "1.0.0"

    # Specify any Release Notes for this package.
    # These will only be included in the package if you have a .nuspec file for the project in the same directory as the project file.
    $releaseNotes = ""

    # Specify a specific Configuration and/or Platform to only create a NuGet package when building the project with this Configuration and/or Platform.
    # e.g. $configuration = "Release"
    # $platform = "AnyCPU"
    $configuration = ""
    $platform = ""

  • #64402

    Don Jones

    I'm unfortunately unfamiliar with how Jenkins passes information to scripts.

You must be logged in to reply to this topic.