From 9292ae1e84cd93ed05c53ce70fe1eac9819ecbb8 Mon Sep 17 00:00:00 2001 From: Alexander Zigelski <7140800+crunchtime-ali@users.noreply.github.com> Date: Wed, 19 Aug 2020 18:55:53 +0200 Subject: [PATCH] ci: static files not being built with Homebrew and dirty binary. Fixes #3769 (#3801) --- .github/workflows/ci-build.yaml | 1 + .gitignore | 1 + Makefile | 12 ++++++------ 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci-build.yaml b/.github/workflows/ci-build.yaml index 14bd0143d7a2..e22b5bb5429d 100644 --- a/.github/workflows/ci-build.yaml +++ b/.github/workflows/ci-build.yaml @@ -56,6 +56,7 @@ jobs: env: GOPATH: /home/runner/go PROFILE: mysql + STATIC_FILES: false run: | echo '127.0.0.1 dex' | sudo tee -a /etc/hosts echo '127.0.0.1 minio' | sudo tee -a /etc/hosts diff --git a/.gitignore b/.gitignore index 022d165ce1d9..1b95c1db3b63 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,4 @@ git-ask-pass.sh /pkg/apiclient/workflowtemplate/workflow-template.swagger.json /site/ /node_modules/ +/.brew_home diff --git a/Makefile b/Makefile index 8a16d3fc7648..6d8ed79639a9 100644 --- a/Makefile +++ b/Makefile @@ -43,7 +43,7 @@ CONTROLLER_IMAGE_FILE := dist/controller-image.marker # perform static compilation STATIC_BUILD ?= true -CI ?= false +STATIC_FILES ?= true PROFILE ?= minimal # whether or not to start the Argo Service in TLS mode SECURE := false @@ -51,7 +51,7 @@ AUTH_MODE := hybrid ifeq ($(PROFILE),sso) AUTH_MODE := sso endif -ifeq ($(CI),true) +ifeq ($(STATIC_FILES),false) AUTH_MODE := client endif K3D := $(shell if [ "`which kubectl`" != '' ] && [ "`kubectl config current-context`" = "k3s-default" ]; then echo true; else echo false; fi) @@ -66,7 +66,7 @@ ifeq ($(PROFILE),postgres) ALWAYS_OFFLOAD_NODE_STATUS := true endif -ifeq ($(CI),true) +ifeq ($(STATIC_FILES),false) TEST_OPTS := -coverprofile=coverage.out else TEST_OPTS := @@ -140,7 +140,7 @@ cli: dist/argo argo-server.crt argo-server.key ui/dist/node_modules.marker: ui/package.json ui/yarn.lock # Get UI dependencies @mkdir -p ui/node_modules -ifeq ($(CI),false) +ifeq ($(STATIC_FILES),true) yarn --cwd ui install endif @mkdir -p ui/dist @@ -149,7 +149,7 @@ endif ui/dist/app/index.html: ui/dist/node_modules.marker $(UI_FILES) # Build UI @mkdir -p ui/dist/app -ifeq ($(CI),false) +ifeq ($(STATIC_FILES),true) yarn --cwd ui build else echo "Built without static files" > ui/dist/app/index.html @@ -314,7 +314,7 @@ lint: server/static/files.go $(GOPATH)/bin/golangci-lint # Lint Go files golangci-lint run --fix --verbose --concurrency 4 --timeout 5m # Lint UI files -ifeq ($(CI),false) +ifeq ($(STATIC_FILES),true) yarn --cwd ui lint endif