-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from InCommon/TIDO-466
TIDO-466 Script static site build
- Loading branch information
Showing
1,736 changed files
with
163 additions
and
152,306 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.dockerignore | ||
.git | ||
.gitignore | ||
bare_source | ||
build | ||
cypress* | ||
Dockerfile | ||
node_modules | ||
output | ||
README.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ | |
|
||
# production | ||
/build | ||
/artifact/v* | ||
|
||
# misc | ||
.DS_Store | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
FROM node:20-alpine3.18 | ||
|
||
RUN mkdir -p /usr/src/app | ||
|
||
WORKDIR /usr/src/app | ||
|
||
COPY package.json . | ||
COPY package-lock.json . | ||
|
||
RUN npm ci --no-audit --omit=dev | ||
|
||
COPY . . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# This is the main interface into the repository for CI automation/reproducible builds. | ||
# | ||
# All targets assume they're running on a Linux or macOS host with Bash and Docker installed. | ||
# Any other dependencies should be satisfied by containers. | ||
# | ||
|
||
.DEFAULT_GOAL := help | ||
|
||
DEBUG = [DEBUG] | ||
INFO = [INFO] | ||
SUCCESS = [INFO] | ||
|
||
CURRENT_UID := $(shell id -u) | ||
|
||
compose := docker-compose | ||
|
||
.PHONY: all | ||
all: build | ||
|
||
.PHONY: build | ||
build: ## Build the static site from the container image | ||
@echo "$(INFO) Building the wayfinder static site files" | ||
$(compose) run --build -e CURRENT_UID=${CURRENT_UID} --rm build-wayfinder | ||
@echo "$(SUCCESS) Successfully built!" | ||
|
||
.PHONY: clean | ||
clean: ## Remove build artifacts | ||
rm -f artifact/v* | ||
|
||
.PHONY: help | ||
help: ## Display this help (default) | ||
@echo "Targets:" | ||
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort \ | ||
| awk 'BEGIN {FS = ":.*?## "}; {printf " %-17s%s\n", $$1, $$2}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1.0.0 |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/sh | ||
|
||
HOME_DIR=/usr/src/app | ||
VERSION=v$(cat $HOME_DIR/VERSION.txt) | ||
|
||
cd $HOME_DIR/build | ||
|
||
tar -czvf $HOME_DIR/artifact/$VERSION.tar.gz * | ||
|
||
chown $CURRENT_UID:$CURRENT_UID $HOME_DIR/artifact/$VERSION.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
version: "3.8" | ||
|
||
services: | ||
|
||
build-wayfinder: | ||
build: | ||
context: "." | ||
command: sh -c "npm run build && bin/zip_build.sh" | ||
volumes: | ||
- type: bind | ||
source: ./artifact | ||
target: /usr/src/app/artifact |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.