Commit graph

120 commits

Author SHA1 Message Date
Justin Van Patten 7278a7429c
Don't remove tests from @pulumi/pulumi npm package (#3532)
The test files are currently included in the npm package, and we have packages that depend on the test files currently, so when installing the linkable `@pulumi/pulumi` package locally, don't delete the tests.
2019-11-19 21:29:53 +00:00
Mikhail Shilkov 889a022684 Add .NET to Windows build (#3466) 2019-11-07 07:04:31 -08:00
Pat Gavlin dcd3068fea
Include the .NET language host in releases. (#3453) 2019-11-05 19:25:03 -08:00
CyrusNajmabadi df06b8fc9b
Add publishing to nuget support (#3416) 2019-10-29 20:14:49 -07:00
Pat Gavlin 23b7a3f337
Add scripting for updating the Homebrew formula. (#3291)
This script will run during OS X legs, and will open a PR to update the
Homebrew formula for Pulumi on each new release.
2019-10-02 16:04:58 -07:00
Matt Ellis 1e2f4107c4 Reset patch to 0 when generating a version for a minor update
This fixes an issue we didn't forsee. If we do a patch release by
tagging a commit as `v1.1.1`, the next version we generate will be
`v1.2.1-alpha.....` which is not what we want. When bumping the minor
version, we should reset the patch version to zero, regardless of what
it is.
2019-09-13 15:50:38 -07:00
Matt Ellis 6b4fa1575a Don't fail if packages have already been published
This is https://github.com/pulumi/scripts/pull/84 but for
pulumi/pulumi (which doesn't use the shared script because we have to
do special things for pulumi/pulumi)
2019-09-12 11:50:31 -07:00
Matt Ellis 0a2384d175 Update version assignment logic
Previously, we would compute a version for a build by taking the last
relaesed bversion and then increment the patch number. We did this
because during pre 1.0 milestones, we would use the minor version to
say that there had been a "breaking change" and use the patch version
to mean there had been fixes or new features.

For packages that are 1.0 or later, we are now going to bump the minor
version per release and will use the patch version just for cases
where we do one off hot fixes.

This change updates our version generation logic to be in line with
this new plan.
2019-09-11 14:31:47 -07:00
Pat Gavlin 9df29893ba
Build new docs when publishing tagged releases. (#3181)
These changes wire up a new script that clones
https://github.com/pulumi/docs, regenerates the appropriate parts of the
docs site, and opens a pull request with the changes. This script
executes on any build in which we publish packages that _also_ has a tag
present.
2019-09-05 12:20:48 -07:00
Alex Clemmer d033576348 Include pulumi-analyzer-policy in Windows releases 2019-08-30 20:46:39 -07:00
Matt Ellis e20d72ff6e Only skip publishing docker images for -alpha builds.
Previously, we only published docker images for non-prerelease
builds. However, on our move to 1.0.0, we will be publishing a few
`-beta` (and perhaps one or more `-rc`) builds. These are high quality
builds we want folks to use. So, we will publish them to DockerHub and
update the `latest` tag, similar to what we do for NPM and PyPI.

I will manually publish 1.0.0-beta.2, but landing these changes means
that future releases will be published automatically

Fixes #3092
2019-08-16 11:02:42 -07:00
Pat Gavlin 57b6e84645
Prepare for the v1.0.0-beta.1 release. (#3079)
- Update scripts/get-version and friends to understand the new -alpha
  and -beta tags
- Update the CHANGELOG
2019-08-13 11:41:32 -07:00
Luke Hoban 3768e5c690
Python Dynamic Providers (#2900)
Dynamic providers in Python.

This PR uses [dill](https://pypi.org/project/dill/) for code serialization, along with a customization to help ensure deterministic serialization results.

One notable limitation - which I believe is a general requirement of Python - is that any serialization of Python functions must serialize byte code, and byte code is not safely versioned across Python versions.  So any resource created with Python `3.x.y` can only be updated by exactly the same version of Python.  This is very constraining, but it's not clear there is any other option within the realm of what "dynamic providers" are as a feature.  It is plausible that we could ensure that updates which only update the serialized provider can avoid calling the dynamic provider operations, so that version updates could still be accomplished.  We can explore this separately.

```py
from pulumi import ComponentResource, export, Input, Output
from pulumi.dynamic import Resource, ResourceProvider, CreateResult, UpdateResult
from typing import Optional
from github import Github, GithubObject

auth = "<auth token>"
g = Github(auth)

class GithubLabelArgs(object):
    owner: Input[str]
    repo: Input[str]
    name: Input[str]
    color: Input[str]
    description: Optional[Input[str]]
    def __init__(self, owner, repo, name, color, description=None):
        self.owner = owner
        self.repo = repo
        self.name = name
        self.color = color
        self.description = description

class GithubLabelProvider(ResourceProvider):
    def create(self, props):
        l = g.get_user(props["owner"]).get_repo(props["repo"]).create_label(
            name=props["name"],
            color=props["color"],
            description=props.get("description", GithubObject.NotSet))
        return CreateResult(l.name, {**props, **l.raw_data}) 
    def update(self, id, _olds, props):
        l = g.get_user(props["owner"]).get_repo(props["repo"]).get_label(id)
        l.edit(name=props["name"],
               color=props["color"],
               description=props.get("description", GithubObject.NotSet))
        return UpdateResult({**props, **l.raw_data})
    def delete(self, id, props):
        l = g.get_user(props["owner"]).get_repo(props["repo"]).get_label(id)
        l.delete()

class GithubLabel(Resource):
    name: Output[str]
    color: Output[str]
    url: Output[str]
    description: Output[str]
    def __init__(self, name, args: GithubLabelArgs, opts = None):
        full_args = {'url':None, 'description':None, 'name':None, 'color':None, **vars(args)}
        super().__init__(GithubLabelProvider(), name, full_args, opts)

label = GithubLabel("foo", GithubLabelArgs("lukehoban", "todo", "mylabel", "d94f0b"))

export("label_color", label.color)
export("label_url", label.url)
```


Fixes https://github.com/pulumi/pulumi/issues/2902.
2019-07-19 10:18:25 -07:00
Alex Clemmer 3bc86055c2 Add pulumi-analyzer-package scripts in publishing pipeline 2019-07-16 00:58:33 -07:00
Chris Smith 0ede30fdb6
Build/Push pulumi/actions container with new SDK releases (#2646)
* Build/Push pulumi/actions container with new SDK releases

* Address PR feedback
2019-04-18 15:32:19 -07:00
Matt Ellis fbae997456 Don't clobber dev tag from PR builds 2019-01-31 14:55:01 -08:00
Matt Ellis 389a3721ec Publish Docker image as part of release process
This change does two things:

- It ensures that as part of publishing the SDK, we also publish an
  updated pulumi/pulumi docker image (tagged with both `latest` and
  `vX.Y.Z`

- Makes this image published by this repository less perscriptive in a
  workflow. The instead of having wrapper scripts that try to invoke
  Pulumi based on conventions. It is now just a base image that has
  the pulumi CLI installed, as well as the SDKs for the major cloud
  providers. We'll use this base layer in our github actions image,
  which will layer on a github actions centric workflow

Fixes #1991
2019-01-24 11:43:05 -08:00
Matt Ellis c8b7e1fc71 Only publish some artifacts from a single Linux leg
We publish some artifacts from this repository, which are specific to
an OS. In the past, we only had a single Linux leg and so we did not
need any additional conditional logic.

However, we now have multiple Linux legs (across different node
versions) running in parallel, so if we try to publish the same
artifacts at the same time, we can run into issues because two `aws s3
cp` jobs try to write to the same file at the same time.

Follow similar logic to our skips we do around publishing NPM and PyPI
packages here, as well.
2019-01-15 10:42:28 -08:00
Matt Ellis 01d58ad7e4 Fix +dirty tag on Windows for tagged versions
The logic to append the `+dirty` tag to a generated version on Windows
was incorrect in the case where we were producing a version for a
tagged build. In that case we would append `+dirty` when the work tree
was clean and not append it when it was dirty.
2018-12-05 11:11:43 -08:00
Matt Ellis e56cefa285 Publish SDK binaries with same filename format as NPM packages
With this change, you can now use the `dev` tag of `@pulumi/pulumi` to
get the latest version of the SDK and install it from get.pulumi.com

This is helpful for some of our internal testing.
2018-11-21 14:38:24 -08:00
Matt Ellis 2b3c7f61c5 Rework get-version scripts
Under our old versioning system, when we started a new point release,
we'd tag the HEAD commit of master with a tag like `v0.16.6-dev` and
our scripts would use this to generate a new version number. This
required a great deal of gymnastics when producing a release and
caused us to litter these -dev tags everywhere.

To improve this, we change version number generation to the following
strategy:

1. If the commit we are building has a tag applied to it, use that tag
as the version (appending the dirty bit metadata to the version, if
needed).

2. If the commit we are bulding does not have a tag applied to it,
take the version from the next reachable tag, increment the patch
version and then append the `-dev` pre-release tag. As part of this,
we also make a slight tweek to our semver generation such that instead
of `-dev<TIMESTAMP>` we use `-dev.<TIMESTAMP>` which is more in line
with what semver recommends.
2018-11-16 20:11:04 -08:00
Matt Ellis 6c7092ff65 Pass -count=1 to disable result caching on go 1.10 and above 2018-11-08 14:11:52 -08:00
Chris Smith f324a460e9
Remove references to Pulumi private clouds (#2095)
* Remove TODO for issue since fixed in PPCs.

* Update issue reference to source

* Update comment wording

* Remove --ppc arg of stack init

* Remove PPC references in int. testing fx

* Remove vestigial PPC API types
2018-10-24 13:50:35 -07:00
joeduffy f9ef9312fe Skip immaterial PR events 2018-10-02 13:24:22 -07:00
joeduffy 6fe0222a45 Strip out "refs/heads/" parts of branches 2018-10-01 16:20:40 -07:00
joeduffy 1d0189c945 Use the target branch/stack for PRs 2018-10-01 15:47:17 -07:00
joeduffy 2499539afb Add the ability to have a stacks map file
For CI situations, we'll support a simple stacks map file, e.g.

    {
        "refs/heads/master": "production",
        "refs/heads/testing": "test'
    }

and, when PULUMI_CI is set, we'll use it to select the stack.

This is purely for experimental purposes; we're not sure this is
exactly what we want right now, but it's better than the manual
munging we've been doing with various bash scripts, etc. right now.
2018-10-01 13:45:26 -07:00
joeduffy 33ab82e9ac Set up some CI variables for GitHub App support 2018-10-01 11:38:03 -07:00
joeduffy d3ed7de33b Use a thin script wrapper for the entrypoint
This adds a package installation step just before calling the
`pulumi` CLI, making it easier to just volume mount a project
without needing to have `npm install`ed its contents yet.
2018-09-30 08:09:57 -07:00
Matt Ellis d9e3c2c91d Restore build-sdk.sh script
It was not intended to be deleted as part of #1992, we just wanted to
delete `dist/install.sh`
2018-09-26 21:49:19 -07:00
Matt Ellis f91e1ba5c5 Remove install script from SDK tarball
Pulumi used to have a much more complicated install process, whereas
today, this is no longer the case. You simply unpack pulumi to a
folder of your choice, add it to the `$PATH` and then go.

The `install.sh` was writtten back when Pulumi had to be installed
into its own directory. It assumed that it "owned" this directory and
when the script hit an error would clean up its half processed state
before trying to exit. While this was fine out of the box (since we
default to installing to `/usr/local/pulumi`) if you overrode the
install location to just say `/usr/local` *and* we hit an error in the
script, the script would try to remove everything from `/usr/local` as
part of cleaning itself up.

Since we no longer need any of this extra install logic, we'll just
remove `install.sh` completely. The SDK tarball will now contain a
single top level directory (named `pulumi`) with all of our binaries
under it. Manual installs will now just mean unpacking the tarball
somewhere and putting that `pulumi` folder on your path, or as a
simplification, copying all the binaries from the `pulumi` folder into
an existing folder that is already on your path.

This also removes the need to ever ask the user to `sudo` during an
install. Users now have complete control over where they put our
binaries, which is exactly what you want from a manual install
process.
2018-09-26 14:05:56 -07:00
Matt Ellis c7f9f9d12c More macOS script fixes 2018-09-11 17:14:58 -07:00
Matt Ellis a57bdfbd52 Fix up scripts when running on macOS
macOS doesn't use GNU tools and so some options are missing.
2018-09-11 17:00:40 -07:00
leogtzr 3f89b015ca cleanup 2018-09-11 14:59:25 -07:00
Matt Ellis 1746cc60a2 Fix Windows publishing 2018-06-17 23:16:58 -07:00
Matt Ellis 2cfbe81adb Remove dependency on pulumi/home
Stop cloning pulumi/home. This doesn't work in Travis because public
repositories can not have private SSH keys, which we'd need to clone
this repository. All the scripts we consume from there are now in
pulumi/scripts and so we'll just consume them from there.
2018-06-17 22:09:15 -07:00
Matt Ellis d0485f11f6 Include Python and Go langhosts in Windows SDK
This change includes the Python and Golang language hosts in the Windows
SDK. As part of this change, I had to adjust how we launched the second
stage of the language host, since we can't depend on the shebang, so now
we invoke `python` passing the executor and then the arguments.

Fixes #1509
2018-06-15 11:12:33 -07:00
Matt Ellis 9ccd07714a Publish SDK builds to get.pulumi.com
Previously, we published builds to rel.pulumi.com and only put actual
released builds (eg. rc's and final builds) on get.pulumi.com. We
should just publish all of the SDK builds to get.pulumi.com.

This also makes a slight tweak to the filename of the package we
upload (we took the switch over to get.pulumi.com to make this change
and now that we are uploading automatically, we need to encode this
change instead of doing it by hand).
2018-06-12 12:23:05 -06:00
Pat Gavlin b47f9ef8ef
Point some scripts to the new scripts repo. (#1499)
All scripts that are generally useful across all builds have been moved
into `pulumi/scripts`. These changes clone that repository and retarget
the various scripts to their new location.
2018-06-12 10:03:43 -07:00
Matt Ellis f0da3f7c10 Publish to pypi.org 2018-06-12 09:10:54 -06:00
Matt Ellis a63f89862a Fix PyPI publish URL 2018-06-11 14:06:31 -07:00
Matt Ellis 479fbae320 Publish to test.pypi.org 2018-06-11 14:23:01 -06:00
joeduffy 5a71ab9d12 Add Makefile machinery for Go provider 2018-06-09 16:16:35 -07:00
Matt Ellis e397d76733 Fix publishing issue due to missing *.node files
We no longer need to include these node plugins, so just remove
copying them from our publishing script.
2018-06-04 15:44:33 -07:00
Matt Ellis dcb5ae1e1f Stop including native serialization modules
We retained these modules to support using v0.11.X and earlier
versions of @pulumi/pulumi, which required a native module to do
closure serialization. 0.12.X does not need this, so lets stop
including it.
2018-06-04 14:27:01 -07:00
Matt Ellis 7b27f00602 Fix python package versions
Our logic for converting npm style versions to PEP-440 style versions
was not correct in some cases. This change fixes this.

As part of this change we no longer produce a NPM version that would
be just X.Y.Z-dev, instead for development versions we always include
both the timestamp of the commit and the commit hash.

Instead of trying to use a bunch of sed logic to do our conversions,
we now have a small go program that uses a newly added library in
pkg/util. A side effect of this is that we can more easily write tests
to ensure the conversion works as expected.

Fixes #1243
2018-05-07 12:38:08 -07:00
Matt Ellis 409477b951 Invoke node directly from the language host
Instead of using a shell script to jump from the language host into
node, just invoke node directly. This makes our start-up path a little
simpler to understand and indirectly fixes pulumi/home#156, where we
would fail on Windows if the `-exec` script was in a folder that had
spaces in it (due to a subtle interaction between how go launches cmd
files and how cmd.exe parses arguments).
2018-05-02 11:16:58 -07:00
Matt Ellis 213c9c3c08 Use newer versions of the build-sdk.sh scripts 2018-04-30 20:44:01 -07:00
joeduffy 4ef4eba01a Remove SDK dependencies
This change eliminates our dependencies on the SDK repo.  Now that
SDKs are comprised solely of pulumi/pulumi artifacts, a separate repo
isn't required.  This allows us to simplify some of the distribution.

The install.sh script is modified slightly, to permit overriding the
default install location using $PULUMI_INSTALL_PATH.
2018-04-30 16:39:17 -07:00
Sean Gillespie 55711e4ca3
Revert "Lift snapshot management out of the engine and serialize writes to snapshot (#1069)" (#1216)
This reverts commit 2c479c172d.
2018-04-16 23:04:56 -07:00