5
0
Fork 0
mirror of https://github.com/hashicorp/vault-action.git synced 2025-11-07 15:16:56 +00:00

Merge pull request #100 from hashicorp/build

Update build
This commit is contained in:
Jason O'Donnell 2020-08-07 14:41:08 -04:00 committed by GitHub
commit 6cf013b5c0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

21
dist/index.js vendored
View file

@ -11106,7 +11106,7 @@ const { exportSecrets } = __webpack_require__(928);
(async () => { (async () => {
try { try {
await core.group('Test Get Vault Secrets', exportSecrets); await core.group('Get Vault Secrets', exportSecrets);
} catch (error) { } catch (error) {
core.setFailed(error.message); core.setFailed(error.message);
} }
@ -14126,27 +14126,24 @@ async function exportSecrets() {
https: {} https: {}
} }
const tlsSkipVerify = core.getInput('tlsSkipVerify', { required: false }) != 'false'; const tlsSkipVerify = (core.getInput('tlsSkipVerify', { required: false }) || 'false').toLowerCase() != 'false';
if (tlsSkipVerify == true) { if (tlsSkipVerify === true) {
defaultOptions.https.rejectUnauthorized = true; defaultOptions.https.rejectUnauthorized = true;
} }
const caCertificateRaw = core.getInput('caCertificate', { required: false }); const caCertificateRaw = core.getInput('caCertificate', { required: false });
console.log(caCertificateRaw) if (caCertificateRaw != null) {
if (caCertificateRaw != "" || caCertificateRaw != undefined) { defaultOptions.https.certificateAuthority = Buffer.from(caCertificateRaw, 'base64').toString();
defaultOptions.https.certificateAuthority = Buffer.from(caCertificateRaw, 'base64');
} }
console.log(defaultOptions.https.certificateAuthority.toString())
const clientCertificateRaw = core.getInput('clientCertificate', { required: false }); const clientCertificateRaw = core.getInput('clientCertificate', { required: false });
if (clientCertificateRaw != "") { if (clientCertificateRaw != null) {
defaultOptions.https.certificate = Buffer.from(clientCertificateRaw, 'base64'); defaultOptions.https.certificate = Buffer.from(clientCertificateRaw, 'base64').toString();
} }
const clientKeyRaw = core.getInput('clientKey', { required: false }); const clientKeyRaw = core.getInput('clientKey', { required: false });
if (clientKeyRaw != "") { if (clientKeyRaw != null) {
defaultOptions.https.key = Buffer.from(clientCertificateRaw, 'base64'); defaultOptions.https.key = Buffer.from(clientKeyRaw, 'base64').toString();
} }
for (const [headerName, headerValue] of extraHeaders) { for (const [headerName, headerValue] of extraHeaders) {