Commit Graph

5 Commits (0ed616a4be1e744f41bbe187f62c8afcecac855d)

Author SHA1 Message Date
Dan Jacques 7466d1a9b7 [cipd] Run client in .bat to preserve STDIN.
Currently, the PowerShell execution does not allow STDIN to be
read by the CIPD client. Fix this by using PowerShell to acquire
the client, but batch to actually invoke the client. This removes
some indirection and allows STDIN to function as expected.

BUG=None
TEST=local
  - Ran w/ and w/out ".cipd_client.exe" locally, observed
    install and fallthrough.
  - Ran w/ an error code, observed exit code being preserved.
  - Ran "auth-login", was able to paste token.

Change-Id: I4efafa7dc80aa093de0fbf5dfd188c299fa104db
Reviewed-on: https://chromium-review.googlesource.com/563602
Commit-Queue: Daniel Jacques <dnj@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
8 years ago
Dan Jacques 7c2e05b430 [cipd] Fix CIPD bootstraps run concurrently.
It's currently possible for CIPD bootstraps that provision concurrently to:
1) On Linux, step on each other during download, and
2) On Windows, fail.

Fix these respective scripts so that bootstraps are safe to use
concurrently.

On Linux and Mac, we download to a temporary file and use "mv" (atomic)
to write it to the final destination. Concurrent initializations will
perform parallel downloads, execute the "mv", and copy their downloaded
file to the destination path.

On Windows, we use filesystem locking to lock the operation and ensure
that only one download can happen.

BUG=chromium:739195
TEST=local
  - Ran in parallel on Windows, Linux, and Max.

Change-Id: Ie050d37598da67389f21728e781bd58904ef9c17
Reviewed-on: https://chromium-review.googlesource.com/560521
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Daniel Jacques <dnj@chromium.org>
8 years ago
Robert Iannucci 78628da995 [cipd.ps1] catch CommandNotFoundException if git is not available yet
R=brucedawson@chromium.org

Bug: 714920
Change-Id: I6a0ea81e1d87fa2604e9f614a89ff48619cbffd0
Reviewed-on: https://chromium-review.googlesource.com/486085
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Vadim Shtayura <vadimsh@chromium.org>
8 years ago
Robert Iannucci be3daff577 Make cipd bootstrap script compatible with PowerShell 2.0
BUG=673940

Change-Id: I64d26454db3693499d4fb8f82bafb9eb04125c0d
Reviewed-on: https://chromium-review.googlesource.com/420408
Reviewed-by: Vadim Shtayura <vadimsh@chromium.org>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
8 years ago
Robert Iannucci 2188fe944f Add cipd bootstrap scripts to depot_tools.
This takes advantage of powershell on windows for a cleanish duplicate of the
posix version.

R=dnj@chromium.org, vadimsh@chromium.org
BUG=663843

Change-Id: Ib23a044ff912e3239b58848a26143eb6575826d5
Reviewed-on: https://chromium-review.googlesource.com/414228
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Vadim Shtayura <vadimsh@chromium.org>
8 years ago