Unable to force << pipeline.number >> to be type string

I’m trying out the Artifactory orbs and encountering the same problem on each.

I’d like the build integration’s build number to be my pipeline number, so I added this block to a job:

    steps:
      ...
      - artifactory/build-integration:
          build-name: blahblahblah
          build-number: '<< pipeline.number >>

However this gets interperted as an integer and causes a build error (that annoyingly isn’t caught by the CLI’s validate command):

Type error for argument build-number: expected type: string, actual value: "1234567890" (type integer)

Error calling command: 'artifactory/build-integration'
Error calling job: 'job'
Error calling workflow: 'workflow'

I’ve been unable to force this to be interpreted as a string and have had to resort to storing the pipeline number in an environment variable and using that. I’d like to not have to remember to do that in every job; how can I make the pipeline number a string?

1 Like

Running into a similar problem and due to us stripping empty space appending a space to the end of the number and enclosing it in quotes happened to work for us.

    steps:
      ...
      - artifactory/build-integration:
          build-name: blahblahblah
          build-number: '<< pipeline.number >> '

Ultimately going with json turned out to be cleaner for our use case

Kind of similar issue happens but in reverse with the updated Jira integration:

Copied directly from the usage example…