Skip to content
This repository has been archived by the owner on Dec 8, 2024. It is now read-only.

Commit

Permalink
Merge pull request #4 from aws-ia/ephemeral_project-updates
Browse files Browse the repository at this point in the history
Updates from project type
  • Loading branch information
troy-ameigh authored Feb 29, 2024
2 parents ebfb40c + e570542 commit e816fc6
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file is auto-generated, changes will be overwritten
_commit: e6e4545
_src_path: /task/8901cb83-d678-11ee-b45d-827b80f403a7/projecttype
_commit: 67e8514
_src_path: /task/8aba574c-d715-11ee-a30f-8a64fe102fd6/projecttype
starting_version: v0.0.0
version_file: VERSION

3 changes: 3 additions & 0 deletions .project_automation/functional_tests/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ RUN yum install -y yum-utils && yum-config-manager --add-repo https://cli.github

## Install AWS CDK
RUN source ~/.bashrc && npm install -g aws-cdk

## Install Asciidoctoer
RUN gem install asciidoctor
26 changes: 26 additions & 0 deletions .project_automation/functional_tests/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,32 @@ PROJECT_TYPE_PATH=${BASE_PATH}/projecttype

echo "Starting Functional Tests"

# Setup Deployment Guide
DOCS_BRANCH="html-guide"
## Check if docs/ files are modified?
git fetch
git branch
DIFF_OUTPUT=$(git diff HEAD..origin/main)
## If docs are modified, render updated index.html file and
## create a PR with index.html file.
if echo "${DIFF_OUTPUT}" | grep "^diff --git a/docs/"; then
printf '\nChanges detected in the /docs files. \n'
#--- Github pages site generation ---#
asciidoctor --version
# Generate guide - filename -> index.html
asciidoctor --base-dir docs/ --backend=html5 -o ../index.html -w --doctype=book -a toc2 -a production_build docs/boilerplate/index_deployment_guide.adoc
## Create PR with index.html file
CURRENT_BRANCH=$(git branch --show-current)
git checkout main
git checkout -b "${DOCS_BRANCH}"
git add index.html
git commit -m '(automated) rendered html deployment guide'
git push --set-upstream origin "${DOCS_BRANCH}"
gh pr create --title 'Generated deployment guide' --body "_This is an automated PR with rendered html file for the deployment guide. Please review it before merge_"
else
printf '\nNo changes detected in the /docs files. \n'
fi

cd ${PROJECT_PATH}

## Add CDK Deployment Steps here:
Expand Down
2 changes: 1 addition & 1 deletion .project_automation/static_tests/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RUN . ~/.nvm/nvm.sh && source ~/.bashrc && nvm install node && nvm use node

# Install ESLint
RUN npm config set legacy-peer-deps true
RUN source ~/.bashrc && npm i -g eslint @typescript-eslint/eslint-plugin@latest prettier eslint-plugin-prettier@latest eslint-plugin-import @typescript-eslint/parser --save-dev --legacy-peer-deps
RUN source ~/.bashrc && npm i -g eslint @typescript-eslint/eslint-plugin@latest prettier eslint-plugin-prettier@latest eslint-config-prettier eslint-plugin-import @typescript-eslint/parser --save-dev --legacy-peer-deps

# Install golangci-lint
# binary will be $(go env GOPATH)/bin/golangci-lint
Expand Down
1 change: 1 addition & 0 deletions .project_automation/static_tests/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ cp ${PROJECT_PATH}/.config/.eslintignore .
npm install @typescript-eslint/eslint-plugin@latest --save-dev
npm i prettier eslint-plugin-import @typescript-eslint/parser --save-dev --legacy-peer-deps
npm i eslint-plugin-prettier@latest --save-dev
npm i eslint-config-prettier@latest --save-dev
npm i eslint
npx eslint ${PROJECT_PATH}/ --no-eslintrc --config ${PROJECT_PATH}/.config/eslint-config.json --quiet --no-error-on-unmatched-pattern

Expand Down

0 comments on commit e816fc6

Please sign in to comment.