Commit graph

203 commits

Author SHA1 Message Date
joeduffy 4f822b19fd Publish to production PyPI 2018-03-07 11:57:38 -08:00
Matt Ellis d78755765e Set ROOT in publish_packages.sh 2018-03-06 19:36:41 -08:00
Matt Ellis 936abeb118 Publish tgz's in the middle of the build, packages at the end
While it's safe to publish the tgz that we use internally for other
repositories that are on "the link plan" after the build completes, we
shouldn't publish packages to NPM and PyPi at that point. There are
two reasons for doing this:

1. Publishing packages before they are tested, which means we could
end up publishing packages that don't work.

2. NPM prevents publishing the same package more than once, so if we
had to re-run the job (due to tests failing for transient issues), the
publish step will start failing, preventing us from running the tests
at all.
2018-03-06 19:20:47 -08:00
joeduffy e0554b08d8 Only publish packages on Linux 2018-03-01 18:14:19 -08:00
joeduffy c2b1705bf9 Pass Pulumi API token to PyPI in the querystring 2018-03-01 17:43:56 -08:00
joeduffy 567724ed30 Pass username/password to twine publish
This prevents blocking waiting on stdin, which obviously will hang CI.
2018-03-01 09:33:42 -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
Joe Duffy 9412f4ac7a
Publish Pulumi Python SDK package (#988)
We now publish the Pulumi Python SDK package to our private PyPI
server at the same time we also publish the NPM package.  For now,
we use the test Pulumi.com service, and will switch to staging as
soon as it becomes available.
2018-02-28 18:38:08 -08:00
joeduffy 88dcdd8d2b Substitute ${VERSION} on Windows builds too
This change refactors the way we do ${VERSION} substitution in both
the Node.js SDK's version.js and package.json, so that it can work on
Windows.  This is required now that we are actually parsing semvers.
2018-02-20 14:37:28 -08:00
joeduffy c86a799d15 Fix some more scripts 2018-02-18 08:11:14 -08:00
joeduffy 548c22d014 Reimplement GetRequiredPlugins in Go
This brings back the Node.js language plugin's GetRequiredPlugins
function, reimplemented in Go now that the language host has been
rewritten from JavaScript.  Fairly rote translation, along with
some random fixes required to get tests passing again.
2018-02-18 08:08:15 -08:00
Sean Gillespie 01bb34e674
Fix the make_release.ps1 script
New-Item produces a new object on success, which ultimately gets
output by the make_release.ps1 cmdlet and consumed by the release.ps1
script. This messes up the release script that is expecting exactly
one object to come out of the pipeline from make_release.ps1.
2018-02-17 11:52:44 -08:00
Sean Gillespie d3fb639823 Ship nativeruntime.node as part of the SDK
Fixes #356. Instead of downloading a node binary with our closure
serialization code linked-in, this PR instead publishes the
`nativeruntime.node` produced by the NodeJS SDK build as part of the SDK.

This has a number of advantages. First, it is vastly more easy to
develop closure.cc in this configuration. Second, we have the ability
to ship different `nativeruntime.node`s side-by-side, paving the way
for enabling future versions of Node. Third, we don't have to stay
in the business of shipping custom builds of Node, although we do still
need to ship a version of Node with minor modifications in order for
Windows to still work.
2018-02-16 18:12:33 -08:00
Matt Ellis 2d0ca1992e Cleanup provider launch scripts and fix some windows build oddities
The windows build was still on the old plan from way back when where
we had binaries littered in the build tree and you had to add parts of
your build-tree to the `%PATH%` for the integration tests to work.

This cleans that up and moves all of our scripts that invoke
javascript to be on the same plan. They invoke our specially named
node with a relative path to the JS code we want to run.
2018-02-15 17:02:35 -08:00
Sean Gillespie 1c2c10a19d Revert "Revert Windows changes to unblock npm ingestion"
This reverts commit d98dcaa79c.
2018-02-13 15:07:07 -08:00
Sean Gillespie d98dcaa79c Revert Windows changes to unblock npm ingestion 2018-02-13 14:04:23 -08:00
Sean Gillespie 05cb5368a4
Download and use a custom Node binary instead of linking against
private V8 APIs from within our native Node module.
2018-02-13 14:04:01 -08:00
Joe Duffy 0cb112b984
Publish the Go-based langhost in the SDK tgz's (#924) 2018-02-12 16:54:12 -08:00
Joe Duffy 6e5084218c
Use the scoped @pulumi name for linking layout (#920) 2018-02-12 16:16:16 -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
Sean Gillespie e87204d3e1
Move language host logic from Node to Go (#901)
* experimental: separate language host from node

* Remove langhost details from the NodeJS SDK runtime

* Cleanup

* Work around an issue where Node sometimes loads the same module twice in two different contexts, resulting in two distinct module objects. Some additional cleanup.

* Add some tests

* Fix up the Windows script

* Fix up the install scripts and Windows build

* Code review feedback

* Code review feedback: error capitalization
2018-02-10 02:15:04 +00:00
Matt Ellis c47c5b9ad7 Ensure published binaries have the correct version
Ideally we would just use `make build` and `make install` in favor of
having yet another way to build the product, but before we can do that
in general we need to come up with a better story for cross
building. For now, just ensure we pass the correct version string to
go build when building.
2017-12-14 10:57:06 -08:00
Matt Ellis 6843162f98 Ensure correct version is in published package
We need to take the package.json from the folder (which will have been
rewritten by the build to include the version number) instead of the
version we have checked into the tree (which has ${VERSION} as a version)

Windows didn't have this issue, but it did include some stuff we did
not include in the unified release, so I cleaned that up as well.
2017-12-04 23:09:48 -08:00
Matt Ellis 9ee15c277f Fix publishing scripts to include package.json
This is needed because install.sh will run yarn install at install
time, so we need the dependency information this provides.
2017-11-17 15:46:48 -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 62ad82ec02 Pass version number when go build'ing during publishing 2017-11-03 17:30:50 -07:00
Matt Ellis 20199a2400 Publish to "amd64" instead of "x64"
Windows was the odd man out here, everything else used amd64 except
for this repo's windows build.
2017-11-03 17:30:50 -07:00
Matt Ellis 1a38abaa71 Fix published zip for Windows
- `go build` handles appending .exe to the built binary, so we need not do
it ourselves. In fact, when we did we generated a binary called
`pulumi.exe.exe` which is not what we wanted.

- Remove the development versions of the langhost and dynamic provider,
from the `<root>/node_modules/pulumi` folder. The `dist` version gets
copied into bin.

- Add the dummy_argument workaround to the dist version of the langhost.
2017-10-30 23:22:21 -07:00
joeduffy d41c016edb Use install.sh 2017-10-14 07:24:20 -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 cb6ac2785e Build, integration tests and publishing on Windows 2017-10-02 13:40:58 -07:00
Matt Ellis b1f49ffde5 publish as pulimi not @pulumi/pulumi 2017-09-22 11:46:56 -07:00
Matt Ellis 4a7e33c718 Update make_release.sh to deal with pulumi cmd moving
The script was still trying to publish from $ROOT/cmd/lumi which is
wrong, since the command now just lives in $ROOT
2017-09-22 11:29:03 -07:00
Matt Ellis 4462dcaabb Crossbuild and publish to new layout format 2017-09-22 10:56:47 -07:00
joeduffy 75d72e5086 Rename published bin/lumi to bin/pulumi 2017-09-21 19:37:42 -07:00
Joe Duffy f6e694c72b Rename pulumi-fabric to pulumi
This includes a few changes:

* The repo name -- and hence the Go modules -- changes from pulumi-fabric to pulumi.

* The Node.js SDK package changes from @pulumi/pulumi-fabric to just pulumi.

* The CLI is renamed from lumi to pulumi.
2017-09-21 19:18:21 -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
Joe Duffy 5e3f8041bc Adopt new pulumi/home repo name 2017-09-21 14:09:35 -07:00
joeduffy a5706e0662 Update the gocover commands 2017-09-13 18:52:06 -07:00
joeduffy 353b25205a Make install scripts part of the fabric LKG 2017-09-10 20:23:11 -07:00
joeduffy 6aae028768 Move language host into bin/ 2017-09-08 06:13:09 -07:00
joeduffy 527aee7b15 Clone pulumi 2017-09-07 21:52:58 -07:00
joeduffy f3088149ec Make scripts agnostic to pwd 2017-09-07 21:29:50 -07:00
joeduffy c6b626899b Flatten the Node.js SDK release structure 2017-09-07 14:33:00 -07:00
Joe Duffy 0e3a01c684 Update the publish scripts for the new package structure (#334) 2017-09-07 11:07:52 -07:00
joeduffy d845c9e08c Publish and install the new layout 2017-09-07 09:56:26 -07:00
Luke Hoban e4e9710f30 Make install_release.sh script executable 2017-07-24 22:54:42 -07:00
Luke Hoban 916dd6b235 Report failing error code on Lumi compilation errors
Report an error when Lumi runtime compilation fails.

Also adds a reusable install_release.sh script to use
for installing Lumi package releases, plus expansion
of symlinks in package Makefiles.
2017-07-24 22:43:37 -07:00
joeduffy cfb98291bc Link NPM packages on install 2017-07-23 11:17:18 -06:00
joeduffy 29aa488628 Publish binaries under the tag, branch, and commit 2017-07-21 15:33:03 -07:00
joeduffy 10dc68090d Add an install script
This can be used to install pre-built Lumi release packages.
2017-07-21 14:11:39 -07:00
joeduffy f314ab5a36 Let LUMIROOT be overridden during publishes 2017-07-21 09:57:40 -07:00
joeduffy fc1cd2c01e Make a publish script; fix sed for multi-OS compat
This change creates a scripts/ folder, moves our existing shell
script, gocover.sh, underneath it, and factors the publish logic
out of the Makefile and into the publish.sh file.

The syntax for sed differs between Mac OS X and GNU versions of
the tool, which is rather annoying.  This fixes it by leveraging
the fact that `sed -i.bak ...` works, although we now need to
clean up the *.bak file left behind.  (No big deal and way better
than maintaining OS-dependent logic.)
2017-07-21 09:37:14 -07:00