Skip to content

Commit 7af368a

Browse files
committed
chore: add push single project
Signed-off-by: Gabriele Bartolini <[email protected]>
1 parent ff6b43d commit 7af368a

File tree

2 files changed

+30
-9
lines changed

2 files changed

+30
-9
lines changed

BUILD.md

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,15 @@ The `Makefile` dynamically discovers all subdirectories that contain a
3131
`metadata.hcl` file (e.g., `./pgvector/metadata.hcl`) and creates individual
3232
build targets for each project.
3333

34-
### 1. Build Configuration Check (Dry Run)
34+
### 1. Check prerequisites only
35+
36+
To verify that Docker and Buildx are correctly installed and configured:
37+
38+
```bash
39+
make prereqs
40+
```
41+
42+
### 2. Build configuration check (dry run)
3543

3644
To verify the configuration (running `docker buildx bake --check`) for all
3745
projects without building or pulling layers:
@@ -40,41 +48,41 @@ projects without building or pulling layers:
4048
make check
4149
```
4250

43-
### 2. Build All Projects
51+
### 3. Build all projects
4452

4553
To check prerequisites and build all discovered projects:
4654

4755
```bash
4856
make
4957
# or
5058
make all
51-
````
59+
```
5260

53-
### 3. Build a Specific Project
61+
### 4. Build a specific project
5462

5563
To build a single project (e.g., the directory named `pgvector`):
5664

5765
```bash
5866
make pgvector
5967
```
6068

61-
### 4. Push All Images
69+
### 5. Push all images
6270

6371
To build all images and immediately push them to the configured registry:
6472

6573
```bash
6674
make push
6775
```
6876

69-
### 5. Check Prerequisites Only
77+
### 6. Push images for a specific project
7078

71-
To verify that Docker and Buildx are correctly installed and configured:
79+
To push images for a single project (e.g., the directory named `pgvector`):
7280

7381
```bash
74-
make prereqs
82+
make push-pgvector
7583
```
7684

77-
### 6. Dry Run Mode
85+
### 7. Dry run mode
7886

7987
To see the commands that would be executed without running the actual `docker
8088
buildx bake` command, set the `DRY_RUN` flag:

Makefile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,19 @@ push: all
5050
fi; \
5151
)
5252

53+
# --------------------------
54+
# Generic per-project push
55+
# Usage: make push-<project>
56+
# --------------------------
57+
push-%: prereqs
58+
@echo -e "$(BLUE)Performing bake --push for $*...$(NC)"
59+
ifeq ($(DRY_RUN),true)
60+
@echo -e "$(GREEN)[DRY RUN] docker buildx bake -f $*/metadata.hcl -f docker-bake.hcl --push$(NC)"
61+
else
62+
docker buildx bake -f $*/metadata.hcl -f docker-bake.hcl --push
63+
endif
64+
@echo -e "$(GREEN)--- Successfully pushed $* ---$(NC)"
65+
5366
# --------------------------
5467
# Build targets
5568
# --------------------------

0 commit comments

Comments
 (0)