Skip to content

Commit 2b688f0

Browse files
authored
Merge pull request #25 from unattended-backpack/dev
feat: added make
2 parents 4ceabcc + 69c4081 commit 2b688f0

4 files changed

Lines changed: 43 additions & 6 deletions

File tree

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ USER 10001:10001
191191
# Test that all expected binaries are working.
192192
COPY src/scripts/test.sh /home/petros/test.sh
193193
RUN sh /home/petros/test.sh bash ls cat echo openssl curl jq gpg \
194-
pkg-config rustc cargo node docker doctl cosign && \
194+
pkg-config rustc cargo node docker doctl cosign make && \
195195
rm /home/petros/test.sh
196196
RUN which cargo-prove
197197
RUN cargo prove --version

Makefile

Lines changed: 40 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,15 @@ IMAGE_NAME ?= petros
2121
IMAGE_TAG ?= latest
2222
ACT_PULL ?= true
2323

24+
.PHONY: init
25+
init:
26+
@echo "Initializing configuration files ..."
27+
@echo "Initialization complete. Review configuration before running."
28+
29+
.PHONY: clean
30+
clean:
31+
@echo "Cleaned."
32+
2433
.PHONY: build
2534
build:
2635
@echo "Building Petros Docker image ..."
@@ -60,12 +69,33 @@ build:
6069
.
6170
@echo "Build complete: $(IMAGE_NAME):$(IMAGE_TAG)"
6271

72+
.PHONY: test
73+
test:
74+
@echo "Running tests ..."
75+
@echo "... tests completed."
76+
77+
.PHONY: docker
78+
docker: build
79+
80+
.PHONY: ci
81+
ci: build
82+
83+
.PHONY: run
84+
run: shell
85+
86+
.PHONY: shell
87+
shell:
88+
@echo "Opening shell in container ..."
89+
docker run --rm -it \
90+
--entrypoint /petros/bin/bash \
91+
$(IMAGE_NAME):$(IMAGE_TAG)
92+
6393
.PHONY: act
6494
act:
6595
@echo "Running GitHub Actions workflow locally with act ..."
6696
@if [ ! -d ".act-secrets" ]; then \
6797
echo "WARNING: .act-secrets/ directory not found" >&2; \
68-
echo "See TESTING.md for setup instructions" >&2; \
98+
echo "See docs/WORKFLOW_TESTING.md for setup instructions" >&2; \
6999
fi
70100
act push -j release \
71101
--pull=$(ACT_PULL) \
@@ -77,8 +107,15 @@ help:
77107
@echo "Petros Build System"
78108
@echo ""
79109
@echo "Targets:"
80-
@echo " build Build the Petros Docker image."
81-
@echo " act Test GitHub Actions release workflow locally."
110+
@echo " init Initialize config from examples."
111+
@echo " clean Clean output directories."
112+
@echo " build Build native binaries."
113+
@echo " test Run all tests for the build."
114+
@echo " docker Build Docker image (compiles inside container)."
115+
@echo " ci Build Docker image from pre-built binaries."
116+
@echo " run Run the built Docker image locally."
117+
@echo " shell Open a shell in the Docker image."
118+
@echo " act Test GitHub Actions release workflow locally."
82119
@echo " help Show this help message."
83120
@echo ""
84121
@echo "Configuration:"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Petros
22

3-
Petros is a Docker build image containing the software tooling we need and is designed to be resilient against supply chain disruption or attack.
3+
Upon this rock, I will build my church. Petros is a Docker build image containing the software tooling we need and is designed to be resilient against supply chain disruption or attack.
44

55
## About Attic
66

flake.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
petros = pkgs.buildEnv {
9797
name = "petros-env";
9898
paths = with pkgs; [
99-
bash coreutils git cacert curl jq
99+
bash coreutils git cacert curl jq gnumake
100100
clang lld pkg-config
101101
openssl zlib lz4 snappy zstd
102102
attic-client

0 commit comments

Comments
 (0)