juju-solutions / layer-cwr

Layer for building the Juju Jenkins CI env
Other
2 stars 5 forks source link

Add support for jsonfile type credential #82

Open johnsca opened 7 years ago

johnsca commented 7 years ago

The GCE provider can use a soft-reference to a JSON file containing the actual creds in credentials.yaml:

credentials:
  google:
    auth-type: jsonfile
    file: /home/user/.gce/creds.json

Thus, sending that YAML won't get the proper credential. We need to support sending the JSON file itself and loading that in properly.

mbruzek commented 7 years ago

I ran into this problem with my google credentials as they are stored in a json file. I was not able to add them in the oauth2 format successfully. It only works if I create a json file and make credentials.yaml look like:

credentials:
  google:
    work_bechmarking_gce:
      auth-type: jsonfile
      file: /var/lib/jenkins/.local/share/juju/foo.json