Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[local-app] add other arch support #5944

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions components/dashboard/conf/Caddyfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@
path /static/* /favicon* /manifest.json
}

rewrite /static/bin/gitpod-local-companion-linux /static/bin/gitpod-local-companion-linux-amd64
rewrite /static/bin/gitpod-local-companion-darwin /static/bin/gitpod-local-companion-darwin-amd64
rewrite /static/bin/gitpod-local-companion-windows.exe /static/bin/gitpod-local-companion-windows-amd64.exe
rewrite /static/bin/gitpod-local-companion-linux.gz /static/bin/gitpod-local-companion-linux-amd64.gz
rewrite /static/bin/gitpod-local-companion-darwin.gz /static/bin/gitpod-local-companion-darwin-amd64.gz
rewrite /static/bin/gitpod-local-companion-windows.exe.gz /static/bin/gitpod-local-companion-windows-amd64.exe.gz

@bin_asset {
file
path /static/bin/*
Expand Down
14 changes: 9 additions & 5 deletions components/dashboard/leeway.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,18 @@ RUN find . -type f \( -name '*.html' -o -name '*.js' -o -name '*.css' -o -name '
RUN find . -type f \( -name '*.html' -o -name '*.js' -o -name '*.css' -o -name '*.png' -o -name '*.svg' -o -name '*.map' -o -name '*.json' \) \
-exec /bin/sh -c 'brotli -v -q 11 -o "$1.br" "$1"' /bin/sh {} \;

COPY components-local-app--app/components-local-app--app-linux/local-app /www/static/bin/gitpod-local-companion-linux
COPY components-local-app--app/components-local-app--app-darwin/local-app /www/static/bin/gitpod-local-companion-darwin
COPY components-local-app--app/components-local-app--app-windows/local-app.exe /www/static/bin/gitpod-local-companion-windows.exe
COPY components-local-app--app/components-local-app--app-linux-amd64/local-app /www/static/bin/gitpod-local-companion-linux-amd64
COPY components-local-app--app/components-local-app--app-darwin-amd64/local-app /www/static/bin/gitpod-local-companion-darwin-amd64
COPY components-local-app--app/components-local-app--app-windows-amd64/local-app.exe /www/static/bin/gitpod-local-companion-windows-amd64.exe
COPY components-local-app--app/components-local-app--app-linux-arm64/local-app /www/static/bin/gitpod-local-companion-linux-arm64
COPY components-local-app--app/components-local-app--app-darwin-arm64/local-app /www/static/bin/gitpod-local-companion-darwin-arm64
COPY components-local-app--app/components-local-app--app-windows-386/local-app.exe /www/static/bin/gitpod-local-companion-windows-arm64.exe
COPY components-local-app--app/components-local-app--app-windows-386/local-app.exe /www/static/bin/gitpod-local-companion-windows-386.exe

COPY components-gitpod-protocol--gitpod-schema/gitpod-schema.json /www/static/schemas/gitpod-schema.json

RUN for PLATFORM in linux darwin windows.exe;do \
gzip -v -f -9 -k "/www/static/bin/gitpod-local-companion-$PLATFORM"; \
RUN for FILE in `ls /www/static/bin/gitpod-local-companion*`;do \
gzip -v -f -9 -k "$FILE"; \
done

FROM caddy/caddy:2.4.0-alpine
Expand Down
95 changes: 89 additions & 6 deletions components/local-app/BUILD.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@ packages:
config:
commands: [["echo"]]
deps:
- :app-linux
- :app-darwin
- :app-windows
- name: app-linux
- :app-linux-amd64
- :app-linux-arm64
- :app-darwin-amd64
- :app-darwin-arm64
- :app-windows-386
- :app-windows-amd64
- :app-windows-arm64
- name: app-linux-amd64
type: go
srcs:
- go.mod
Expand All @@ -21,11 +25,50 @@ packages:
env:
- CGO_ENABLED=0
- GOOS=linux
- GOARCH=amd64
prep:
- ["cp", "_deps/components-local-app--version/version.txt", "version.txt"]
config:
packaging: app
- name: app-darwin
- name: app-linux-arm64
type: go
srcs:
- go.mod
- go.sum
- "**/*.go"
deps:
- :version
- components/supervisor-api/go:lib
- components/gitpod-protocol/go:lib
- components/local-app-api/go:lib
env:
- CGO_ENABLED=0
- GOOS=linux
- GOARCH=arm64
prep:
- ["cp", "_deps/components-local-app--version/version.txt", "version.txt"]
config:
packaging: app
- name: app-darwin-amd64
type: go
srcs:
- go.mod
- go.sum
- "**/*.go"
deps:
- :version
- components/supervisor-api/go:lib
- components/gitpod-protocol/go:lib
- components/local-app-api/go:lib
env:
- CGO_ENABLED=0
- GOOS=darwin
- GOARCH=amd64
prep:
- ["cp", "_deps/components-local-app--version/version.txt", "version.txt"]
config:
packaging: app
- name: app-darwin-arm64
type: go
srcs:
- go.mod
Expand All @@ -39,11 +82,50 @@ packages:
env:
- CGO_ENABLED=0
- GOOS=darwin
- GOARCH=arm64
prep:
- ["cp", "_deps/components-local-app--version/version.txt", "version.txt"]
config:
packaging: app
- name: app-windows-amd64
type: go
srcs:
- go.mod
- go.sum
- "**/*.go"
deps:
- :version
- components/supervisor-api/go:lib
- components/gitpod-protocol/go:lib
- components/local-app-api/go:lib
env:
- CGO_ENABLED=0
- GOOS=windows
- GOARCH=amd64
prep:
- ["cp", "_deps/components-local-app--version/version.txt", "version.txt"]
config:
packaging: app
- name: app-windows-386
type: go
srcs:
- go.mod
- go.sum
- "**/*.go"
deps:
- :version
- components/supervisor-api/go:lib
- components/gitpod-protocol/go:lib
- components/local-app-api/go:lib
env:
- CGO_ENABLED=0
- GOOS=windows
- GOARCH=386
prep:
- ["cp", "_deps/components-local-app--version/version.txt", "version.txt"]
config:
packaging: app
- name: app-windows
- name: app-windows-arm64
type: go
srcs:
- go.mod
Expand All @@ -57,6 +139,7 @@ packages:
env:
- CGO_ENABLED=0
- GOOS=windows
- GOARCH=arm64
prep:
- ["cp", "_deps/components-local-app--version/version.txt", "version.txt"]
config:
Expand Down
15 changes: 12 additions & 3 deletions components/local-app/leeway.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,17 @@
FROM alpine:3.14

