fix(build) cleanup build process [EE-5555] (#9026)

* improve makefile and related files

* update wording for build-all target
pull/9003/head
Matt Hook 2023-06-01 13:50:34 +12:00 committed by GitHub
parent 1b041a029e
commit 3cd0409184
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 11 deletions

View File

@ -13,7 +13,7 @@ on:
- 'build/linux/alpine.Dockerfile'
- 'build/windows/Dockerfile'
- '.github/workflows/pr-security.yml'
jobs:
client-dependencies:
name: Client Dependency Check
@ -24,7 +24,7 @@ jobs:
outputs:
jsdiff: ${{ steps.set-diff-matrix.outputs.js_diff_result }}
steps:
- name: checkout repository
- name: checkout repository
uses: actions/checkout@master
- name: scan vulnerabilities by Snyk
@ -157,7 +157,7 @@ jobs:
run: yarn --frozen-lockfile
- name: build
run: make build
run: make build-all
- name: set up docker buildx
uses: docker/setup-buildx-action@v2

View File

@ -96,7 +96,7 @@ Portainer server can now be accessed at <https://localhost:9443>. and UI dev ser
if you want to build the project you can run:
```sh
make build
make build-all
```
For additional make commands, run `make help`.

View File

@ -21,7 +21,7 @@ GOTESTSUM=go run gotest.tools/gotestsum@latest
init-dist:
@mkdir -p dist
build: build-server build-client ## Build the server and client
build-all: deps build-server build-client ## Build the client, server and download external dependancies (doesn't build an image)
build-client: init-dist ## Build the client
export NODE_ENV=$(ENV) && yarn build --config $(WEBPACK_CONFIG)
@ -29,21 +29,21 @@ build-client: init-dist ## Build the client
build-server: init-dist ## Build the server binary
./build/build_binary.sh "$(PLATFORM)" "$(ARCH)"
build-image: build ## Build the Portainer image locally
build-image: build-all ## Build the Portainer image locally
docker buildx build --load -t portainerci/portainer:$(TAG) -f build/linux/Dockerfile .
devops: clean init-dist deps build-client ## Build the server binary for CI
build-storybook: ## Build and serve the storybook files
yarn storybook:build
devops: clean deps build-client ## Build the everything target specifically for CI
echo "Building the devops binary..."
@./build/build_binary_azuredevops.sh "$(PLATFORM)" "$(ARCH)"
build-storybook:
yarn storybook:build
##@ Build dependencies
.PHONY: deps server-deps client-deps tidy
deps: server-deps client-deps ## Download all client and server build dependancies
server-deps: ## Download dependant server binaries
server-deps: init-dist ## Download dependant server binaries
@./build/download_binaries.sh $(PLATFORM) $(ARCH)
client-deps: ## Install client dependencies

View File

@ -17,5 +17,6 @@ docker run -d \
-v /var/run/docker.sock:/var/run/alternative.sock:z \
-v /tmp:/tmp \
--name portainer \
--rm \
portainer/base \
/app/portainer ${PORTAINER_FLAGS}