mirror of https://github.com/portainer/portainer
fix(build) cleanup build process [EE-5555] (#9026)
* improve makefile and related files * update wording for build-all targetpull/9003/head
parent
1b041a029e
commit
3cd0409184
|
@ -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
|
||||
|
|
|
@ -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`.
|
||||
|
|
14
Makefile
14
Makefile
|
@ -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
|
||||
|
|
|
@ -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}
|
||||
|
|
Loading…
Reference in New Issue