UNPKG

@pulumi/docker-build

Version:

[![Slack](http://www.pulumi.com/images/docs/badges/slack.svg)](https://slack.pulumi.com) [![NPM version](https://badge.fury.io/js/%40pulumi%2fdocker-build.svg)](https://www.npmjs.com/package/@pulumi/docker-build) [![Python version](https://badge.fury.io/p

117 lines 10.2 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.exportRegistryProvideDefaults = exports.exportOCIProvideDefaults = exports.exportImageProvideDefaults = exports.exportDockerProvideDefaults = exports.exportProvideDefaults = exports.cacheToS3ProvideDefaults = exports.cacheToRegistryProvideDefaults = exports.cacheToLocalProvideDefaults = exports.cacheToGitHubActionsProvideDefaults = exports.cacheToAzureBlobProvideDefaults = exports.cacheToProvideDefaults = exports.cacheFromS3ProvideDefaults = exports.cacheFromGitHubActionsProvideDefaults = exports.cacheFromProvideDefaults = void 0; const outputs = require("../types/output"); const utilities = require("../utilities"); /** * cacheFromProvideDefaults sets the appropriate defaults for CacheFrom */ function cacheFromProvideDefaults(val) { return Object.assign(Object.assign({}, val), { gha: (val.gha ? outputs.cacheFromGitHubActionsProvideDefaults(val.gha) : undefined), s3: (val.s3 ? outputs.cacheFromS3ProvideDefaults(val.s3) : undefined) }); } exports.cacheFromProvideDefaults = cacheFromProvideDefaults; /** * cacheFromGitHubActionsProvideDefaults sets the appropriate defaults for CacheFromGitHubActions */ function cacheFromGitHubActionsProvideDefaults(val) { var _a, _b, _c; return Object.assign(Object.assign({}, val), { scope: (_a = (val.scope)) !== null && _a !== void 0 ? _a : (utilities.getEnv("buildkit") || ""), token: (_b = (val.token)) !== null && _b !== void 0 ? _b : (utilities.getEnv("ACTIONS_RUNTIME_TOKEN") || ""), url: (_c = (val.url)) !== null && _c !== void 0 ? _c : (utilities.getEnv("ACTIONS_CACHE_URL") || "") }); } exports.cacheFromGitHubActionsProvideDefaults = cacheFromGitHubActionsProvideDefaults; /** * cacheFromS3ProvideDefaults sets the appropriate defaults for CacheFromS3 */ function cacheFromS3ProvideDefaults(val) { var _a, _b, _c, _d; return Object.assign(Object.assign({}, val), { accessKeyId: (_a = (val.accessKeyId)) !== null && _a !== void 0 ? _a : (utilities.getEnv("AWS_ACCESS_KEY_ID") || ""), region: (_b = (val.region)) !== null && _b !== void 0 ? _b : (utilities.getEnv("AWS_REGION") || ""), secretAccessKey: (_c = (val.secretAccessKey)) !== null && _c !== void 0 ? _c : (utilities.getEnv("AWS_SECRET_ACCESS_KEY") || ""), sessionToken: (_d = (val.sessionToken)) !== null && _d !== void 0 ? _d : (utilities.getEnv("AWS_SESSION_TOKEN") || "") }); } exports.cacheFromS3ProvideDefaults = cacheFromS3ProvideDefaults; /** * cacheToProvideDefaults sets the appropriate defaults for CacheTo */ function cacheToProvideDefaults(val) { return Object.assign(Object.assign({}, val), { azblob: (val.azblob ? outputs.cacheToAzureBlobProvideDefaults(val.azblob) : undefined), gha: (val.gha ? outputs.cacheToGitHubActionsProvideDefaults(val.gha) : undefined), local: (val.local ? outputs.cacheToLocalProvideDefaults(val.local) : undefined), registry: (val.registry ? outputs.cacheToRegistryProvideDefaults(val.registry) : undefined), s3: (val.s3 ? outputs.cacheToS3ProvideDefaults(val.s3) : undefined) }); } exports.cacheToProvideDefaults = cacheToProvideDefaults; /** * cacheToAzureBlobProvideDefaults sets the appropriate defaults for CacheToAzureBlob */ function cacheToAzureBlobProvideDefaults(val) { var _a, _b; return Object.assign(Object.assign({}, val), { ignoreError: (_a = (val.ignoreError)) !== null && _a !== void 0 ? _a : false, mode: (_b = (val.mode)) !== null && _b !== void 0 ? _b : "min" }); } exports.cacheToAzureBlobProvideDefaults = cacheToAzureBlobProvideDefaults; /** * cacheToGitHubActionsProvideDefaults sets the appropriate defaults for CacheToGitHubActions */ function cacheToGitHubActionsProvideDefaults(val) { var _a, _b, _c, _d, _e; return Object.assign(Object.assign({}, val), { ignoreError: (_a = (val.ignoreError)) !== null && _a !== void 0 ? _a : false, mode: (_b = (val.mode)) !== null && _b !== void 0 ? _b : "min", scope: (_c = (val.scope)) !== null && _c !== void 0 ? _c : (utilities.getEnv("buildkit") || ""), token: (_d = (val.token)) !== null && _d !== void 0 ? _d : (utilities.getEnv("ACTIONS_RUNTIME_TOKEN") || ""), url: (_e = (val.url)) !== null && _e !== void 0 ? _e : (utilities.getEnv("ACTIONS_CACHE_URL") || "") }); } exports.cacheToGitHubActionsProvideDefaults = cacheToGitHubActionsProvideDefaults; /** * cacheToLocalProvideDefaults sets the appropriate defaults for CacheToLocal */ function cacheToLocalProvideDefaults(val) { var _a, _b, _c, _d, _e; return Object.assign(Object.assign({}, val), { compression: (_a = (val.compression)) !== null && _a !== void 0 ? _a : "gzip", compressionLevel: (_b = (val.compressionLevel)) !== null && _b !== void 0 ? _b : 0, forceCompression: (_c = (val.forceCompression)) !== null && _c !== void 0 ? _c : false, ignoreError: (_d = (val.ignoreError)) !== null && _d !== void 0 ? _d : false, mode: (_e = (val.mode)) !== null && _e !== void 0 ? _e : "min" }); } exports.cacheToLocalProvideDefaults = cacheToLocalProvideDefaults; /** * cacheToRegistryProvideDefaults sets the appropriate defaults for CacheToRegistry */ function cacheToRegistryProvideDefaults(val) { var _a, _b, _c, _d, _e, _f, _g; return Object.assign(Object.assign({}, val), { compression: (_a = (val.compression)) !== null && _a !== void 0 ? _a : "gzip", compressionLevel: (_b = (val.compressionLevel)) !== null && _b !== void 0 ? _b : 0, forceCompression: (_c = (val.forceCompression)) !== null && _c !== void 0 ? _c : false, ignoreError: (_d = (val.ignoreError)) !== null && _d !== void 0 ? _d : false, imageManifest: (_e = (val.imageManifest)) !== null && _e !== void 0 ? _e : false, mode: (_f = (val.mode)) !== null && _f !== void 0 ? _f : "min", ociMediaTypes: (_g = (val.ociMediaTypes)) !== null && _g !== void 0 ? _g : true }); } exports.cacheToRegistryProvideDefaults = cacheToRegistryProvideDefaults; /** * cacheToS3ProvideDefaults sets the appropriate defaults for CacheToS3 */ function cacheToS3ProvideDefaults(val) { var _a, _b, _c, _d, _e, _f; return Object.assign(Object.assign({}, val), { accessKeyId: (_a = (val.accessKeyId)) !== null && _a !== void 0 ? _a : (utilities.getEnv("AWS_ACCESS_KEY_ID") || ""), ignoreError: (_b = (val.ignoreError)) !== null && _b !== void 0 ? _b : false, mode: (_c = (val.mode)) !== null && _c !== void 0 ? _c : "min", region: (_d = (val.region)) !== null && _d !== void 0 ? _d : (utilities.getEnv("AWS_REGION") || ""), secretAccessKey: (_e = (val.secretAccessKey)) !== null && _e !== void 0 ? _e : (utilities.getEnv("AWS_SECRET_ACCESS_KEY") || ""), sessionToken: (_f = (val.sessionToken)) !== null && _f !== void 0 ? _f : (utilities.getEnv("AWS_SESSION_TOKEN") || "") }); } exports.cacheToS3ProvideDefaults = cacheToS3ProvideDefaults; /** * exportProvideDefaults sets the appropriate defaults for Export */ function exportProvideDefaults(val) { return Object.assign(Object.assign({}, val), { docker: (val.docker ? outputs.exportDockerProvideDefaults(val.docker) : undefined), image: (val.image ? outputs.exportImageProvideDefaults(val.image) : undefined), oci: (val.oci ? outputs.exportOCIProvideDefaults(val.oci) : undefined), registry: (val.registry ? outputs.exportRegistryProvideDefaults(val.registry) : undefined) }); } exports.exportProvideDefaults = exportProvideDefaults; /** * exportDockerProvideDefaults sets the appropriate defaults for ExportDocker */ function exportDockerProvideDefaults(val) { var _a, _b, _c, _d, _e; return Object.assign(Object.assign({}, val), { compression: (_a = (val.compression)) !== null && _a !== void 0 ? _a : "gzip", compressionLevel: (_b = (val.compressionLevel)) !== null && _b !== void 0 ? _b : 0, forceCompression: (_c = (val.forceCompression)) !== null && _c !== void 0 ? _c : false, ociMediaTypes: (_d = (val.ociMediaTypes)) !== null && _d !== void 0 ? _d : false, tar: (_e = (val.tar)) !== null && _e !== void 0 ? _e : true }); } exports.exportDockerProvideDefaults = exportDockerProvideDefaults; /** * exportImageProvideDefaults sets the appropriate defaults for ExportImage */ function exportImageProvideDefaults(val) { var _a, _b, _c, _d, _e; return Object.assign(Object.assign({}, val), { compression: (_a = (val.compression)) !== null && _a !== void 0 ? _a : "gzip", compressionLevel: (_b = (val.compressionLevel)) !== null && _b !== void 0 ? _b : 0, forceCompression: (_c = (val.forceCompression)) !== null && _c !== void 0 ? _c : false, ociMediaTypes: (_d = (val.ociMediaTypes)) !== null && _d !== void 0 ? _d : false, store: (_e = (val.store)) !== null && _e !== void 0 ? _e : true }); } exports.exportImageProvideDefaults = exportImageProvideDefaults; /** * exportOCIProvideDefaults sets the appropriate defaults for ExportOCI */ function exportOCIProvideDefaults(val) { var _a, _b, _c, _d, _e; return Object.assign(Object.assign({}, val), { compression: (_a = (val.compression)) !== null && _a !== void 0 ? _a : "gzip", compressionLevel: (_b = (val.compressionLevel)) !== null && _b !== void 0 ? _b : 0, forceCompression: (_c = (val.forceCompression)) !== null && _c !== void 0 ? _c : false, ociMediaTypes: (_d = (val.ociMediaTypes)) !== null && _d !== void 0 ? _d : true, tar: (_e = (val.tar)) !== null && _e !== void 0 ? _e : true }); } exports.exportOCIProvideDefaults = exportOCIProvideDefaults; /** * exportRegistryProvideDefaults sets the appropriate defaults for ExportRegistry */ function exportRegistryProvideDefaults(val) { var _a, _b, _c, _d, _e, _f; return Object.assign(Object.assign({}, val), { compression: (_a = (val.compression)) !== null && _a !== void 0 ? _a : "gzip", compressionLevel: (_b = (val.compressionLevel)) !== null && _b !== void 0 ? _b : 0, forceCompression: (_c = (val.forceCompression)) !== null && _c !== void 0 ? _c : false, ociMediaTypes: (_d = (val.ociMediaTypes)) !== null && _d !== void 0 ? _d : false, push: (_e = (val.push)) !== null && _e !== void 0 ? _e : true, store: (_f = (val.store)) !== null && _f !== void 0 ? _f : true }); } exports.exportRegistryProvideDefaults = exportRegistryProvideDefaults; //# sourceMappingURL=output.js.map