Re: Jenkinslibrary stepEnvironmentVariables aren't encoded properly

15 views
Skip to first unread message
Message has been deleted

Ivan Fernandez Calvo

unread,
Apr 12, 2019, 12:30:05 PM4/12/19
to Jenkins Users
I'd guess the step `stepEnvironmentVariables` is in your Pipeline Shared Library `@Library('jenkinslib@jira-SBS-8863')_`  because it is not in this page https://jenkins.io/doc/pipeline/steps/, so it is not a pipeline step provided by some Pipeline plugin, so it is an in house implementation you will have to ask the people that have made it

El viernes, 12 de abril de 2019, 9:27:05 (UTC+2), Sarfroz Basha escribió:
Hi All,

I need some help from you guys.

e.g. value "daivb/r/DAIVB2/config-server\ndaivb/r/DAIVB2/registry-server"
causes build or more specific script-execution to fail with:


Error: java.io.IOException: Failed to run image '********.com:10004/buildcontainers/linux-18.04-base'. Error: docker: invalid reference format: repository name must be lowercase.

I have given wrong environmentID but still build is success. I want to give wrong environment ID and build needs to fail like above Error message. So if I set the variable in replay button like this:-

#!/usr/bin/env groovy
@Library('jenkinslib@jira-SBS-8863')_

Build(
 
    pipeline: this,
    releaseBranchPattern: 'test/jira-SBS-8863',
    abortOnFailedTests: true,
    checkoutPostStep: [scriptName : './testScript1'],
    buildPreStep: [scriptName : './testScript2'],
 stepEnvironmentVariables: [
 'ENVIRONMENT_ID' : '23\\ / : ; 45d3',
 'ENVIRONMENT_ID2' : 'JUST A Test',
 'BUILD _NUMBER' : env.BUILD_ID],
 buildPeriodically: '30 08 * * 1-6'
);


If value string is encoded as base64 everything works fine. If without encode the value is failing the job with below error. so I don't want to encode the value.


Reply all
Reply to author
Forward
0 new messages