-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathMakefile
More file actions
55 lines (41 loc) · 1.87 KB
/
Copy pathMakefile
File metadata and controls
55 lines (41 loc) · 1.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# This file is for you! Edit it to implement your own hooks (make targets) into
# the project as automated steps to be executed on locally and in the CD pipeline.
include scripts/init.mk
# ==============================================================================
# Example CI/CD targets are: dependencies, build, publish, deploy, clean, etc.
DEVCONTAINER_DIR ?= src/jekyll-devcontainer
DEVCONTAINER_IMAGE ?= ghcr.io/nhsdigital/nhs-notify-web-cms
dependencies: # Install dependencies needed to build and test the project @Pipeline
# TODO: Implement installation of your project dependencies
build: # Build the project artefact @Pipeline
if [[ "$${BUILD_TARGET:-all}" != "devcontainer" ]]; then \
(cd docs && make build); \
fi
make build-devcontainer
publish: # Publish the project artefact @Pipeline
make publish-devcontainer
build-devcontainer: # Build the devcontainer image @Pipeline
make -C ${DEVCONTAINER_DIR} build IMAGE=${DEVCONTAINER_IMAGE}
publish-devcontainer: # Publish the devcontainer image @Pipeline
make -C ${DEVCONTAINER_DIR} publish IMAGE=${DEVCONTAINER_IMAGE}
deploy: # Deploy the project artefact to the target environment @Pipeline
# TODO: Implement the artefact deployment step
clean:: # Clean-up project resources (main) @Operations
rm -f .version
# TODO: Implement project resources clean-up step
config:: _install-dependencies version # Configure development environment (main) @Configuration
(cd docs && make install)
version:
rm -f .version
make version-create-effective-file dir=.
echo "{ \"schemaVersion\": 1, \"label\": \"version\", \"message\": \"$$(head -n 1 .version 2> /dev/null || echo unknown)\", \"color\": \"orange\" }" > version.json
# ==============================================================================
${VERBOSE}.SILENT: \
build \
build-devcontainer \
clean \
config \
dependencies \
deploy \
publish \
publish-devcontainer \