Commit Graph

6 Commits

Author SHA1 Message Date
Andrew Seigner b52dc35587
Fix `bin/fetch-proxy` on Linux (#4117)
`bin/fetch-proxy` was failing on Linux:

```bash
$ bin/fetch-proxy
linkerd2-proxy-v2.87.0/
linkerd2-proxy-v2.87.0/LICENSE
linkerd2-proxy-v2.87.0/bin/
linkerd2-proxy-v2.87.0/bin/linkerd2-proxy
bin/fetch-proxy: 31: [: Linux: unexpected operator
/home/siggy/code/linkerd2/target/proxy/linkerd2-proxy-v2.87.0
```

Also in CI:
https://github.com/linkerd/linkerd2/runs/473746447?check_suite_focus=true#step:5:32

Unfortunately `bin/fetch-proxy` still returned a zero exit status, because
`set -e` does not apply to commands that are part of `if` statements.
From https://ss64.com/bash/set.html:
```
-e  Exit immediately if a simple command exits with a non-zero status, unless
    the command that fails is part of an until or  while loop, part of an
    if statement, part of a && or || list, or if the command's return status
    is being inverted using !.  -o errexit
```
Fortunately when the `if` command failed, it fell through to the `else` clause
for Linux, and copied `linkerd-proxy` successfully.

Root cause was a `==` instead of `=`. `shellcheck` confirms, and also
recommends quoting:

```bash
$ shellcheck bin/fetch-proxy

In bin/fetch-proxy line 31:
if [ $(uname) == "Darwin" ]; then
     ^-- SC2046: Quote this to prevent word splitting.
              ^-- SC2039: In POSIX sh, == in place of = is undefined.
```

Apply `shellcheck` recommendations.

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2020-03-02 12:33:20 -08:00
Kevin Leimkuhler 44f1078498
Fix `fetch-proxy` script on macos (#4112)
`sha256sum` is not installed by default. Use `openssl dgst -sha256` instead.
2020-02-27 17:03:02 -08:00
Joakim Roubert 3411e22bdc fetch-proxy: Make POSIX compatible (#3625)
* fetch-proxy: Make POSIX compatible
* fetch-proxy: Update old comment to match current behavior

Getting the directory where the script resides can easily be done
without bash-specific functionality, and hence the script can be POSIX
compatible.

Change-Id: I30bd69dccbc950bdce3dc5da4bea279305a7b1f9
Signed-off-by: Joakim Roubert <joakimr@axis.com>
2019-10-28 16:45:23 -05:00
Oliver Gould d51f7f77a7
proxy: Update to v2.71.0 (#3433)
Update the proxy release process to fetch artifacts from tagged GitHub releases.

* Use GitHub Actions for Pull Requests (linkerd/linkerd2-proxy#343)
* ci: Run tests inside rust container (linkerd/linkerd2-proxy#344)
* update tracing crates (linkerd/linkerd2-proxy#346)
* core: Introduce the Recover trait (linkerd/linkerd2-proxy#347)
* ci: Automate releases via GitHub Actions (linkerd/linkerd2-proxy#349)
* Add opencensus exporter (linkerd/linkerd2-proxy#338)
* Add trace context crate (linkerd/linkerd2-proxy#339)
* ci: Use a readymade release action (linkerd/linkerd2-proxy#351)
* Add 587 to the list of ports to disable protocol detection (linkerd/linkerd2-proxy#350)
* Record SHA of package artifact (linkerd/linkerd2-proxy#353)
2019-09-17 15:18:24 -07:00
Andrew Seigner dccccebd79
Add LICENSE files to all Docker images (#1727)
To comply with certain environments, include our LICENSE file in all
Docker images.


Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2018-10-02 16:25:52 -07:00
Kevin Lingerfelt dae86da0e4
Allow docker-build-proxy to override the proxy version (#1324)
* Allow docker-build-proxy to override the proxy version
* Update based on review feedback
* fetch-proxy should return full path to executable

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-07-26 10:10:49 -07:00