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
|
@ -157,7 +157,7 @@ jobs:
|
||||||
run: yarn --frozen-lockfile
|
run: yarn --frozen-lockfile
|
||||||
|
|
||||||
- name: build
|
- name: build
|
||||||
run: make build
|
run: make build-all
|
||||||
|
|
||||||
- name: set up docker buildx
|
- name: set up docker buildx
|
||||||
uses: docker/setup-buildx-action@v2
|
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:
|
if you want to build the project you can run:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
make build
|
make build-all
|
||||||
```
|
```
|
||||||
|
|
||||||
For additional make commands, run `make help`.
|
For additional make commands, run `make help`.
|
||||||
|
|
14
Makefile
14
Makefile
|
@ -21,7 +21,7 @@ GOTESTSUM=go run gotest.tools/gotestsum@latest
|
||||||
init-dist:
|
init-dist:
|
||||||
@mkdir -p 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
|
build-client: init-dist ## Build the client
|
||||||
export NODE_ENV=$(ENV) && yarn build --config $(WEBPACK_CONFIG)
|
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-server: init-dist ## Build the server binary
|
||||||
./build/build_binary.sh "$(PLATFORM)" "$(ARCH)"
|
./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 .
|
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..."
|
echo "Building the devops binary..."
|
||||||
@./build/build_binary_azuredevops.sh "$(PLATFORM)" "$(ARCH)"
|
@./build/build_binary_azuredevops.sh "$(PLATFORM)" "$(ARCH)"
|
||||||
|
|
||||||
build-storybook:
|
|
||||||
yarn storybook:build
|
|
||||||
|
|
||||||
##@ Build dependencies
|
##@ Build dependencies
|
||||||
.PHONY: deps server-deps client-deps tidy
|
.PHONY: deps server-deps client-deps tidy
|
||||||
deps: server-deps client-deps ## Download all client and server build dependancies
|
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)
|
@./build/download_binaries.sh $(PLATFORM) $(ARCH)
|
||||||
|
|
||||||
client-deps: ## Install client dependencies
|
client-deps: ## Install client dependencies
|
||||||
|
|
|
@ -17,5 +17,6 @@ docker run -d \
|
||||||
-v /var/run/docker.sock:/var/run/alternative.sock:z \
|
-v /var/run/docker.sock:/var/run/alternative.sock:z \
|
||||||
-v /tmp:/tmp \
|
-v /tmp:/tmp \
|
||||||
--name portainer \
|
--name portainer \
|
||||||
|
--rm \
|
||||||
portainer/base \
|
portainer/base \
|
||||||
/app/portainer ${PORTAINER_FLAGS}
|
/app/portainer ${PORTAINER_FLAGS}
|
||||||
|
|
Loading…
Reference in New Issue