Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,9 @@ RUN make argocd-all
ARG BUILD_ALL_CLIS=true
RUN if [ "$BUILD_ALL_CLIS" = "true" ] ; then \
make BIN_NAME=argocd-darwin-amd64 GOOS=darwin argocd-all && \
make BIN_NAME=argocd-windows-amd64.exe GOOS=windows argocd-all \
make BIN_NAME=argocd-windows-amd64.exe GOOS=windows argocd-all && \
make BIN_NAME=argocd-linux-amd64 GOOS=linux GOARCH=amd64 argocd-all && \
make BIN_NAME=argocd-linux-arm64 GOOS=linux GOARCH=arm64 argocd-all \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct me if I am wrong. But, this change will create an additional binary (85MB est) which is duplicate of argocd binary built here

; fi

####################################################################################################
Expand All @@ -139,4 +141,4 @@ RUN ln -s /usr/local/bin/argocd /usr/local/bin/argocd-repo-server
RUN ln -s /usr/local/bin/argocd /usr/local/bin/argocd-application-controller
RUN ln -s /usr/local/bin/argocd /usr/local/bin/argocd-dex

USER 999
USER 999
14 changes: 11 additions & 3 deletions server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -755,12 +755,20 @@ func newRedirectServer(port int, rootPath string) *http.Server {
// registerDownloadHandlers registers HTTP handlers to support downloads directly from the API server
// (e.g. argocd CLI)
func registerDownloadHandlers(mux *http.ServeMux, base string) {
linuxPath, err := exec.LookPath("argocd")
linuxAmdPath, err := exec.LookPath("argocd-linux-amd64")
if err != nil {
log.Warnf("argocd not in PATH")
log.Warnf("argocd-linux-amd64 not in PATH")
} else {
mux.HandleFunc(base+"/argocd-linux-amd64", func(w http.ResponseWriter, r *http.Request) {
http.ServeFile(w, r, linuxPath)
http.ServeFile(w, r, linuxAmdPath)
})
}
linuxArmPath, err := exec.LookPath("argocd-linux-arm64")
if err != nil {
log.Warnf("argocd-linux-arm64 not in PATH")
} else {
mux.HandleFunc(base+"/argocd-linux-arm64", func(w http.ResponseWriter, r *http.Request) {
http.ServeFile(w, r, linuxArmPath)
})
}
darwinPath, err := exec.LookPath("argocd-darwin-amd64")
Expand Down