jenkinsci / configuration-as-code-plugin

Jenkins Configuration as Code Plugin
https://plugins.jenkins.io/configuration-as-code
MIT License
2.68k stars 717 forks source link

Setting basicSSHUserPrivateKey not resolve privateKey #606

Closed radepal closed 5 years ago

radepal commented 5 years ago

After update plugin from

configuration-as-code-support:1.1
configuration-as-code:1.1

to

configuration-as-code-support:1.2
configuration-as-code:1.2

Using jenkins.yaml that is base on demo

credentials:
  system:
    domainCredentials:
    - credentials:
      - basicSSHUserPrivateKey:
          scope: GLOBAL
          id: "bitbucket-key"
          username: "git"
          passphrase: "" #Doable, but not recommended
          description: "SSH Credentials for git to BitBucket"
          privateKeySource:
            directEntry:
              privateKey: ${GITPRIVATEKEY}

and correct ssh private key in /run/secret/GITPRIVATEKEY Actual result of 'bitbucket-key' credencial in view is ${GITPRIVATEKEY} Expected result of 'bitbucket-key' credencial should be: Correct ssh key

Works after going back to 1.1

Plugins in use

ace-editor:1.1
ansicolor:0.5.2
antisamy-markup-formatter:1.5
apache-httpcomponents-client-4-api:4.5.5-3.0
authentication-tokens:1.3
aws-credentials:1.23
aws-global-configuration:1.0
aws-java-sdk:1.11.403
aws-parameter-store:1.2.0
bitbucket:1.1.8
blueocean-autofavorite:1.2.2
blueocean-bitbucket-pipeline:1.9.0
blueocean-commons:1.9.0
blueocean-config:1.9.0
blueocean-core-js:1.9.0
blueocean-dashboard:1.9.0
blueocean-display-url:2.2.0
blueocean-events:1.9.0
blueocean-git-pipeline:1.9.0
blueocean-github-pipeline:1.9.0
blueocean-i18n:1.9.0
blueocean-jira:1.9.0
blueocean-jwt:1.9.0
blueocean-personalization:1.9.0
blueocean-pipeline-api-impl:1.9.0
blueocean-pipeline-editor:1.9.0
blueocean-pipeline-scm-api:1.9.0
blueocean-rest-impl:1.9.0
blueocean-rest:1.9.0
blueocean-web:1.9.0
blueocean:1.9.0
bouncycastle-api:2.17
branch-api:2.0.20
build-pipeline-plugin:1.5.8
cloudbees-bitbucket-branch-source:2.2.12
cloudbees-folder:6.6
command-launcher:1.2
conditional-buildstep:1.3.6
config-file-provider:3.3
configuration-as-code-support:1.2
configuration-as-code:1.2
credentials-binding:1.16
credentials:2.1.18
delivery-pipeline-plugin:1.2.0
display-url-api:2.2.0
docker-commons:1.13
docker-workflow:1.17
durable-task:1.26
external-monitor-job:1.7
favorite:2.3.2
git-client:2.7.3
git-parameter:0.9.6
git-server:1.7
git:3.9.1
github-api:1.92
github-branch-source:2.4.1
github:1.29.3
greenballs:1.15
handlebars:1.1.1
handy-uri-templates-2-api:2.1.6-1.0
htmlpublisher:1.17
jackson2-api:2.8.11.3
javadoc:1.4
jdk-tool:1.1
jenkins-design-language:1.9.0
jira:3.0.3
job-dsl:1.70
jquery-detached:1.2.1
jquery:1.12.4-0
jsch:0.1.54.2
junit:1.26.1
ldap:1.20
lockable-resources:2.3
mailer:1.22
matrix-auth:2.3
matrix-project:1.13
maven-plugin:3.1.2
mercurial:2.4
momentjs:1.1.1
pam-auth:1.4
parameterized-trigger:2.35.2
pipeline-aggregator-view:1.8
pipeline-aws:1.32
pipeline-build-step:2.7
pipeline-graph-analysis:1.7
pipeline-input-step:2.8
pipeline-milestone-step:1.3.1
pipeline-model-api:1.3.2
pipeline-model-declarative-agent:1.1.1
pipeline-model-definition:1.3.2
pipeline-model-extensions:1.3.2
pipeline-multibranch-defaults:2.0
pipeline-rest-api:2.10
pipeline-stage-step:2.3
pipeline-stage-tags-metadata:1.3.2
pipeline-stage-view:2.10
pipeline-utility-steps:2.1.0
plain-credentials:1.4
pubsub-light:1.12
resource-disposer:0.12
run-condition:1.2
scm-api:2.3.0
script-security:1.47
sse-gateway:1.16
ssh-agent:1.17
ssh-credentials:1.14
ssh-steps:1.1.1
structs:1.17
token-macro:2.5
variant:1.1
windows-slaves:1.3.1
workflow-aggregator:2.6
workflow-api:2.30
workflow-basic-steps:2.11
workflow-cps-global-lib:2.12
workflow-cps:2.59
workflow-durable-task-step:2.22
workflow-job:2.26
workflow-multibranch:2.20
workflow-scm-step:2.7
workflow-step-api:2.16
workflow-support:2.21
ws-cleanup:0.36
arnulfojr commented 5 years ago

Having the same issue here! :broken_heart:

ronaldvaneede commented 5 years ago

ah so that is why it broke for me as well :) guess I'll go back to 1.1 for a while then