Commit graph

204 commits

Author SHA1 Message Date
Mikhail Shilkov f01208af3b
Fix terminal keypad mode (#4042)
Fix terminal keypad mode
2020-03-11 08:55:36 +01:00
Praneet Loke b0696ec42c
Check if TRAVIS_PULL_REQUEST is false before setting the ci vars' PRNumber property (#3869) 2020-02-06 12:25:06 -08:00
Anastasia Halim 4c8237aa77
Validate stack tag names (#3804)
* added regex to validate stack tag names

* added tests
2020-01-29 10:53:33 -08:00
Praneet Loke 0fd131fb9e
Add a new BuildNumber property to the backend metadata bag and CI vars (#3766)
* Add a new metadata property for BuildNumber. Update Travis and GitLab to set both Build ID and Build Number. Add link to env vars doc for Codefresh.

* Update changelog

* Update CI vars detection test.

* Add PR number to changelog.
2020-01-17 10:47:49 -08:00
Praneet Loke 39a4abe32d
Fix the pipeline ID and PR URL for GitLab CI (#3763)
* Use Merge Request Instance ID instead of the Merge Request ID for GitLab CI.

* Use GitLab Pipeline Instance ID as the BuildID for GitLab CI.

* Update the changelog.

* Update the test for GitLab CI detection.
2020-01-16 14:59:12 -08:00
Praneet Loke 19d2e504db
Trim tailing slash from the base URL for Azure Pipelines build URL. (#3721) 2020-01-07 10:30:22 -08:00
Praneet Loke c87f161cf0
Fix logic to determine PRNumber and BuildURL for Az Pipelines. (#3677)
* Fix logic to determine PRNumber and BuildURL for Az Pipelines.

* Update changelog

* Set the BranchName to the PR source branch if PRNumber is not empty.
2019-12-19 17:17:54 -05:00
Praneet Loke 4404dfb470
Add codefresh CI detection. Thanks to @fernandocarletti. (#3270)
* Add codefresh CI detection. Thanks to @fernandocarletti.
2019-09-25 14:41:13 -07:00
Chris Smith a128b613ac
Remve use of GENERIC_CI_SYSTEM (#3259) 2019-09-25 14:03:00 -07:00
Erin Krengel 938c2e8bd8
Fix parsing of Gitlab urls w subgroups (#3239) 2019-09-16 20:35:23 -07:00
Pat Gavlin 82204230e1
Improve tracing support. (#3238)
* Fix some tracing issues.

- Add endpoints for `startUpdate` and `postEngineEventsBatch` so that
  spans for these invocations have proper names
- Inject a tracing span when walking a plan so that resource operations
  are properly parented
- When handling gRPC calls, inject a tracing span into the call's
  metadata if no span is already present so that resource monitor and
  engine spans are properly parented
- Do not trace client gRPC invocations of the empty method so that these
  calls (which are used to determine server availability) do not muddy
  the trace. Note that I tried parenting these spans appropriately, but
  doing so broke the trace entirely.

With these changes, the only unparented span in a typical Pulumi
invocation is a single call to `getUser`. This span is unparented
because that call does not have a context available. Plumbing a context
into that particular call is surprisingly tricky, as it is often called
by other context-less functions.

* Make tracing support more flexible.

- Add support for writing trace data to a local file using Appdash
- Add support for viewing Appdash traces via the CLI
2019-09-16 14:16:43 -07:00
Mikhail Shilkov 2a88bc8e7e Replace regex with a replacer 2019-08-19 08:28:34 +02:00
Mikhail Shilkov 82276e3418 Skip non-utf8 secrets when regexing logs 2019-08-19 08:28:34 +02:00
CyrusNajmabadi 2afe5b88b8
Disable interactive-terminal spinner when on a CI machine. (#3070) 2019-08-13 12:50:09 -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
Alex Clemmer 93cd089428 Print help message when too few arguments
Fixes pulumi/pulumi-policy#61.
2019-08-12 12:45:48 -07:00
Praneet Loke a190e54988
Add support for detecting Jenkins CI env vars. (#3039) 2019-08-09 12:53:51 -07:00
Alex Clemmer 154c1caa43 Fix small bug in untar code 2019-08-07 17:06:57 -07:00
Alex Clemmer 7070304f81 Use npm pack for policy publish
Fixes #35.
2019-08-05 16:12:12 -07:00
Mikhail Shilkov d7a3987f47 Prevent poorly formatted strings in fatal error messages (#2995)
Fixes #1511
2019-07-31 17:42:59 -07:00
Pat Gavlin 6804d640fc Only parse flags if they are not already parsed.
Just what it says on the tin.
2019-07-31 11:29:00 -07:00
Pat Gavlin 1af7449f1a
Remove references to pulumi/glog. (#3009)
This package's flags conflict with those in google/glog. Replace all
references to this package with references to
pulumi/pulumi/pkg/util/logging, and change that package to explicitly
call `flag.CommandLine.Parse` with an empty slice.

This should make it much easier to consume these packages in downstream
repos that have direct or indirect dependencies on google/glog.
2019-07-31 13:23:33 -05:00
James Nugent 7f6a6501ef Depend on pulumi fork of glog.
This removes the need for a replace directive in every downstream `go.mod`.
2019-07-25 16:10:53 -05:00
Chris Smith f6379fae05
Fix 'pulumi new' to support creating stacks in an org (#2950)
* Fix 'pulumi new' to support creating stacks in an org

* Fix tests
2019-07-22 10:12:26 -07:00
Alex Clemmer 4c069d5cf6 Address lint warnings 2019-07-16 00:58:33 -07:00
Alex Clemmer 9f809b9122 Run required policies as part of all updates 2019-07-16 00:58:33 -07:00
Alex Clemmer 9e9f7f07d3 Re-introduce pkg/util/archive
When a user runs `pulumi policy publish`, we need to package up a
directory of code and send it to the service. We implemented this once
before, for PPCs, so this simply re-introduces that code as it was in
the commit that deleted it.
2019-07-16 00:58:33 -07:00
Charles Kenney 9b4a85d57c dont print emojis in non-interactive mode 2019-06-30 01:35:19 -04:00
Praneet Loke 5ac446fffd
Add CI vars for Bitbucket Pipelines (#2783)
* Introduce a new package under ciutil for individual CI systems. Split-out each CI system with env var detection for each.

* Add Bitbucket Piplines env var detection.

* Update changelog with note about adding Bitbucket Pipelines detection.

* Rename the CI system structs.

* Move files from ciutil/systems to ciutil. Un-export some types that don't need visibility beyond the ciutil package.

* Un-export DetectSystem function and the System type.

* Add a test for CI systems which we only know by name and nothing else, i.e. those with just a baseCI implementation.
2019-05-30 17:35:41 -07:00
Matt Ellis 6278c1c8d9 Do not depend on backend package from client package
The next change is going to do some code motion that would create some
circular imports if we did not do this. There was nothing that
required the members we were moving be in the backend package, so it
was easy enough to pull them out.
2019-05-10 17:07:52 -07:00
Erin Krengel b0327b96db
Ekrengel/fix azure urls (#2709)
* Fix GetVSCInfo for various Azure urls
2019-05-08 09:25:59 -07:00
Praneet Loke f4112a4ea1
Add detection of Azure Pipelines (#2705)
* Add a var for PRNumber. Add an environment metadata key for PR number.

* Move the detection of PULUMI_CI_SYSTEM into vars.DetectVars(). Set the PRNumber CI property based on respective env vars from each CI system.

* Add Azure Pipelines build variables.

* Add tests for DetectVars.

* Added changelog entry for Azure Pipelines.

* Capture the value of env var being modified for the ciutil unit test, and restore their values at the end of them.

* Simplify the DetectVars function by moving the Pulumi CI system code into the switch-case expression.

* Rename the Pulumi CI system to Generic CI. Include the GenericCI system in the test case for DetectVars.
2019-05-07 11:49:13 -07:00
Alex Clemmer 8ee88f3bc6 Move planResult#Chdir into fsutil
`pulumi query` needs to exec a query program in some directory, just as
`pulumi up` does. But, it won't use the planning/step execution
machinery at all. One small piece these two paths have in common is that
they both can use the `planResult#Chdir`. So, this commit will move this
to `fsutil` so they can both use it.
2019-05-02 18:08:08 -07:00
CyrusNajmabadi c6d87157d9
Use result.Result in more places. (#2568) 2019-03-19 16:21:50 -07:00
CyrusNajmabadi ecb50b9b85
Use interface for 'result.Result' (#2569) 2019-03-19 12:40:10 -07:00
CyrusNajmabadi 5d66bea92a
Add in some top-down usage of result.Result (#2556) 2019-03-13 18:00:49 -07:00
CyrusNajmabadi 2a6bbf2a14
Cleaner style (#2557) 2019-03-13 17:52:50 -07:00
CyrusNajmabadi fb38fb9ecb
Panic if passing a nil error to Result.FromError. 2019-03-13 13:43:44 -07:00
CyrusNajmabadi 8fe0912956
Add a way to 'merge' to Result instances into one Result. (#2551) 2019-03-13 13:43:13 -07:00
Sean Gillespie b245fd7595
Use both a in-proc and out-of-proc pipenv lock (#2381)
* Use both a in-proc and out-of-proc pipenv lock

Turns out that flock alone is not sufficient to guarantee exclusive
access to a resource within a single process. To remedy this, a few
FileMutex type wraps both an in-proc mutex and an out-of-proc
file-backed mutex to achieve the goal of exclusive access to a resource
in both in-proc and out-of-proc scenarios.

This commit also uses this lock globally in the integration test
framework in order to globally serialize invocations of pipenv install.

* Remove merge markers
2019-01-23 09:32:59 -08:00
Matt Ellis f3fbc1d9ee Do not disable echo when stdin is not a terminal
When reading values like access keys or secrets from the terminal, we
would use the `terminal.ReadPassword` function to ensure characters
the user typed were not echo'd back to the console, as a convience.

When standard input was not connected to a tty (which would happen in
some cases like in docker when -t was not passed or in CI), this would
fail with an error about an bad ioctl. Update our logic such that
when standard in is not connected to a terminal, we just read input
normally.

While I was in the area, I unified the code for Windows and *NIX for
these functions.

Fixes #2017
2018-12-03 16:40:51 -08:00
CyrusNajmabadi d93e930856
Provide an actual 'table' printing routine so that we can appropriate choose columns widths dynamically. (#2266) 2018-12-02 00:22:07 -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
Chris Smith 0a76923c64
Add CircleCI support (#2143) 2018-11-01 11:20:31 -07:00
CyrusNajmabadi ba6b36a97b
Explicit disable interactive mode if the TERM variable is set to 'dumb' (#2131) 2018-10-30 17:48:55 -07:00
James Nugent 39742b3239 Spread array argument to variadic function 2018-10-29 18:09:00 -05:00
Matt Ellis 74672857fd Remove pulumi archive and archive uploading code
In the past, we had a mode where the CLI would upload the Pulumi
program, as well as its contents and do the execution remotely.

We've since stopped supporting that, but all the supporting code has
been left in the CLI.

This change removes the code we had to support the above case,
including the `pulumi archive` command, which was a debugging tool to
generate the archive we would have uploaded (which was helpful in the
past to understand why behavior differed between local execution and
remote execution.)
2018-10-26 18:03:58 -07: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
Praneet Loke 052bc69a52
Add gitlab metadata - Part 1 (#2090)
* Introduce new metadata keys `vcs.repo`, `vcs.kind` and `vcs.owner` to keep the keys generic for any vcs. Expanded the git SSH regex to account for bitbucket's .org domain.

* Introduce new stack tags keys with the same theme of detecting the vcs.
2018-10-23 14:53:52 -07:00
Chris Smith 3264012061
Get commit message and branch from CI if unavailable (#2062)
* Get commit message and branch from CI if unavailable

* Add tests
2018-10-16 15:37:02 -07:00