org.jenkinsci.plugins.credentialsbinding.impl.CredentialNotFoundException: ${secret_file_id}

Jenkins JIRA | Erik The Other Wizzard | 5 months ago
  1. 0

    [JIRA] (JENKINS-36470) Parameter Expression throws CredentialNotFoundException

    Google Groups | 5 months ago | er...@theothersonline.eu (JIRA)
    org.jenkinsci.plugins.credentialsbinding.impl.CredentialNotFoundException: ${secret_file_id}
  2. 0

    When configuring a job with credentials binding the 'specific credentials' do work but when I try to use the 'parameter expression' it always fails with the following message: {code} [EnvInject] - Loading node environment variables. [EnvInject] - Preparing an environment for the build. [EnvInject] - Keeping Jenkins system variables. [EnvInject] - Keeping Jenkins build variables. [EnvInject] - Evaluation the following Groovy script content: println "secret_file_id:" + secret_file_id secret_file_id:keystore [EnvInject] - Injecting contributions. Building on master in workspace /var/lib/jenkins/workspace/Credential-binding-parameter-expression FATAL: ${secret_file_id} org.jenkinsci.plugins.credentialsbinding.impl.CredentialNotFoundException: ${secret_file_id} at org.jenkinsci.plugins.credentialsbinding.MultiBinding.getCredentials(MultiBinding.java:124) at org.jenkinsci.plugins.credentialsbinding.impl.FileBinding.bindSingle(FileBinding.java:52) at org.jenkinsci.plugins.credentialsbinding.Binding.bind(Binding.java:133) at org.jenkinsci.plugins.credentialsbinding.impl.SecretBuildWrapper.setUp(SecretBuildWrapper.java:58) at hudson.model.Build$BuildExecution.doRun(Build.java:156) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534) at hudson.model.Run.execute(Run.java:1738) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) Finished: FAILURE {code} As shown in config-attachment the referenced secret file (ID: 'keystore') is found when using the specific credentials option. When I try to load it dynamically with the parameter expression using ${secret_file_id} the exception is thrown. I've spend a fair amount of time testing with different settings for credentials and plugin versions but none fixed my issue. I've attached an example job configuration that mimics my issue. Basically the one I'm trying to achieve is a job that based upon a parameter builds and signs an Android app. The parameter is either supplied through a properties file inside a git repo or by making the build 'parameterized'. Any help would be appreciated! Cheers, Erik

    Jenkins JIRA | 5 months ago | Erik The Other Wizzard
    org.jenkinsci.plugins.credentialsbinding.impl.CredentialNotFoundException: ${secret_file_id}
  3. 0

    [JIRA] [credentials-binding-plugin] (JENKINS-32402) Credentials binding fails to find creds when using a Parameterized Expression, but only for timed jobs

    Google Groups | 11 months ago | nir...@bns-g.com (JIRA)
    org.jenkinsci.plugins.credentialsbinding.impl.CredentialNotFoundException: ${GAMESPARKS_CREDS_ID}
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    This job attempts to: * Take a parameter GAMESPARKS_CREDS_ID as creds * Use Credentials Binding to convert the creds into an environment variable GAMESPARKS_CREDS that is the concatenation of username:password for use in a shell script * Do so every 2 minutes When triggered manually, it works fine. But when triggered by the timer, it fails with the following message: {code} FATAL: ${GAMESPARKS_CREDS_ID} org.jenkinsci.plugins.credentialsbinding.impl.CredentialNotFoundException: ${GAMESPARKS_CREDS_ID} at org.jenkinsci.plugins.credentialsbinding.MultiBinding.getCredentials(MultiBinding.java:124) at org.jenkinsci.plugins.credentialsbinding.impl.UsernamePasswordBinding.bindSingle(UsernamePasswordBinding.java:50) at org.jenkinsci.plugins.credentialsbinding.Binding.bind(Binding.java:126) at org.jenkinsci.plugins.credentialsbinding.impl.SecretBuildWrapper.setUp(SecretBuildWrapper.java:58) at hudson.model.Build$BuildExecution.doRun(Build.java:156) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:537) at hudson.model.Run.execute(Run.java:1744) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:374) Finished: FAILURE {code} If there's a better way to make credentials available in a build script, I'm open to that.

    Jenkins JIRA | 11 months ago | Nick Irvine
    org.jenkinsci.plugins.credentialsbinding.impl.CredentialNotFoundException: ${GAMESPARKS_CREDS_ID}
  6. 0

    This job attempts to: * Take a parameter GAMESPARKS_CREDS_ID as creds * Use Credentials Binding to convert the creds into an environment variable GAMESPARKS_CREDS that is the concatenation of username:password for use in a shell script * Do so every 2 minutes When triggered manually, it works fine. But when triggered by the timer, it fails with the following message: {code} FATAL: ${GAMESPARKS_CREDS_ID} org.jenkinsci.plugins.credentialsbinding.impl.CredentialNotFoundException: ${GAMESPARKS_CREDS_ID} at org.jenkinsci.plugins.credentialsbinding.MultiBinding.getCredentials(MultiBinding.java:124) at org.jenkinsci.plugins.credentialsbinding.impl.UsernamePasswordBinding.bindSingle(UsernamePasswordBinding.java:50) at org.jenkinsci.plugins.credentialsbinding.Binding.bind(Binding.java:126) at org.jenkinsci.plugins.credentialsbinding.impl.SecretBuildWrapper.setUp(SecretBuildWrapper.java:58) at hudson.model.Build$BuildExecution.doRun(Build.java:156) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:537) at hudson.model.Run.execute(Run.java:1744) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:374) Finished: FAILURE {code} If there's a better way to make credentials available in a build script, I'm open to that.

    Jenkins JIRA | 11 months ago | Nick Irvine
    org.jenkinsci.plugins.credentialsbinding.impl.CredentialNotFoundException: ${GAMESPARKS_CREDS_ID}

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.jenkinsci.plugins.credentialsbinding.impl.CredentialNotFoundException

      ${secret_file_id}

      at org.jenkinsci.plugins.credentialsbinding.MultiBinding.getCredentials()
    2. org.jenkinsci.plugins
      SecretBuildWrapper.setUp
      1. org.jenkinsci.plugins.credentialsbinding.MultiBinding.getCredentials(MultiBinding.java:124)
      2. org.jenkinsci.plugins.credentialsbinding.impl.FileBinding.bindSingle(FileBinding.java:52)
      3. org.jenkinsci.plugins.credentialsbinding.Binding.bind(Binding.java:133)
      4. org.jenkinsci.plugins.credentialsbinding.impl.SecretBuildWrapper.setUp(SecretBuildWrapper.java:58)
      4 frames
    3. Hudson
      Executor.run
      1. hudson.model.Build$BuildExecution.doRun(Build.java:156)
      2. hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
      3. hudson.model.Run.execute(Run.java:1738)
      4. hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      5. hudson.model.ResourceController.execute(ResourceController.java:98)
      6. hudson.model.Executor.run(Executor.java:410)
      6 frames