awslabs / aws-codebuild-jenkins-plugin

AWS CodeBuild integration as a Jenkins build step.
https://aws.amazon.com/codebuild
Apache License 2.0
150 stars 121 forks source link

environment directive gets ignored #145

Open johanneskraemer-lhind opened 11 months ago

johanneskraemer-lhind commented 11 months ago

An environment variable set by an environment directive gets ignored in envVariables:

stage('Deploy') {
  environment {
    SOME_VAR = "TEST"
  }
  steps {
    awsCodeBuild(
      region: 'eu-central-1',
      projectName: 'TestProject',
      envVariables: '[{ ENV_VAR, ${SOME_VAR } }]',
      credentialsType: 'keys',
      sourceControlType: 'project'
    )
  }
}
[AWS CodeBuild Plugin] Starting build with 
  > project name: TestProject
  > environment variables: [{ ENV_VAR, ${SOME_VAR} }]

I would expect the output to be

  > environment variables: [{ ENV_VAR, TEST }]

I know that I can use double quotes in envVariables, but then special characters like äöüß get replaced by ä.

Same problem exists with Variables set by build-user-vars-plugin.