Commit Graph

9 Commits

Author SHA1 Message Date
Ali Ariff 61d7dedd98
Build ARM docker images (#4794)
Build ARM docker images in the release workflow.

# Changes:
- Add a new env key `DOCKER_MULTIARCH` and `DOCKER_PUSH`. When set, it will build multi-arch images and push them to the registry. See https://github.com/docker/buildx/issues/59 for why it must be pushed to the registry.
- Usage of `crazy-max/ghaction-docker-buildx ` is necessary as it already configured with the ability to perform cross-compilation (using QEMU) so we can just use it, instead of manually set up it.
- Usage of `buildx` now make default global arguments. (See: https://docs.docker.com/engine/reference/builder/#automatic-platform-args-in-the-global-scope)

# Follow-up:
- Releasing the CLI binary file in ARM architecture. The docker images resulting from these changes already build in the ARM arch. Still, we need to make another adjustment like how to retrieve those binaries and to name it correctly as part of Github Release artifacts.

Signed-off-by: Ali Ariff <ali.ariff12@gmail.com>
2020-08-05 11:14:01 -07:00
Ali Ariff d457178f43
Fetch proxy with specific arch (#4739)
https://github.com/linkerd/linkerd2-proxy/pull/593 changed the proxy
release process to produce platform-specific binaries.

This change modifies the bin/fetch-proxy script to fetch amd64-specific
binaries. The proxy version has been updated to v1.104.1, which includes
no code changes since v1.104.0.

Signed-off-by: Ali Ariff <ali.ariff12@gmail.com>
2020-07-13 17:48:34 -07:00
Joakim Roubert 8d19b4055b
Improve shellscript portability by using /bin/env (#4628)
Using `/bin/env` increases portability for the shell scripts (and often using `/bin/env` is requested by e.g. Mac users). This would also facilitate testing scripts with different Bash versions via the Bash containers, as they have bash in `/usr/local` and not `/bin`. Using `/bin/env`, there is no need to change the script when testing. (I assume the latter was behind c301ea214b (diff-ecec5e3a811f60bc2739019004fa35b0), which would not happen using `/bin/env`.)

Signed-off-by: Joakim Roubert <joakimr@axis.com>
2020-06-19 15:49:29 -04:00
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