Commit graph

77 commits

Author SHA1 Message Date
Sean Gillespie 246aaba00e
Only publish packages on the linux v8.11 node leg (#1205) 2018-04-14 22:25:35 -07:00
Sean Gillespie 1f5be5f8cd
Bring the magic of Pulumi to Node v8.11.1, v9.11.1, v6.10.3 (#1167)
* Introduce a simple repetition operator to match expected error messages against actual ones

* Convert required and optional objects to use a Map (node v9 compat), improve the error formatting for failed tests

* Test node v6, v8, and v9 in CI

* Get rid of PULUMI_API env in .travis.yml, it's set from the Travis console now
2018-04-14 11:50:01 -07:00
Luke Hoban 5ede33e03d
Run tests against managed stacks backend instead of FnF (#1092)
Tests now target managed stacks instead of local stacks.

The existing logged in user and target backend API are used unless PULUMI_ACCES_TOKEN is defined, in which case tests are run under that access token and against the PULUMI_API backend.

For developer machines, we will now need to be logged in to Pulumi to run tests, and whichever default API backend is logged in (the one listed as current in ~/.pulumi/credentials.json) will be used. If you need to override these, provide PULUMI_ACCESS_TOKEN and possibly PULUMI_API.

For Travis, we currently target the staging service using the Pulumi Bot user.

We have decided to run tests in the pulumi organization. This can be overridden for local testing (or in Travis in the future) by defining PULUMI_API_OWNER_ORGANIZATION and using an access token with access to that organization.

Part of pulumi/home#195.
2018-04-02 21:34:54 -07:00
CyrusNajmabadi 5b244dbdb1
Use a class for Output serialization to ensure that .apply exists on it. (#1040)
Also, rename/cleanup a bunch of serialization code.

Also, generate better environment names in the serialized closure code. Thsi code should be much easier to make sense of as hte names will better track to the original names in the user code.

Also, dedupe simple non-capturing functions. This helps ensure we don't spit out N copies of __awaiter (one per file it is declared in).
2018-03-12 16:27:00 -07:00
CyrusNajmabadi 4e651b0428
Do not hardcode specialized knowledge about resources in closure serialization. (#1039) 2018-03-12 13:47:13 -07:00
CyrusNajmabadi 7e14a09b3b
Do not build sidebranch. (#1033) 2018-03-11 00:28:00 -08:00
CyrusNajmabadi 850130e30f
Capture modules through normal value capture. (#1030) 2018-03-11 00:11:53 -08:00
Matthew Riley ffc74c15eb Use test-failures scripts from pulumi/home
Add $PULUMI_HOME to reference the checkout of `pulumi/home`.
2018-03-08 11:40:17 -08:00
CyrusNajmabadi 487fc24354
Remove travis line. (#1015) 2018-03-08 01:02:05 -08:00
CyrusNajmabadi c544accfa6
Only attempt to serialize the properties of an object that are actually used. (#1000) 2018-03-07 21:10:12 -08:00
CyrusNajmabadi f295a5ca66
Remove line from travis. (#990) 2018-03-01 00:49:00 -08:00
CyrusNajmabadi e7c0e4cdaa
Make many fixes to closure serialization (#944)
Make many fixes to closure serialization

Primary things that i've done as part of this change:

    Added support for cyclic objects.
    Properly serialize objects that are shared across different function. previously you would get multiple copies, now you properly reference the same copy.
    Remove the usages of 'hashes' for functions. Because we track identity of objects, we no longer need them.
    Serialize properties of functions (if they have any).
    Handle Objects/Functions with different __proto__s than normal. i.e. classes/constructors. but also anything the user may have done themselves to the object.
    Handle generator functions.
    Handle functions with 'computed' names.
    Handle functions with 'symbol' names.
    Handle serializing Promises as Promises.
    Removed the dual Closure/AsyncClosure tree. One existed solely so we could have a tree without promises (for use in testing maybe?). Because this all exists in a part of our codebase that is entirely async, it's fine to have promises in the tree, and to await them when serializing the Closure to a string.
    Handle serializing class-constructors and methods. Including properly handling 'super' calls.
2018-03-01 00:32:01 -08:00
Matt Ellis 9bf6c976bc Install fixed versions of our tools
For some tools we used, like `dep` and `gometalinter` we were just
calling `go install` which caused us to pick up whatever was in `HEAD`
at that time. Now, we move to a model where we install fixed versions,
which will change per milestone.

While doing this, I changed the way our .travis.yml file runs
everything to move as much as possible out into scripts and do so in a
way that allows us to share as much common logic across our
repositories.
2018-02-20 11:50:08 -08:00
Matthew Riley 660e08b2f7 Do a better job of uploading failed test artifacts to S3
Uploading a bunch of tiny files is inefficient. Worse, it results in a ton of
paths printed to `stdout` -- enough that we could hit Travis' 4MB limit and
kill the job before we'd finished uploading.

Now we create a `.tar.gz` and upload that one, compressed file.

We also noticed that copied files might not be accessible from the `dev`
account, even though that account owns the `eng.pulumi.com` bucket. When
files are uploaded by one AWS account to a bucket owned by another, the
objects are, by default, only readable by the first account (the writer).
Change the ACL so the account that owns the bucket also has full access.
2018-02-15 22:01:25 -08:00
Matt Ellis 0fc10ec757 Only build master, release/* and tags
Our use of parens around the individual clauses of our if condition
seemed to cause Travis to ignore the condition and build
regardless. I've asked Travis about this, but for now, drop them (with
a comment) so we stop building pushes for topic branchs.
2018-02-12 15:13:55 -08:00
Joe Duffy a74aa51662
Rename pulumi package to @pulumi/pulumi (#917)
In order to begin publishing our core SDK package to NPM, we will
need it to be underneath the @pulumi scope so that it may remain
private.  Eventually, we can alias pulumi back to it.

This is part of pulumi/pulumi#915.
2018-02-12 13:13:13 -08:00
Matt Ellis 60006f352a Build release branches in CI 2018-02-09 13:42:16 -08:00
Matt Ellis 70f9dc0a97 Disable yarn cache in Travis 2018-01-29 11:49:42 -08:00
Matt Ellis 0ebfa0570c Build tags in addition to master
Previously, we used safelisting to ensure we only build the master
branch on push jobs. Because Travis treated branches and tags as the
same thing when it came to safelisting, it meant that pushes of tags
did not cause builds.

Our versioning workflow requires that we rebuild on tag pushes,
because the tag plays into the version number we embed in our programs
and packages.

Instead, we move to the new Conditional Builds feature of Travis to
also allow us to build tags.

Part of pulumi/sdk#11
2018-01-26 14:45:52 -08:00
Matt Ellis c506549a25 Remove MustFprintf in favor of explicitly dropping errors
In travis, we've seen cases where writes to our standard streams
results in an error like: `/dev/stderr: resource temporarily
unavailable` which causes the tests to panic.

Now, in a perfect world, writes to /dev/stderr would not fail in this
way, but we do not live in a perfect world. Other processes on the
machine may make stderr/stdout non-blocking. We've are now seeing this
failure in Travis more often and it is masking real Pulumi failures
we want to debug.
2018-01-16 18:33:44 -08:00
Matt Ellis aa8f8eadcd Update .travis.yml
- Only build 'master' on push jobs
- Use Travis's built in support for cloning the entire repository
2018-01-12 17:24:17 -08:00
Matthew Riley 372ab5ea5d Copy failed test data from Travis to S3 2018-01-08 13:46:21 -08:00
Matthew Riley ebccf19b52 Reset nonblocking state for stdout before running tests
In Travis, Node sees that `stdout` is a pipe and sets it to nonblocking.
Go's standard library isn't prepared for `stdout` to be nonblocking, so
sometimes long print statements can fail.
2018-01-04 22:53:48 -08:00
joeduffy b3ee139b91 Fix error message for stack select failures 2017-12-28 16:51:53 -08:00
Matt Ellis b0efb6960d Check that worktree is clean before running
Without this, we miss cases where the lock files may need to be
updated and we encode a version like v0.9.5-dirty.
2017-12-19 18:32:39 -08:00
Pat Gavlin d5f4e0c84b Bump the test timeout in CI.
Parameterize the timeout for the fast tests with a default of 2 minutes
that is bumped to 10 minutes in CI due to slow I/O during macOS builds.
2017-12-15 12:12:06 -08:00
Matt Ellis e8bdb5e6f7 Adjust to the fact that on OSX pip is now spelled pip2.7 2017-11-28 22:01:03 -08:00
Matt Ellis 46c35281ab Adopt new makefile system
See https://github.com/pulumi/home/pull/56 for more details.
2017-11-16 23:56:29 -08:00
Matt Ellis 1a1c44b71e Update travis webhook 2017-11-15 11:42:26 -08:00
Matt Ellis 8e4b03cfac Point at our build result filtering webhook 2017-11-13 12:05:32 -08:00
Matt Ellis 34fa7f7151 Fetch entire history 2017-11-06 11:07:57 -08:00
Matt Ellis fc14329cfc Stop using yarn scripts for building
We have Makefiles, so we might as well use them, instead of spliting
build logic across two systems.
2017-10-16 10:47:37 -07:00
Matthew Riley 4daa7ca342 Update to latest version of Yarn 2017-10-13 14:44:08 -07:00
Matt Ellis 9660da4d14 Run Travis on both macOS and Linux
Unlike go binaries (where we can cross compile) the node module that
we publish needs to be built on the platform we publish for. Update
our `.travis.yml` file to also build on macOS and fix the publishing
script so we don't don't cross publish Darwin from Linux. Once we have
CI working for Windows, we'll remove the loop over PUBLISH_GOOS and
each build will publish just the artifacts for the host OS.
2017-10-11 11:40:35 -07:00
Matt Ellis 0a835bd14a Use explicit targets in Makefile for Travis
Defer build and publish logic into the makefiles instead of trying to
use Travis to do so. This let's us sidestep Travis's not great error
handling (see pulumi/home#21 for more details)
2017-09-28 13:12:13 -07:00
Matthew Riley 80364ac68d Publish builds for topic branches
Use $TRAVIS_BRANCH to name published artifact
2017-09-21 17:08:41 -07:00
joeduffy dcdf780b09 Move after_script steps to script so they fail fast
See https://blog.travis-ci.com/after_script_behavior_changes/.
2017-09-21 15:02:31 -07:00
Joe Duffy 5e3f8041bc Adopt new pulumi/home repo name 2017-09-21 14:09:35 -07:00
joeduffy 2a30a0f5f0 Don't redundantly make configure twice 2017-09-14 14:33:33 -07:00
joeduffy ba67a72d88 Eliminate unused envvar 2017-09-12 06:53:42 -07:00
joeduffy 791b90aa33 Swap sdk / nodejs 2017-09-11 15:34:06 -07:00
joeduffy 2ef6b89b82 Add one-time Travis make configure in build dir 2017-09-11 15:30:42 -07:00
joeduffy 4c781da93b Add instructions for make configure
And also move the Node.js SDK-specific parts into the sdk/nodejs/ directory.
2017-09-11 15:17:11 -07:00
joeduffy 13df916cfe Put the Node.js SDK bin/ on $PATH for Travis 2017-09-08 06:19:22 -07:00
joeduffy 527aee7b15 Clone pulumi 2017-09-07 21:52:58 -07:00
Joe Duffy 0e3a01c684 Update the publish scripts for the new package structure (#334) 2017-09-07 11:07:52 -07:00
joeduffy ad54031fb2 Install Node.js 6.10.x in Travis 2017-09-05 10:26:05 -07:00
joeduffy 3ff10edcc4 Add a make configure target
This change adds a `make configure` target, which handles preparing
the environment for building the project.  This includes existing
steps, like dep ensure and yarn installing the Node.js SDK NPM
dependencies, and also includes downloading the right Node.js/V8
includes, putting them in the right place, and then generating the
appropriate node-gyp project files that reference those includes.
2017-09-04 11:35:21 -07:00
joeduffy 1e00bc7db4 Fix up .travis.yml to use Node.js SDK rather than LumiJS 2017-09-04 11:35:21 -07:00
Luke Hoban 2e22c243bc Adopt Go 1.9 in Travis 2017-09-02 12:10:28 -07:00