From ed7603c0d788cdaa48d72293e951940f5da94d96 Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Mon, 1 Jul 2019 20:38:41 -0700 Subject: [PATCH 1/8] Move older 'pulumi.io' stacks to infrastructure-old --- {infrastructure => infrastructure-old}/.gitignore | 0 .../Pulumi.pulumi.io-fusion.yaml | 0 {infrastructure => infrastructure-old}/Pulumi.pulumi.io-hugo.yaml | 0 .../Pulumi.pulumi.io-production.yaml | 0 .../Pulumi.pulumi.io-staging.yaml | 0 {infrastructure => infrastructure-old}/Pulumi.yaml | 0 {infrastructure => infrastructure-old}/etag-workaround.md | 0 {infrastructure => infrastructure-old}/index.ts | 0 {infrastructure => infrastructure-old}/package.json | 0 {infrastructure => infrastructure-old}/tsconfig.json | 0 {infrastructure => infrastructure-old}/tslint.json | 0 {infrastructure => infrastructure-old}/yarn.lock | 0 12 files changed, 0 insertions(+), 0 deletions(-) rename {infrastructure => infrastructure-old}/.gitignore (100%) rename {infrastructure => infrastructure-old}/Pulumi.pulumi.io-fusion.yaml (100%) rename {infrastructure => infrastructure-old}/Pulumi.pulumi.io-hugo.yaml (100%) rename {infrastructure => infrastructure-old}/Pulumi.pulumi.io-production.yaml (100%) rename {infrastructure => infrastructure-old}/Pulumi.pulumi.io-staging.yaml (100%) rename {infrastructure => infrastructure-old}/Pulumi.yaml (100%) rename {infrastructure => infrastructure-old}/etag-workaround.md (100%) rename {infrastructure => infrastructure-old}/index.ts (100%) rename {infrastructure => infrastructure-old}/package.json (100%) rename {infrastructure => infrastructure-old}/tsconfig.json (100%) rename {infrastructure => infrastructure-old}/tslint.json (100%) rename {infrastructure => infrastructure-old}/yarn.lock (100%) diff --git a/infrastructure/.gitignore b/infrastructure-old/.gitignore similarity index 100% rename from infrastructure/.gitignore rename to infrastructure-old/.gitignore diff --git a/infrastructure/Pulumi.pulumi.io-fusion.yaml b/infrastructure-old/Pulumi.pulumi.io-fusion.yaml similarity index 100% rename from infrastructure/Pulumi.pulumi.io-fusion.yaml rename to infrastructure-old/Pulumi.pulumi.io-fusion.yaml diff --git a/infrastructure/Pulumi.pulumi.io-hugo.yaml b/infrastructure-old/Pulumi.pulumi.io-hugo.yaml similarity index 100% rename from infrastructure/Pulumi.pulumi.io-hugo.yaml rename to infrastructure-old/Pulumi.pulumi.io-hugo.yaml diff --git a/infrastructure/Pulumi.pulumi.io-production.yaml b/infrastructure-old/Pulumi.pulumi.io-production.yaml similarity index 100% rename from infrastructure/Pulumi.pulumi.io-production.yaml rename to infrastructure-old/Pulumi.pulumi.io-production.yaml diff --git a/infrastructure/Pulumi.pulumi.io-staging.yaml b/infrastructure-old/Pulumi.pulumi.io-staging.yaml similarity index 100% rename from infrastructure/Pulumi.pulumi.io-staging.yaml rename to infrastructure-old/Pulumi.pulumi.io-staging.yaml diff --git a/infrastructure/Pulumi.yaml b/infrastructure-old/Pulumi.yaml similarity index 100% rename from infrastructure/Pulumi.yaml rename to infrastructure-old/Pulumi.yaml diff --git a/infrastructure/etag-workaround.md b/infrastructure-old/etag-workaround.md similarity index 100% rename from infrastructure/etag-workaround.md rename to infrastructure-old/etag-workaround.md diff --git a/infrastructure/index.ts b/infrastructure-old/index.ts similarity index 100% rename from infrastructure/index.ts rename to infrastructure-old/index.ts diff --git a/infrastructure/package.json b/infrastructure-old/package.json similarity index 100% rename from infrastructure/package.json rename to infrastructure-old/package.json diff --git a/infrastructure/tsconfig.json b/infrastructure-old/tsconfig.json similarity index 100% rename from infrastructure/tsconfig.json rename to infrastructure-old/tsconfig.json diff --git a/infrastructure/tslint.json b/infrastructure-old/tslint.json similarity index 100% rename from infrastructure/tslint.json rename to infrastructure-old/tslint.json diff --git a/infrastructure/yarn.lock b/infrastructure-old/yarn.lock similarity index 100% rename from infrastructure/yarn.lock rename to infrastructure-old/yarn.lock From 6d21b9cd065746215352dcd23114bc8f880015f1 Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Mon, 1 Jul 2019 21:27:15 -0700 Subject: [PATCH 2/8] Add new 'www.pulumi.com' infrastructure folder --- infrastructure/.gitignore | 2 + infrastructure/Pulumi.staging.yaml | 5 + infrastructure/Pulumi.yaml | 3 + infrastructure/index.ts | 285 +++++++++ infrastructure/package.json | 20 + infrastructure/tsconfig.json | 24 + infrastructure/tslint.json | 128 ++++ infrastructure/yarn.lock | 950 +++++++++++++++++++++++++++++ 8 files changed, 1417 insertions(+) create mode 100644 infrastructure/.gitignore create mode 100644 infrastructure/Pulumi.staging.yaml create mode 100644 infrastructure/Pulumi.yaml create mode 100644 infrastructure/index.ts create mode 100644 infrastructure/package.json create mode 100644 infrastructure/tsconfig.json create mode 100644 infrastructure/tslint.json create mode 100644 infrastructure/yarn.lock diff --git a/infrastructure/.gitignore b/infrastructure/.gitignore new file mode 100644 index 000000000000..c6958891dd23 --- /dev/null +++ b/infrastructure/.gitignore @@ -0,0 +1,2 @@ +/bin/ +/node_modules/ diff --git a/infrastructure/Pulumi.staging.yaml b/infrastructure/Pulumi.staging.yaml new file mode 100644 index 000000000000..a4a8819725c1 --- /dev/null +++ b/infrastructure/Pulumi.staging.yaml @@ -0,0 +1,5 @@ +config: + aws:region: us-west-2 + www.pulumi.com:certificateArn: arn:aws:acm:us-east-1:098437015098:certificate/cfd6fb87-c9d2-48f6-b24b-753eb23834f7 + www.pulumi.com:pathToWebsiteContents: ../public + www.pulumi.com:targetDomain: www-staging.pulumi.com diff --git a/infrastructure/Pulumi.yaml b/infrastructure/Pulumi.yaml new file mode 100644 index 000000000000..795e7a0a95ed --- /dev/null +++ b/infrastructure/Pulumi.yaml @@ -0,0 +1,3 @@ +name: www.pulumi.com +description: www.pulumi.com, all things Pulumi! +runtime: nodejs diff --git a/infrastructure/index.ts b/infrastructure/index.ts new file mode 100644 index 000000000000..ff4a5a903411 --- /dev/null +++ b/infrastructure/index.ts @@ -0,0 +1,285 @@ +import * as aws from "@pulumi/aws"; +import * as pulumi from "@pulumi/pulumi"; + +import * as fs from "fs"; +import * as mime from "mime"; +import * as path from "path"; + +const stackConfig = new pulumi.Config() + +const config = { + // pathToWebsiteContents is a relative path to the website's contents. + pathToWebsiteContents: stackConfig.require("pathToWebsiteContents"), + // targetDomain is the domain/host to serve content at. + targetDomain: stackConfig.require("targetDomain"), + // alias is an optional domain alias the CDN will support as well. + alias: stackConfig.get("alias") || undefined, + // ACM certificate for the target domain. Must be in the us-east-1 region. + certificateArn: stackConfig.require("certificateArn"), +}; + +// contentBucket stores the static content to be served via the CDN. +const contentBucket = new aws.s3.Bucket( + "contentBucket", + { + bucket: config.targetDomain, + acl: "public-read", + + // Have S3 serve its contents as if it were a website. This is how we get the right behavior + // for routes like "foo/", which S3 will automatically translate to "foo/index.html". + website: { + indexDocument: "index.html", + errorDocument: "404.html", + routingRules: JSON.stringify([{ + "Condition": { + "KeyPrefixEquals": "reference/pkg/nodejs/@pulumi/", + }, + "Redirect": { + "HostName": config.targetDomain, + "ReplaceKeyPrefixWith": "reference/pkg/nodejs/pulumi/", + }, + }]), + }, + }, + { + protect: false, + }); + +// contentBucket needs to have the "public-read" ACL so its contents can be ready by CloudFront and +// served. But we deny the s3:ListBucket permission to prevent unintended disclosure of the bucket's +// contents. +const denyListPolicyState: aws.s3.BucketPolicyArgs = { + bucket: contentBucket.bucket, + policy: contentBucket.arn.apply((arn: string) => JSON.stringify({ + Version: "2008-10-17", + Statement: [ + { + Effect: "Deny", + Principal: "*", + Action: "s3:ListBucket", + Resource: arn, + }, + ], + })), +}; +const denyListPolicy = new aws.s3.BucketPolicy("deny-list", denyListPolicyState); + +// logsBucket stores the request logs for incoming requests. +const logsBucket = new aws.s3.Bucket( + "requestLogs", + { + bucket: `${config.targetDomain}-logs`, + acl: "private", + }, + { + protect: true, + }); + +const oneMinute = 60; + +// distributionArgs configures the CloudFront distribution. Relevant documentation: +// https://www.terraform.io/docs/providers/aws/r/cloudfront_distribution.html +// https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html +// https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_cloudfront +const distributionArgs: aws.cloudfront.DistributionArgs = { + enabled: true, + aliases: (config.alias ? [ config.targetDomain, config.alias ] : [ config.targetDomain ]), + + // We only specify one origin for this distribution: the S3 content bucket. + origins: [ + { + originId: contentBucket.arn, + domainName: contentBucket.websiteEndpoint, + customOriginConfig: { + // > If your Amazon S3 bucket is configured as a website endpoint, [like we have here] you must specify HTTP Only. + // > Amazon S3 doesn't support HTTPS connections in that configuration. + // https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesOriginProtocolPolicy + originProtocolPolicy: "http-only", + httpPort: 80, + httpsPort: 443, + originSslProtocols: ["TLSv1.2"], + }, + }, + ], + + // Default object to serve when no path is given. + // https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/DefaultRootObject.html + defaultRootObject: "index.html", + + defaultCacheBehavior: { + targetOriginId: contentBucket.arn, + compress: true, + + viewerProtocolPolicy: "redirect-to-https", + + allowedMethods: ["GET", "HEAD", "OPTIONS"], + cachedMethods: ["GET", "HEAD", "OPTIONS"], + + // S3 doesn't need take any of these values into account when serving content. + forwardedValues: { + cookies: { + forward: "none", + }, + queryString: false, + }, + + minTtl: 0, + defaultTtl: oneMinute, + maxTtl: oneMinute, + }, + + // "All" is the most broad distribution, and also the most expensive. + // "100" is the least broad, and also the least expensive. + priceClass: "PriceClass_All", + + // Customize error pages. + // https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/custom-error-pages.html + customErrorResponses: [ + { + errorCode: 404, + responseCode: 404, + errorCachingMinTtl: oneMinute, + responsePagePath: "/404.html", + }, + ], + + restrictions: { + geoRestriction: { + restrictionType: "none", + }, + }, + + // CloudFront certs must be in us-east-1, just like API Gateway. + viewerCertificate: { + acmCertificateArn: config.certificateArn, + sslSupportMethod: "sni-only", + minimumProtocolVersion: "TLSv1.2_2018", + }, + + loggingConfig: { + bucket: logsBucket.bucketDomainName, + includeCookies: false, + prefix: `${config.targetDomain}/`, + }, +}; + +// NOTE: Sometimes updating the CloudFront distribution will fail with: +// "PreconditionFailed: The request failed because it didn't meet the preconditions in one or more +// request-header fields." +// +// This is due to https://github.com/pulumi/pulumi/issues/1449: +// Error "CloudFront ETag Out Of Sync" when externally modifying CloudFront resource +// +// For information on how to work around this error, see "CloudFront ETag Out Of Sync": +// https://pulumi.io/reference/known-issues.html +const cdn = new aws.cloudfront.Distribution( + "cdn", + distributionArgs, + { + protect: true, + dependsOn: [ contentBucket, logsBucket ], + }); + +// crawlDirectory recursive crawls the provided directory, applying the provided function +// to every file it contains. Doesn't handle cycles from symlinks. +function crawlDirectory(dir: string, f: (_: string) => void) { + const files = fs.readdirSync(dir); + for (const file of files) { + // Skip the `node_modules` and Ruby `vendor` directories. + if (file === "node_modules" || file === "vendor" || file === "package-lock.json") { + continue; + } + + const filePath = `${dir}/${file}`; + const stat = fs.statSync(filePath); + if (stat.isDirectory()) { + crawlDirectory(filePath, f); + } + if (stat.isFile()) { + f(filePath); + } + } +} + +// Some files do not get the correct mime/type inferred from the mime package, and we +// need to set our own. +function getMimeType(filePath: string): string | null { + // Ensure that latest-version's mime type is always text/plain. Otherwise it + // will end up being set to binary/octet-stream, which is not what we want. + if (path.basename(filePath) === "latest-version") { + return "text/plain"; + } + + return mime.getType(filePath); +} + +// Sync the contents of the source directory with the S3 bucket, which will in-turn show up on the CDN. +const webContentsRootPath = path.join(process.cwd(), config.pathToWebsiteContents); +console.log("Syncing contents from local disk at", webContentsRootPath); +crawlDirectory( + webContentsRootPath, + (filePath: string) => { + const relativeFilePath = filePath.replace(webContentsRootPath + "/", ""); + const contentFile = new aws.s3.BucketObject( + relativeFilePath, + { + acl: "public-read", + key: relativeFilePath, + bucket: contentBucket, + source: new pulumi.asset.FileAsset(filePath), + contentType: getMimeType(filePath) || undefined, + }, + { + parent: contentBucket, + }); + }); + +// Split a domain name into its subdomain and parent domain names. +// e.g. "www.example.com" => "www", "example.com". +function getDomainAndSubdomain(domain: string): { subdomain: string, parentDomain: string} { + const parts = domain.split("."); + if (parts.length < 2) { + throw new Error(`No TLD found on ${domain}`); + } + if (parts.length === 2) { + return { + subdomain: "", + parentDomain: domain + ".", + }; + } + + const subdomain = parts[0]; + parts.shift(); // Drop first element. + return { + subdomain, + // Trailing "." to canonicalize. + parentDomain: parts.join(".") + ".", + }; +} + +// Creates a new Route53 DNS record pointing the domain to the CloudFront distribution. +async function createAliasRecord( + targetDomain: string, distribution: aws.cloudfront.Distribution): Promise { + const domainParts = getDomainAndSubdomain(targetDomain); + const hostedZone = await aws.route53.getZone({ name: domainParts.parentDomain }); + return new aws.route53.Record( + targetDomain, + { + name: domainParts.subdomain, + zoneId: hostedZone.zoneId, + type: "A", + aliases: [ + { + name: distribution.domainName, + zoneId: distribution.hostedZoneId, + evaluateTargetHealth: true, + }, + ], + }); +} +const aRecord = createAliasRecord(config.targetDomain, cdn); + +export const contentBucketUri = contentBucket.bucket.apply(b => `s3://${b}`); +export const contentBucketWebsiteDomain = contentBucket.websiteDomain; +export const contentBucketWebsiteEndpoint = contentBucket.websiteEndpoint; +export const cloudFrontDomain = cdn.domainName; diff --git a/infrastructure/package.json b/infrastructure/package.json new file mode 100644 index 000000000000..ad24f2a9e636 --- /dev/null +++ b/infrastructure/package.json @@ -0,0 +1,20 @@ +{ + "name": "www.pulumi.com", + "main": "bin/index.js", + "typings": "bin/index.d.ts", + "scripts": { + "build": "tsc", + "lint": "tslint --project tsconfig.json" + }, + "devDependencies": { + "tslint": "^5.10.0", + "typescript": "^2.7.2", + "@types/mime": "^2.0.0", + "@types/node": "latest" + }, + "dependencies": { + "mime": "^2.0.3", + "@pulumi/pulumi": "^0.16.0", + "@pulumi/aws": "^0.16.0" + } +} diff --git a/infrastructure/tsconfig.json b/infrastructure/tsconfig.json new file mode 100644 index 000000000000..2ea71672d37e --- /dev/null +++ b/infrastructure/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "outDir": "bin", + "target": "es6", + "lib": [ + "es6" + ], + "module": "commonjs", + "moduleResolution": "node", + "declaration": true, + "sourceMap": true, + "stripInternal": true, + "experimentalDecorators": true, + "pretty": true, + "noFallthroughCasesInSwitch": true, + "noImplicitAny": true, + "noImplicitReturns": true, + "forceConsistentCasingInFileNames": true, + "strictNullChecks": true + }, + "files": [ + "index.ts" + ] +} diff --git a/infrastructure/tslint.json b/infrastructure/tslint.json new file mode 100644 index 000000000000..2171ee6c2e4c --- /dev/null +++ b/infrastructure/tslint.json @@ -0,0 +1,128 @@ +{ + "rules": { + "align": [ + true, + "parameters", + "arguments", + "statements" + ], + "ban": false, + "class-name": true, + "comment-format": [ + true, + "check-space" + ], + "curly": true, + "eofline": true, + "file-header": [ + true, + "Copyright 2016-\\d{4}, Pulumi Corporation. All rights reserved." + ], + "forin": true, + "indent": [ + true, + "spaces" + ], + "interface-name": false, + "jsdoc-format": false, + "label-position": true, + "max-line-length": [ + true, + 120 + ], + "member-access": false, + "member-ordering": [ + true, + "static-before-instance", + "variables-before-functions" + ], + "no-any": false, + "no-arg": true, + "no-bitwise": false, + "no-conditional-assignment": false, + "no-consecutive-blank-lines": false, + "no-console": [ + true, + "debug", + "info", + "time", + "timeEnd", + "trace" + ], + "no-construct": true, + "no-debugger": true, + "no-duplicate-variable": true, + "no-empty": true, + "no-eval": true, + "no-inferrable-types": false, + "no-internal-module": true, + "no-parameter-properties": false, + "no-require-imports": false, + "no-shadowed-variable": true, + "no-string-literal": false, + "no-switch-case-fall-through": true, + "no-trailing-whitespace": true, + "no-unused-expression": true, + "no-use-before-declare": false, + "no-var-keyword": true, + "no-var-requires": false, + "object-literal-sort-keys": false, + "one-line": [ + true, + "check-open-brace", + "check-whitespace" + ], + "ordered-imports": true, + "quotemark": [ + true, + "double", + "avoid-escape" + ], + "radix": true, + "semicolon": true, + "switch-default": true, + "trailing-comma": [ + true, + { + "multiline": "always", + "singleline": "never" + } + ], + "triple-equals": [ + true, + "allow-null-check" + ], + "typedef": [ + false, + "call-signature", + "parameter", + "property-declaration", + "variable-declaration", + "member-variable-declaration" + ], + "typedef-whitespace": [ + true, + { + "call-signature": "nospace", + "index-signature": "nospace", + "parameter": "nospace", + "property-declaration": "nospace", + "variable-declaration": "nospace" + } + ], + "variable-name": [ + true, + "check-format", + "allow-leading-underscore", + "ban-keywords" + ], + "whitespace": [ + true, + "check-branch", + "check-decl", + "check-module", + "check-separator", + "check-type" + ] + } +} diff --git a/infrastructure/yarn.lock b/infrastructure/yarn.lock new file mode 100644 index 000000000000..8f3395552e9d --- /dev/null +++ b/infrastructure/yarn.lock @@ -0,0 +1,950 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@protobufjs/aspromise/-/aspromise-1.1.2.tgz#9b8b0cc663d669a7d8f6f5d0893a14d348f30fbf" + +"@protobufjs/base64@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@protobufjs/base64/-/base64-1.1.2.tgz#4c85730e59b9a1f1f349047dbf24296034bb2735" + +"@protobufjs/codegen@^2.0.4": + version "2.0.4" + resolved "https://registry.yarnpkg.com/@protobufjs/codegen/-/codegen-2.0.4.tgz#7ef37f0d010fb028ad1ad59722e506d9262815cb" + +"@protobufjs/eventemitter@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz#355cbc98bafad5978f9ed095f397621f1d066b70" + +"@protobufjs/fetch@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/fetch/-/fetch-1.1.0.tgz#ba99fb598614af65700c1619ff06d454b0d84c45" + dependencies: + "@protobufjs/aspromise" "^1.1.1" + "@protobufjs/inquire" "^1.1.0" + +"@protobufjs/float@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@protobufjs/float/-/float-1.0.2.tgz#5e9e1abdcb73fc0a7cb8b291df78c8cbd97b87d1" + +"@protobufjs/inquire@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/inquire/-/inquire-1.1.0.tgz#ff200e3e7cf2429e2dcafc1140828e8cc638f089" + +"@protobufjs/path@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@protobufjs/path/-/path-1.1.2.tgz#6cc2b20c5c9ad6ad0dccfd21ca7673d8d7fbf68d" + +"@protobufjs/pool@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/pool/-/pool-1.1.0.tgz#09fd15f2d6d3abfa9b65bc366506d6ad7846ff54" + +"@protobufjs/utf8@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570" + +"@pulumi/aws@^0.16.0": + version "0.16.0" + resolved "https://registry.yarnpkg.com/@pulumi/aws/-/aws-0.16.0.tgz#972d2bec2e041a88c523a7a5cce975da86f06a74" + dependencies: + "@pulumi/pulumi" "^0.16.0" + builtin-modules "3.0.0" + mime "^2.0.0" + read-package-tree "^5.2.1" + resolve "^1.7.1" + +"@pulumi/pulumi@^0.16.0": + version "0.16.0" + resolved "https://registry.yarnpkg.com/@pulumi/pulumi/-/pulumi-0.16.0.tgz#8c199cadffe93d5407bfbf19fbe1e41a39b01bcc" + dependencies: + google-protobuf "^3.5.0" + grpc "^1.12.2" + minimist "^1.2.0" + normalize-package-data "^2.4.0" + protobufjs "^6.8.6" + read-package-tree "^5.2.1" + require-from-string "^2.0.1" + source-map-support "^0.4.16" + ts-node "^7.0.0" + typescript "^3.0.0" + upath "^1.1.0" + +"@types/long@^3.0.32": + version "3.0.32" + resolved "https://registry.yarnpkg.com/@types/long/-/long-3.0.32.tgz#f4e5af31e9e9b196d8e5fca8a5e2e20aa3d60b69" + +"@types/mime@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@types/mime/-/mime-2.0.0.tgz#5a7306e367c539b9f6543499de8dd519fac37a8b" + +"@types/node@^8.9.4": + version "8.10.18" + resolved "https://registry.yarnpkg.com/@types/node/-/node-8.10.18.tgz#eb9ad8b0723d13fa9bc8b42543e3661ed805f2bb" + +"@types/node@latest": + version "10.3.1" + resolved "https://registry.yarnpkg.com/@types/node/-/node-10.3.1.tgz#51092fbacaed768a122a293814474fbf6e5e8b6d" + +abbrev@1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" + +ansi-regex@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + +ansi-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" + +ansi-styles@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + +ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + dependencies: + color-convert "^1.9.0" + +aproba@^1.0.3: + version "1.2.0" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" + +are-we-there-yet@~1.1.2: + version "1.1.5" + resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21" + dependencies: + delegates "^1.0.0" + readable-stream "^2.0.6" + +argparse@^1.0.7: + version "1.0.10" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + dependencies: + sprintf-js "~1.0.2" + +arrify@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" + +asap@^2.0.0: + version "2.0.6" + resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" + +ascli@~1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/ascli/-/ascli-1.0.1.tgz#bcfa5974a62f18e81cabaeb49732ab4a88f906bc" + dependencies: + colour "~0.7.1" + optjs "~3.2.2" + +babel-code-frame@^6.22.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" + dependencies: + chalk "^1.1.3" + esutils "^2.0.2" + js-tokens "^3.0.2" + +balanced-match@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +buffer-from@^1.0.0, buffer-from@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" + +builtin-modules@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-3.0.0.tgz#1e587d44b006620d90286cc7a9238bbc6129cab1" + +builtin-modules@^1.0.0, builtin-modules@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" + +bytebuffer@~5: + version "5.0.1" + resolved "https://registry.yarnpkg.com/bytebuffer/-/bytebuffer-5.0.1.tgz#582eea4b1a873b6d020a48d58df85f0bba6cfddd" + dependencies: + long "~3" + +camelcase@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f" + +chalk@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + dependencies: + ansi-styles "^2.2.1" + escape-string-regexp "^1.0.2" + has-ansi "^2.0.0" + strip-ansi "^3.0.0" + supports-color "^2.0.0" + +chalk@^2.3.0: + version "2.4.1" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +chownr@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.0.1.tgz#e2a75042a9551908bebd25b8523d5f9769d79181" + +cliui@^3.0.3: + version "3.2.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + wrap-ansi "^2.0.0" + +code-point-at@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" + +color-convert@^1.9.0: + version "1.9.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.1.tgz#c1261107aeb2f294ebffec9ed9ecad529a6097ed" + dependencies: + color-name "^1.1.1" + +color-name@^1.1.1: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + +colour@~0.7.1: + version "0.7.1" + resolved "https://registry.yarnpkg.com/colour/-/colour-0.7.1.tgz#9cb169917ec5d12c0736d3e8685746df1cadf778" + +commander@^2.12.1: + version "2.15.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f" + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + +console-control-strings@^1.0.0, console-control-strings@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" + +core-util-is@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + +debug@^2.1.2: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + dependencies: + ms "2.0.0" + +debuglog@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492" + +decamelize@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + +deep-extend@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" + +delegates@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" + +detect-libc@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" + +dezalgo@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/dezalgo/-/dezalgo-1.0.3.tgz#7f742de066fc748bc8db820569dddce49bf0d456" + dependencies: + asap "^2.0.0" + wrappy "1" + +diff@^3.1.0, diff@^3.2.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" + +escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + +esprima@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804" + +esutils@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" + +fs-minipass@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.5.tgz#06c277218454ec288df77ada54a03b8702aacb9d" + dependencies: + minipass "^2.2.1" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + +gauge@~2.7.3: + version "2.7.4" + resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" + dependencies: + aproba "^1.0.3" + console-control-strings "^1.0.0" + has-unicode "^2.0.0" + object-assign "^4.1.0" + signal-exit "^3.0.0" + string-width "^1.0.1" + strip-ansi "^3.0.1" + wide-align "^1.1.0" + +glob@^7.0.5, glob@^7.1.1: + version "7.1.2" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +google-protobuf@^3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/google-protobuf/-/google-protobuf-3.5.0.tgz#b8cc63c74d83457bd8a9a904503c8efb26bca339" + +graceful-fs@^4.1.2: + version "4.1.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" + +grpc@^1.12.2: + version "1.14.0" + resolved "https://registry.yarnpkg.com/grpc/-/grpc-1.14.0.tgz#5aea131ef078285eff543301b99ba994e4db2c73" + dependencies: + lodash "^4.17.5" + nan "^2.0.0" + node-pre-gyp "^0.10.0" + protobufjs "^5.0.3" + +has-ansi@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + dependencies: + ansi-regex "^2.0.0" + +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + +has-unicode@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" + +hosted-git-info@^2.1.4: + version "2.7.1" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.7.1.tgz#97f236977bd6e125408930ff6de3eec6281ec047" + +iconv-lite@^0.4.4: + version "0.4.23" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.23.tgz#297871f63be507adcfbfca715d0cd0eed84e9a63" + dependencies: + safer-buffer ">= 2.1.2 < 3" + +ignore-walk@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.1.tgz#a83e62e7d272ac0e3b551aaa82831a19b69f82f8" + dependencies: + minimatch "^3.0.4" + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@~2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + +ini@~1.3.0: + version "1.3.5" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" + +invert-kv@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" + +is-builtin-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe" + dependencies: + builtin-modules "^1.0.0" + +is-fullwidth-code-point@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" + dependencies: + number-is-nan "^1.0.0" + +is-fullwidth-code-point@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + +isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + +js-tokens@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" + +js-yaml@^3.7.0: + version "3.12.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.12.0.tgz#eaed656ec8344f10f527c6bfa1b6e2244de167d1" + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + +json-parse-better-errors@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" + +lcid@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" + dependencies: + invert-kv "^1.0.0" + +lodash@^4.17.5: + version "4.17.10" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7" + +long@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/long/-/long-4.0.0.tgz#9a7b71cfb7d361a194ea555241c92f7468d5bf28" + +long@~3: + version "3.2.0" + resolved "https://registry.yarnpkg.com/long/-/long-3.2.0.tgz#d821b7138ca1cb581c172990ef14db200b5c474b" + +make-error@^1.1.1: + version "1.3.4" + resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.4.tgz#19978ed575f9e9545d2ff8c13e33b5d18a67d535" + +mime@^2.0.0, mime@^2.0.3: + version "2.3.1" + resolved "https://registry.yarnpkg.com/mime/-/mime-2.3.1.tgz#b1621c54d63b97c47d3cfe7f7215f7d64517c369" + +minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + dependencies: + brace-expansion "^1.1.7" + +minimist@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + +minimist@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + +minipass@^2.2.1, minipass@^2.3.3: + version "2.3.3" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.3.3.tgz#a7dcc8b7b833f5d368759cce544dccb55f50f233" + dependencies: + safe-buffer "^5.1.2" + yallist "^3.0.0" + +minizlib@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.1.0.tgz#11e13658ce46bc3a70a267aac58359d1e0c29ceb" + dependencies: + minipass "^2.2.1" + +mkdirp@^0.5.0, mkdirp@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + dependencies: + minimist "0.0.8" + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + +nan@^2.0.0: + version "2.10.0" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.10.0.tgz#96d0cd610ebd58d4b4de9cc0c6828cda99c7548f" + +needle@^2.2.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/needle/-/needle-2.2.1.tgz#b5e325bd3aae8c2678902fa296f729455d1d3a7d" + dependencies: + debug "^2.1.2" + iconv-lite "^0.4.4" + sax "^1.2.4" + +node-pre-gyp@^0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.10.0.tgz#6e4ef5bb5c5203c6552448828c852c40111aac46" + dependencies: + detect-libc "^1.0.2" + mkdirp "^0.5.1" + needle "^2.2.0" + nopt "^4.0.1" + npm-packlist "^1.1.6" + npmlog "^4.0.2" + rc "^1.1.7" + rimraf "^2.6.1" + semver "^5.3.0" + tar "^4" + +nopt@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" + dependencies: + abbrev "1" + osenv "^0.1.4" + +normalize-package-data@^2.0.0, normalize-package-data@^2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f" + dependencies: + hosted-git-info "^2.1.4" + is-builtin-module "^1.0.0" + semver "2 || 3 || 4 || 5" + validate-npm-package-license "^3.0.1" + +npm-bundled@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.3.tgz#7e71703d973af3370a9591bafe3a63aca0be2308" + +npm-packlist@^1.1.6: + version "1.1.10" + resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.1.10.tgz#1039db9e985727e464df066f4cf0ab6ef85c398a" + dependencies: + ignore-walk "^3.0.1" + npm-bundled "^1.0.1" + +npmlog@^4.0.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" + dependencies: + are-we-there-yet "~1.1.2" + console-control-strings "~1.1.0" + gauge "~2.7.3" + set-blocking "~2.0.0" + +number-is-nan@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + +object-assign@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + +once@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + dependencies: + wrappy "1" + +optjs@~3.2.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/optjs/-/optjs-3.2.2.tgz#69a6ce89c442a44403141ad2f9b370bd5bb6f4ee" + +os-homedir@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + +os-locale@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" + dependencies: + lcid "^1.0.0" + +os-tmpdir@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + +osenv@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.0" + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + +path-parse@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" + +process-nextick-args@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa" + +protobufjs@^5.0.3: + version "5.0.3" + resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-5.0.3.tgz#e4dfe9fb67c90b2630d15868249bcc4961467a17" + dependencies: + ascli "~1" + bytebuffer "~5" + glob "^7.0.5" + yargs "^3.10.0" + +protobufjs@^6.8.6: + version "6.8.6" + resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-6.8.6.tgz#ce3cf4fff9625b62966c455fc4c15e4331a11ca2" + dependencies: + "@protobufjs/aspromise" "^1.1.2" + "@protobufjs/base64" "^1.1.2" + "@protobufjs/codegen" "^2.0.4" + "@protobufjs/eventemitter" "^1.1.0" + "@protobufjs/fetch" "^1.1.0" + "@protobufjs/float" "^1.0.2" + "@protobufjs/inquire" "^1.1.0" + "@protobufjs/path" "^1.1.2" + "@protobufjs/pool" "^1.1.0" + "@protobufjs/utf8" "^1.1.0" + "@types/long" "^3.0.32" + "@types/node" "^8.9.4" + long "^4.0.0" + +rc@^1.1.7: + version "1.2.8" + resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" + dependencies: + deep-extend "^0.6.0" + ini "~1.3.0" + minimist "^1.2.0" + strip-json-comments "~2.0.1" + +read-package-json@^2.0.0: + version "2.0.13" + resolved "https://registry.yarnpkg.com/read-package-json/-/read-package-json-2.0.13.tgz#2e82ebd9f613baa6d2ebe3aa72cefe3f68e41f4a" + dependencies: + glob "^7.1.1" + json-parse-better-errors "^1.0.1" + normalize-package-data "^2.0.0" + slash "^1.0.0" + optionalDependencies: + graceful-fs "^4.1.2" + +read-package-tree@^5.2.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/read-package-tree/-/read-package-tree-5.2.1.tgz#6218b187d6fac82289ce4387bbbaf8eef536ad63" + dependencies: + debuglog "^1.0.1" + dezalgo "^1.0.0" + once "^1.3.0" + read-package-json "^2.0.0" + readdir-scoped-modules "^1.0.0" + +readable-stream@^2.0.6: + version "2.3.6" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.1.1" + util-deprecate "~1.0.1" + +readdir-scoped-modules@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/readdir-scoped-modules/-/readdir-scoped-modules-1.0.2.tgz#9fafa37d286be5d92cbaebdee030dc9b5f406747" + dependencies: + debuglog "^1.0.1" + dezalgo "^1.0.0" + graceful-fs "^4.1.2" + once "^1.3.0" + +require-from-string@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" + +resolve@^1.3.2: + version "1.7.1" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.7.1.tgz#aadd656374fd298aee895bc026b8297418677fd3" + dependencies: + path-parse "^1.0.5" + +resolve@^1.7.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.8.1.tgz#82f1ec19a423ac1fbd080b0bab06ba36e84a7a26" + dependencies: + path-parse "^1.0.5" + +rimraf@^2.6.1: + version "2.6.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" + dependencies: + glob "^7.0.5" + +safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + +"safer-buffer@>= 2.1.2 < 3": + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + +sax@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" + +"semver@2 || 3 || 4 || 5", semver@^5.3.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" + +set-blocking@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + +signal-exit@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" + +slash@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" + +source-map-support@^0.4.16: + version "0.4.18" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.18.tgz#0286a6de8be42641338594e97ccea75f0a2c585f" + dependencies: + source-map "^0.5.6" + +source-map-support@^0.5.6: + version "0.5.8" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.8.tgz#04f5581713a8a65612d0175fbf3a01f80a162613" + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map@^0.5.6: + version "0.5.7" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" + +source-map@^0.6.0: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + +spdx-correct@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.0.0.tgz#05a5b4d7153a195bc92c3c425b69f3b2a9524c82" + dependencies: + spdx-expression-parse "^3.0.0" + spdx-license-ids "^3.0.0" + +spdx-exceptions@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz#2c7ae61056c714a5b9b9b2b2af7d311ef5c78fe9" + +spdx-expression-parse@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz#99e119b7a5da00e05491c9fa338b7904823b41d0" + dependencies: + spdx-exceptions "^2.1.0" + spdx-license-ids "^3.0.0" + +spdx-license-ids@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz#7a7cd28470cc6d3a1cfe6d66886f6bc430d3ac87" + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + +string-width@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + strip-ansi "^3.0.0" + +"string-width@^1.0.2 || 2": + version "2.1.1" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" + dependencies: + is-fullwidth-code-point "^2.0.0" + strip-ansi "^4.0.0" + +string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + dependencies: + safe-buffer "~5.1.0" + +strip-ansi@^3.0.0, strip-ansi@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + dependencies: + ansi-regex "^2.0.0" + +strip-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + dependencies: + ansi-regex "^3.0.0" + +strip-json-comments@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + +supports-color@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + +supports-color@^5.3.0: + version "5.4.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.4.0.tgz#1c6b337402c2137605efe19f10fec390f6faab54" + dependencies: + has-flag "^3.0.0" + +tar@^4: + version "4.4.4" + resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.4.tgz#ec8409fae9f665a4355cc3b4087d0820232bb8cd" + dependencies: + chownr "^1.0.1" + fs-minipass "^1.2.5" + minipass "^2.3.3" + minizlib "^1.1.0" + mkdirp "^0.5.0" + safe-buffer "^5.1.2" + yallist "^3.0.2" + +ts-node@^7.0.0: + version "7.0.1" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-7.0.1.tgz#9562dc2d1e6d248d24bc55f773e3f614337d9baf" + dependencies: + arrify "^1.0.0" + buffer-from "^1.1.0" + diff "^3.1.0" + make-error "^1.1.1" + minimist "^1.2.0" + mkdirp "^0.5.1" + source-map-support "^0.5.6" + yn "^2.0.0" + +tslib@^1.8.0, tslib@^1.8.1: + version "1.9.2" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.2.tgz#8be0cc9a1f6dc7727c38deb16c2ebd1a2892988e" + +tslint@^5.10.0: + version "5.10.0" + resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.10.0.tgz#11e26bccb88afa02dd0d9956cae3d4540b5f54c3" + dependencies: + babel-code-frame "^6.22.0" + builtin-modules "^1.1.1" + chalk "^2.3.0" + commander "^2.12.1" + diff "^3.2.0" + glob "^7.1.1" + js-yaml "^3.7.0" + minimatch "^3.0.4" + resolve "^1.3.2" + semver "^5.3.0" + tslib "^1.8.0" + tsutils "^2.12.1" + +tsutils@^2.12.1: + version "2.27.1" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.27.1.tgz#ab0276ac23664f36ce8fd4414daec4aebf4373ee" + dependencies: + tslib "^1.8.1" + +typescript@^2.7.2: + version "2.9.1" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.9.1.tgz#fdb19d2c67a15d11995fd15640e373e09ab09961" + +typescript@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.0.1.tgz#43738f29585d3a87575520a4b93ab6026ef11fdb" + +upath@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/upath/-/upath-1.1.0.tgz#35256597e46a581db4793d0ce47fa9aebfc9fabd" + +util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + +validate-npm-package-license@^3.0.1: + version "3.0.4" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" + dependencies: + spdx-correct "^3.0.0" + spdx-expression-parse "^3.0.0" + +wide-align@^1.1.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" + dependencies: + string-width "^1.0.2 || 2" + +window-size@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.4.tgz#f8e1aa1ee5a53ec5bf151ffa09742a6ad7697876" + +wrap-ansi@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + +y18n@^3.2.0: + version "3.2.1" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" + +yallist@^3.0.0, yallist@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.2.tgz#8452b4bb7e83c7c188d8041c1a837c773d6d8bb9" + +yargs@^3.10.0: + version "3.32.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.32.0.tgz#03088e9ebf9e756b69751611d2a5ef591482c995" + dependencies: + camelcase "^2.0.1" + cliui "^3.0.3" + decamelize "^1.1.1" + os-locale "^1.4.0" + string-width "^1.0.1" + window-size "^0.1.4" + y18n "^3.2.0" + +yn@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/yn/-/yn-2.0.0.tgz#e5adabc8acf408f6385fc76495684c88e6af689a" From d5a2f77f27c104d26fd97903862f4dc36d57f4f7 Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Mon, 1 Jul 2019 21:28:09 -0700 Subject: [PATCH 3/8] Scripts to hook up to CI/CD --- .travis.yml | 19 +++++---- Makefile | 68 ++++++------------------------ ci/aws/config | 9 ++++ infrastructure/Pulumi.staging.yaml | 2 +- scripts/create_short_url.sh | 53 ----------------------- scripts/preview.sh | 37 ---------------- scripts/run-pulumi.sh | 36 ++++++++++++++++ scripts/travisqueue.sh | 32 -------------- scripts/update.sh | 37 ---------------- 9 files changed, 68 insertions(+), 225 deletions(-) create mode 100644 ci/aws/config delete mode 100755 scripts/create_short_url.sh delete mode 100755 scripts/preview.sh create mode 100755 scripts/run-pulumi.sh delete mode 100755 scripts/travisqueue.sh delete mode 100755 scripts/update.sh diff --git a/.travis.yml b/.travis.yml index 06c3a994f9af..6228479096d3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,15 +1,17 @@ -language: generic -dist: xenial +language: go +go: 1.12 branches: only: - master - production - fusion before_install: -# Use travisqueue to manage build concurrency. -- ./scripts/travisqueue.sh install -- ./scripts/travisqueue.sh start # Download and install required tools. +# Install assume-role tool for use when deploying +- go get -u github.com/remind101/assume-role +# Copy over aws config which contains roles to use during deployment +- mkdir ~/.aws +- cp ./ci/aws/config ~/.aws/config # AWS CLI - pip install --upgrade --user awscli # pulumi @@ -26,7 +28,6 @@ before_install: script: - echo "TRAVIS_EVENT_TYPE=${TRAVIS_EVENT_TYPE}" - make travis_${TRAVIS_EVENT_TYPE} -after_script: -- ./scripts/travisqueue.sh finish -notifications: - webhooks: https://ufci1w66n3.execute-api.us-west-2.amazonaws.com/stage/travis +# TODO: Reenable once kinks worked out. +# notifications: +# webhooks: https://ufci1w66n3.execute-api.us-west-2.amazonaws.com/stage/travis diff --git a/Makefile b/Makefile index 6a6e3da49548..7b6cca055789 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ all: banner generate build .PHONY: banner banner: @echo -e "\033[1;37m=========================\033[0m" - @echo -e "\033[1;37mPulumi Documentation Site\033[0m" + @echo -e "\033[1;37mPulumi Website \033[0m" @echo -e "\033[1;37m=========================\033[0m" .PHONY: ensure @@ -59,79 +59,35 @@ validate: $(MAKE) test pkill -f hugo -.PHONY: preview -preview: - @echo -e "\033[0;32mPREVIEW:\033[0m" -ifeq ($(TRAVIS_BRANCH),master) - ./scripts/preview.sh staging -endif -ifeq ($(TRAVIS_BRANCH),production) - ./scripts/preview.sh production -endif -ifeq ($(TRAVIS_BRANCH),fusion) - ./scripts/preview.sh fusion -endif - -.PHONY: deploy -deploy: - @echo -e "\033[0;32mDEPLOY:\033[0m" -ifeq ($(TRAVIS_BRANCH),master) - ./scripts/update.sh staging -endif -ifeq ($(TRAVIS_BRANCH),production) - ./scripts/update.sh production -endif -ifeq ($(TRAVIS_BRANCH),fusion) - ./scripts/update.sh fusion -endif - .PHONY: travis_push travis_push:: $(MAKE) banner $(MAKE) ensure -ifeq ($(TRAVIS_BRANCH),master) - HUGO_BASEURL=https://staging.pulumi.io/ $(MAKE) build -else ifeq ($(TRAVIS_BRANCH),fusion) - HUGO_BASEURL=https://fusion.pulumi.io/ $(MAKE) build +# NB. Replace with `master` after `fusion` branch merged. +ifeq ($(TRAVIS_BRANCH),fusion) + HUGO_BASEURL=https://www-staging.pulumi.com/ $(MAKE) build + ./scripts/run-pulumi.sh update staging else $(MAKE) build endif - $(MAKE) deploy .PHONY: travis_pull_request travis_pull_request:: $(MAKE) banner $(MAKE) ensure -ifeq ($(TRAVIS_BRANCH),master) - HUGO_BASEURL=https://staging.pulumi.io/ $(MAKE) build -else ifeq ($(TRAVIS_BRANCH),fusion) - HUGO_BASEURL=https://fusion.pulumi.io/ $(MAKE) build +# NB. Replace with `master` after `fusion` branch merged. +ifeq ($(TRAVIS_BRANCH),fusion) + HUGO_BASEURL=https://www-staging.pulumi.com/ $(MAKE) build + $(MAKE) validate + ./scripts/run-pulumi.sh preview staging else $(MAKE) build -endif $(MAKE) validate - $(MAKE) preview +endif .PHONY: travis_cron travis_cron:: $(MAKE) banner $(MAKE) ensure -ifeq ($(TRAVIS_BRANCH),master) - HUGO_BASEURL=https://staging.pulumi.io/ $(MAKE) build -else ifeq ($(TRAVIS_BRANCH),fusion) - HUGO_BASEURL=https://fusion.pulumi.io/ $(MAKE) build -else - $(MAKE) build -endif - -.PHONY: travis_api -travis_api:: - $(MAKE) banner - $(MAKE) ensure -ifeq ($(TRAVIS_BRANCH),master) - HUGO_BASEURL=https://staging.pulumi.io/ $(MAKE) build -else ifeq ($(TRAVIS_BRANCH),fusion) - HUGO_BASEURL=https://fusion.pulumi.io/ $(MAKE) build -else $(MAKE) build -endif + $(MAKE) validate diff --git a/ci/aws/config b/ci/aws/config new file mode 100644 index 000000000000..3719b66fed99 --- /dev/null +++ b/ci/aws/config @@ -0,0 +1,9 @@ +[default] +output = json +region = us-west-2 + +[profile pulumi-ci] +role_arn = arn:aws:iam::058607598222:role/ContinuousIntegrationRole +credential_source=Environment +duration_seconds=7200 +region = us-west-2 \ No newline at end of file diff --git a/infrastructure/Pulumi.staging.yaml b/infrastructure/Pulumi.staging.yaml index a4a8819725c1..c1d4b379f65b 100644 --- a/infrastructure/Pulumi.staging.yaml +++ b/infrastructure/Pulumi.staging.yaml @@ -1,5 +1,5 @@ config: aws:region: us-west-2 - www.pulumi.com:certificateArn: arn:aws:acm:us-east-1:098437015098:certificate/cfd6fb87-c9d2-48f6-b24b-753eb23834f7 + www.pulumi.com:certificateArn: arn:aws:acm:us-east-1:058607598222:certificate/a3f72a2b-e715-4639-b126-1e4efc0b634b www.pulumi.com:pathToWebsiteContents: ../public www.pulumi.com:targetDomain: www-staging.pulumi.com diff --git a/scripts/create_short_url.sh b/scripts/create_short_url.sh deleted file mode 100755 index 7602c29168fc..000000000000 --- a/scripts/create_short_url.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/env bash -# -# Create shortened URL targets (shortlinks) for links on the doc site. -# -# Shortlink definitions are created as markdown files in the /content/shortlinks directory. -# Each of these files contains a reference to the target link, and the desired -# shortlink that will redirect to the target. In the common case, the shortlink -# is a randomly generated string, but a specific shortlink can also be specified. -# Note that the shortlink must include a trailing / for the redirection to work correctly. - -set -o errexit -o pipefail -cd "$(dirname "${BASH_SOURCE}")/.." - -if [[ $# -ne 2 && $# -ne 3 ]]; then - cat << EOF -Usage: $(basename $0) [shortlink] - -Example: $(basename $0) /reference/troubleshooting#ingress-status-loadbalancer k8s-ingress-lbstatus - -/shortlinks/k8s-ingress-lbstatus.md ---- -redirect_to: /reference/troubleshooting.html#ingress-status-loadbalancer -url: / ---- -EOF - exit 1 -fi - -TARGET_LINK=$1 -FILENAME=$2 -SHORTLINK=$3 - -# If shortlink not provided, generate a random 6-character alphanumeric link -if [[ ! ${SHORTLINK} ]]; then - PERMALINK="$(LC_ALL=C tr -dc 'a-z0-9' "${FILEPATH}" ---- -redirect_to: ${TARGET_LINK} -url: ${PERMALINK}/ ---- -EOF - -cat << EOF -Created shortlink definition at ${FILEPATH} -https://pulumi.io/${PERMALINK} --> https://pulumi.io${TARGET_LINK} -EOF diff --git a/scripts/preview.sh b/scripts/preview.sh deleted file mode 100755 index a2e03c9360f6..000000000000 --- a/scripts/preview.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash - -set -o errexit -o pipefail -cd "$(dirname "${BASH_SOURCE}")/.." - -if [ -z ${1:-} ]; then - echo "Usage: $0 [ staging | production ]" - exit 1 -fi - -# Environment being updated (production, staging, etc.) -export ENVIRONMENT=${1} - -# Each environment is running in a different AWS account, so we determine the -# credentials to use based on environment. Set in the Travis UI: -# https://travis-ci.com/pulumi/docs/settings -export ACCESS_KEY_ENV_VAR="AWS_ACCESS_KEY_ID_${ENVIRONMENT}" -export SECRET_KEY_ENV_VAR="AWS_SECRET_ACCESS_KEY_${ENVIRONMENT}" - -export AWS_ACCESS_KEY_ID="${!ACCESS_KEY_ENV_VAR}" -export AWS_SECRET_ACCESS_KEY="${!SECRET_KEY_ENV_VAR}" - -if [ -z "${AWS_ACCESS_KEY_ID:-}" ] || [ -z "${AWS_SECRET_ACCESS_KEY:-}" ]; then - echo "Skipping preview, no AWS credentials found." - exit 0 -fi -echo "Using AWS Access KEY ID ${AWS_ACCESS_KEY_ID}" - -cd ./infrastructure - -# Sync dependencies and build the Pulumi program. -yarn install -yarn build - -# Login, select the stack, and update. -pulumi stack select "pulumi/pulumi.io-${ENVIRONMENT}" -pulumi preview diff --git a/scripts/run-pulumi.sh b/scripts/run-pulumi.sh new file mode 100755 index 000000000000..2575a780172d --- /dev/null +++ b/scripts/run-pulumi.sh @@ -0,0 +1,36 @@ +#!/bin/bash +# +# Run Pulumi to update the stack targeted by the given branch. + +set -o errexit -o pipefail +cd "$(dirname "${BASH_SOURCE}")/.." + +if [ -z ${2:-} ]; then + echo "Usage: $0 [ preview | update ] stack-name" + exit 1 +fi + +export PULUMI_ACTION=${1} +export STACK_NAME=${2} + +cd ./infrastructure + +# Sync dependencies and build the Pulumi program. +yarn install +yarn build + +pulumi login +pulumi stack select "pulumi/${STACK_NAME}" + +case ${PULUMI_ACTION} in + preview) + assume-role pulumi-ci pulumi preview + ;; + update) + assume-role pulumi-ci pulumi up --yes + ;; + *) + echo "Unknown action '${PULUMI_ACTION}'" + exit 1 + ;; +esac diff --git a/scripts/travisqueue.sh b/scripts/travisqueue.sh deleted file mode 100755 index 60ad0ffdbd83..000000000000 --- a/scripts/travisqueue.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash - -# Runs travisqueue to ensure that only one `push` job is running -# concurrently for a given branch. This is how we can avoid conflicts -# when running `pulumi up` in response to any push. - -# Travis doesn't make secret config available on forks, so we skip -# it when TRAVIS_TOKEN is not set. -if [ -z ${TRAVIS_TOKEN:-} ]; then - echo "Skipping travisqueue, TRAVIS_TOKEN is not set." - exit 0 -fi - -case ${1:-} in - install) - # We cannot run `go get` to install it because the Go runtime on - # the ruby VM is too old. So instead we get it from get.pulumi.com. - # (Which is neither recommended nor supported). - mkdir -p ~/.bin/ - curl https://get.pulumi.com/internal/travisqueue > ~/.bin/travisqueue - chmod +x ~/.bin/travisqueue - ;; - start) - ~/.bin/travisqueue start - ;; - finish) - ~/.bin/travisqueue finish - ;; - *) - echo "Unknown command '${1:-}'." - ;; -esac diff --git a/scripts/update.sh b/scripts/update.sh deleted file mode 100755 index 5acd010e6942..000000000000 --- a/scripts/update.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash - -set -o errexit -o pipefail -cd "$(dirname "${BASH_SOURCE}")/.." - -if [ -z ${1:-} ]; then - echo "Usage: $0 [ staging | production ]" - exit 1 -fi - -# Environment being updated (production, staging, etc.) -export ENVIRONMENT=${1} - -# Each environment is running in a different AWS account, so we determine the -# credentials to use based on environment. Set in the Travis UI: -# https://travis-ci.com/pulumi/docs/settings -export ACCESS_KEY_ENV_VAR="AWS_ACCESS_KEY_ID_${ENVIRONMENT}" -export SECRET_KEY_ENV_VAR="AWS_SECRET_ACCESS_KEY_${ENVIRONMENT}" - -export AWS_ACCESS_KEY_ID="${!ACCESS_KEY_ENV_VAR}" -export AWS_SECRET_ACCESS_KEY="${!SECRET_KEY_ENV_VAR}" - -if [ -z "${AWS_ACCESS_KEY_ID:-}" ] || [ -z "${AWS_SECRET_ACCESS_KEY:-}" ]; then - echo "Skipping update, no AWS credentials found." - exit 0 -fi -echo "Using AWS Access KEY ID ${AWS_ACCESS_KEY_ID}" - -cd ./infrastructure - -# Sync dependencies and build the Pulumi program. -yarn install -yarn build - -# Login, select the stack, and update. -pulumi stack select "pulumi/pulumi.io-${ENVIRONMENT}" -pulumi up --yes --skip-preview From 96464d4ec38dec487650215afb088781b34f0ac7 Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Tue, 2 Jul 2019 10:18:00 -0700 Subject: [PATCH 4/8] Switch back to using generic Travis worker --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6228479096d3..a6b3cb214522 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ -language: go -go: 1.12 +language: generic +dist: xenial branches: only: - master From c46e6fdbc93774ffb90e6903f1a0fb0db573a9e6 Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Tue, 2 Jul 2019 10:21:23 -0700 Subject: [PATCH 5/8] Add alias to CDN for staging.pulumi.io --- ci/aws/config | 2 +- infrastructure/Pulumi.staging.yaml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ci/aws/config b/ci/aws/config index 3719b66fed99..5cc9db298fff 100644 --- a/ci/aws/config +++ b/ci/aws/config @@ -6,4 +6,4 @@ region = us-west-2 role_arn = arn:aws:iam::058607598222:role/ContinuousIntegrationRole credential_source=Environment duration_seconds=7200 -region = us-west-2 \ No newline at end of file +region = us-west-2 diff --git a/infrastructure/Pulumi.staging.yaml b/infrastructure/Pulumi.staging.yaml index c1d4b379f65b..7c9632944726 100644 --- a/infrastructure/Pulumi.staging.yaml +++ b/infrastructure/Pulumi.staging.yaml @@ -3,3 +3,4 @@ config: www.pulumi.com:certificateArn: arn:aws:acm:us-east-1:058607598222:certificate/a3f72a2b-e715-4639-b126-1e4efc0b634b www.pulumi.com:pathToWebsiteContents: ../public www.pulumi.com:targetDomain: www-staging.pulumi.com + www.pulumi.com:alias: staging.pulumi.io From a0a600630b14491afa9b4af4a4d4a29dd726388e Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Tue, 2 Jul 2019 10:43:10 -0700 Subject: [PATCH 6/8] Remove alias to staging.pulumi.io --- infrastructure/Pulumi.staging.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/infrastructure/Pulumi.staging.yaml b/infrastructure/Pulumi.staging.yaml index 7c9632944726..c1d4b379f65b 100644 --- a/infrastructure/Pulumi.staging.yaml +++ b/infrastructure/Pulumi.staging.yaml @@ -3,4 +3,3 @@ config: www.pulumi.com:certificateArn: arn:aws:acm:us-east-1:058607598222:certificate/a3f72a2b-e715-4639-b126-1e4efc0b634b www.pulumi.com:pathToWebsiteContents: ../public www.pulumi.com:targetDomain: www-staging.pulumi.com - www.pulumi.com:alias: staging.pulumi.io From db4731924812a92e6d1580f1d7a8d3a806b1aa47 Mon Sep 17 00:00:00 2001 From: Matt Ellis Date: Tue, 2 Jul 2019 11:28:20 -0700 Subject: [PATCH 7/8] Do not use named profiles for deployments There's an issue today where named profiles which use `credential_source=Environment` don't actually behave correctly with the assume-role tool. Instead of actually assuming the role, it just uses the credentials in the environment, which is not exactly what you want. For now, explicitly set the ARN we want to assume, instead of indirecting across a named profile. --- .travis.yml | 3 --- ci/aws/config | 9 --------- scripts/run-pulumi.sh | 6 ++++-- 3 files changed, 4 insertions(+), 14 deletions(-) delete mode 100644 ci/aws/config diff --git a/.travis.yml b/.travis.yml index a6b3cb214522..666bf5da8ae9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,9 +9,6 @@ before_install: # Download and install required tools. # Install assume-role tool for use when deploying - go get -u github.com/remind101/assume-role -# Copy over aws config which contains roles to use during deployment -- mkdir ~/.aws -- cp ./ci/aws/config ~/.aws/config # AWS CLI - pip install --upgrade --user awscli # pulumi diff --git a/ci/aws/config b/ci/aws/config deleted file mode 100644 index 5cc9db298fff..000000000000 --- a/ci/aws/config +++ /dev/null @@ -1,9 +0,0 @@ -[default] -output = json -region = us-west-2 - -[profile pulumi-ci] -role_arn = arn:aws:iam::058607598222:role/ContinuousIntegrationRole -credential_source=Environment -duration_seconds=7200 -region = us-west-2 diff --git a/scripts/run-pulumi.sh b/scripts/run-pulumi.sh index 2575a780172d..753d7ba696c7 100755 --- a/scripts/run-pulumi.sh +++ b/scripts/run-pulumi.sh @@ -22,12 +22,14 @@ yarn build pulumi login pulumi stack select "pulumi/${STACK_NAME}" +ROLE_ARN="arn:aws:iam::058607598222:role/ContinuousIntegrationRole" + case ${PULUMI_ACTION} in preview) - assume-role pulumi-ci pulumi preview + assume-role "${ROLE_ARN}" pulumi preview ;; update) - assume-role pulumi-ci pulumi up --yes + assume-role "${ROLE_ARN}" pulumi up --yes ;; *) echo "Unknown action '${PULUMI_ACTION}'" From e3271a91368ecbe873128c2e015d7715dc5bec30 Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Tue, 2 Jul 2019 12:04:19 -0700 Subject: [PATCH 8/8] Remove CloudFront alias entirely --- infrastructure/index.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/infrastructure/index.ts b/infrastructure/index.ts index ff4a5a903411..21a972bb8653 100644 --- a/infrastructure/index.ts +++ b/infrastructure/index.ts @@ -83,7 +83,6 @@ const oneMinute = 60; // https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_cloudfront const distributionArgs: aws.cloudfront.DistributionArgs = { enabled: true, - aliases: (config.alias ? [ config.targetDomain, config.alias ] : [ config.targetDomain ]), // We only specify one origin for this distribution: the S3 content bucket. origins: [