WORKDIR /app
COPY components-local-app--app/components-local-app--app-linux/local-app local-app-linux
COPY components-local-app--app/components-local-app--app-darwin/local-app local-app-darwin
COPY components-local-app--app/components-local-app--app-windows/local-app.exe local-app-windows.exe
COPY components-local-app--app/components-local-app--app-linux-amd64/local-app local-app-linux
COPY components-local-app--app/components-local-app--app-darwin-amd64/local-app local-app-darwin
COPY components-local-app--app/components-local-app--app-windows-amd64/local-app.exe local-app-windows.exe

COPY components-local-app--app/components-local-app--app-linux-amd64/local-app local-app-linux-amd64
COPY components-local-app--app/components-local-app--app-darwin-amd64/local-app local-app-darwin-amd64
COPY components-local-app--app/components-local-app--app-windows-amd64/local-app.exe local-app-windows-amd64.exe

COPY components-local-app--app/components-local-app--app-linux-arm64/local-app local-app-linux-arm64
COPY components-local-app--app/components-local-app--app-darwin-arm64/local-app local-app-darwin-arm64
COPY components-local-app--app/components-local-app--app-windows-arm64/local-app.exe local-app-windows-arm64.exe
COPY components-local-app--app/components-local-app--app-windows-386/local-app.exe local-app-windows-386.exe

CMD ["/bin/sh", "-c", "cp /app/* /out"]
4 changes: 2 additions & 2 deletions components/local-app/pkg/auth/auth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Licensed under the GNU Affero General Public License (AGPL).
// See License-AGPL.txt in the project root for license information.

//go:build linux
// +build linux
//go:build linux && amd64
// +build linux,amd64

package auth

Expand Down