mirror of https://github.com/status-im/consul.git
chore: Update Digital Team Files (#14945)
* Update generated scripts (website-build.sh) * Update generated scripts (should-build.sh) * Update generated scripts (website-start.sh) * Update generated website Makefile
This commit is contained in:
parent
9dfff268de
commit
0d2d8c4d45
|
@ -1,5 +1,17 @@
|
||||||
|
######################################################
|
||||||
|
# NOTE: This file is managed by the Digital Team's #
|
||||||
|
# Terraform configuration @ hashicorp/mktg-terraform #
|
||||||
|
######################################################
|
||||||
|
|
||||||
.DEFAULT_GOAL := website
|
.DEFAULT_GOAL := website
|
||||||
|
|
||||||
|
# Set the preview mode for the website shell to "developer" or "io"
|
||||||
|
PREVIEW_MODE ?= developer
|
||||||
|
REPO ?= consul
|
||||||
|
|
||||||
|
# Enable setting alternate docker tool, e.g. 'make DOCKER_CMD=podman'
|
||||||
|
DOCKER_CMD ?= docker
|
||||||
|
|
||||||
PWD=$$(pwd)
|
PWD=$$(pwd)
|
||||||
DOCKER_IMAGE="hashicorp/dev-portal"
|
DOCKER_IMAGE="hashicorp/dev-portal"
|
||||||
DOCKER_IMAGE_LOCAL="dev-portal-local"
|
DOCKER_IMAGE_LOCAL="dev-portal-local"
|
||||||
|
@ -13,27 +25,27 @@ DOCKER_RUN_FLAGS=-it \
|
||||||
--volume "$(PWD)/redirects.js:/app/redirects.js" \
|
--volume "$(PWD)/redirects.js:/app/redirects.js" \
|
||||||
--volume "next-dir:/app/website-preview/.next" \
|
--volume "next-dir:/app/website-preview/.next" \
|
||||||
--volume "$(PWD)/.env:/app/.env" \
|
--volume "$(PWD)/.env:/app/.env" \
|
||||||
-e "REPO=consul" \
|
-e "REPO=$(REPO)" \
|
||||||
-e "PREVIEW_MODE=io"
|
-e "PREVIEW_MODE=$(PREVIEW_MODE)"
|
||||||
|
|
||||||
# Default: run this if working on the website locally to run in watch mode.
|
# Default: run this if working on the website locally to run in watch mode.
|
||||||
.PHONY: website
|
.PHONY: website
|
||||||
website:
|
website:
|
||||||
@echo "==> Downloading latest Docker image..."
|
@echo "==> Downloading latest Docker image..."
|
||||||
@docker pull $(DOCKER_IMAGE)
|
@$(DOCKER_CMD) pull $(DOCKER_IMAGE)
|
||||||
@echo "==> Starting website..."
|
@echo "==> Starting website..."
|
||||||
@docker run $(DOCKER_RUN_FLAGS) $(DOCKER_IMAGE)
|
@$(DOCKER_CMD) run $(DOCKER_RUN_FLAGS) $(DOCKER_IMAGE)
|
||||||
|
|
||||||
# Use this if you have run `website/build-local` to use the locally built image.
|
# Use this if you have run `website/build-local` to use the locally built image.
|
||||||
.PHONY: website/local
|
.PHONY: website/local
|
||||||
website/local:
|
website/local:
|
||||||
@echo "==> Starting website from local image..."
|
@echo "==> Starting website from local image..."
|
||||||
@docker run $(DOCKER_RUN_FLAGS) $(DOCKER_IMAGE_LOCAL)
|
@$(DOCKER_CMD) run $(DOCKER_RUN_FLAGS) $(DOCKER_IMAGE_LOCAL)
|
||||||
|
|
||||||
# Run this to generate a new local Docker image.
|
# Run this to generate a new local Docker image.
|
||||||
.PHONY: website/build-local
|
.PHONY: website/build-local
|
||||||
website/build-local:
|
website/build-local:
|
||||||
@echo "==> Building local Docker image"
|
@echo "==> Building local Docker image"
|
||||||
@docker build https://github.com/hashicorp/dev-portal.git\#main \
|
@$(DOCKER_CMD) build https://github.com/hashicorp/dev-portal.git\#main \
|
||||||
-t $(DOCKER_IMAGE_LOCAL)
|
-t $(DOCKER_IMAGE_LOCAL)
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
######################################################
|
||||||
|
# NOTE: This file is managed by the Digital Team's #
|
||||||
|
# Terraform configuration @ hashicorp/mktg-terraform #
|
||||||
|
######################################################
|
||||||
|
|
||||||
# This is run during the website build step to determine if we should skip the build or not.
|
# This is run during the website build step to determine if we should skip the build or not.
|
||||||
# More information: https://vercel.com/docs/platform/projects#ignored-build-step
|
# More information: https://vercel.com/docs/platform/projects#ignored-build-step
|
||||||
|
@ -10,4 +15,4 @@ if [[ "$VERCEL_GIT_COMMIT_REF" == "stable-website" ]] ; then
|
||||||
else
|
else
|
||||||
# Check for differences in the website directory
|
# Check for differences in the website directory
|
||||||
git diff --quiet HEAD^ HEAD ./
|
git diff --quiet HEAD^ HEAD ./
|
||||||
fi
|
fi
|
|
@ -1,3 +1,8 @@
|
||||||
|
######################################################
|
||||||
|
# NOTE: This file is managed by the Digital Team's #
|
||||||
|
# Terraform configuration @ hashicorp/mktg-terraform #
|
||||||
|
######################################################
|
||||||
|
|
||||||
# Repo which we are cloning and executing npm run build:deploy-preview within
|
# Repo which we are cloning and executing npm run build:deploy-preview within
|
||||||
REPO_TO_CLONE=dev-portal
|
REPO_TO_CLONE=dev-portal
|
||||||
# Set the subdirectory name for the base project
|
# Set the subdirectory name for the base project
|
||||||
|
@ -7,7 +12,7 @@ CLONE_DIR=website-preview
|
||||||
# The product for which we are building the deploy preview
|
# The product for which we are building the deploy preview
|
||||||
PRODUCT=consul
|
PRODUCT=consul
|
||||||
# Preview mode, controls the UI rendered (either the product site or developer). Can be `io` or `developer`
|
# Preview mode, controls the UI rendered (either the product site or developer). Can be `io` or `developer`
|
||||||
PREVIEW_MODE=io
|
PREVIEW_MODE=developer
|
||||||
|
|
||||||
from_cache=false
|
from_cache=false
|
||||||
|
|
||||||
|
@ -30,4 +35,4 @@ fi
|
||||||
cd "$PREVIEW_DIR"
|
cd "$PREVIEW_DIR"
|
||||||
|
|
||||||
# Run the build:deploy-preview start script
|
# Run the build:deploy-preview start script
|
||||||
PREVIEW_MODE=$PREVIEW_MODE REPO=$PRODUCT HASHI_ENV=project-preview npm run build:deploy-preview
|
PREVIEW_MODE=$PREVIEW_MODE REPO=$PRODUCT HASHI_ENV=project-preview npm run build:deploy-preview
|
|
@ -1,3 +1,8 @@
|
||||||
|
######################################################
|
||||||
|
# NOTE: This file is managed by the Digital Team's #
|
||||||
|
# Terraform configuration @ hashicorp/mktg-terraform #
|
||||||
|
######################################################
|
||||||
|
|
||||||
# Repo which we are cloning and executing npm run build:deploy-preview within
|
# Repo which we are cloning and executing npm run build:deploy-preview within
|
||||||
REPO_TO_CLONE=dev-portal
|
REPO_TO_CLONE=dev-portal
|
||||||
# Set the subdirectory name for the dev-portal app
|
# Set the subdirectory name for the dev-portal app
|
||||||
|
@ -5,7 +10,7 @@ PREVIEW_DIR=website-preview
|
||||||
# The product for which we are building the deploy preview
|
# The product for which we are building the deploy preview
|
||||||
PRODUCT=consul
|
PRODUCT=consul
|
||||||
# Preview mode, controls the UI rendered (either the product site or developer). Can be `io` or `developer`
|
# Preview mode, controls the UI rendered (either the product site or developer). Can be `io` or `developer`
|
||||||
PREVIEW_MODE=io
|
PREVIEW_MODE=developer
|
||||||
|
|
||||||
should_pull=true
|
should_pull=true
|
||||||
|
|
||||||
|
@ -24,4 +29,4 @@ if [ "$should_pull" = true ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Run the dev-portal content-repo start script
|
# Run the dev-portal content-repo start script
|
||||||
REPO=$PRODUCT PREVIEW_MODE=$PREVIEW_MODE npm run start:local-preview
|
REPO=$PRODUCT PREVIEW_MODE=$PREVIEW_MODE npm run start:local-preview
|
Loading…
Reference in New Issue