Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Frontend checklist #26

Open
wants to merge 364 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
364 commits
Select commit Hold shift + click to select a range
406ef03
Merge pull request #23 from springload/chore/filter-axe-testing-rules
liamjohnston Oct 22, 2020
2dbff22
AXE fixes
liamjohnston Oct 22, 2020
07b3e32
Automated accessibility test fixes
liamjohnston Oct 23, 2020
38000bc
Skip link
Oct 29, 2020
185255d
Skip link
Oct 29, 2020
5c5b721
Merge pull request #24 from springload/feature/skip-link
Oct 29, 2020
b990608
Focus styling
Oct 29, 2020
ad60371
Focus styling
Oct 29, 2020
e755041
Focus styling
Oct 29, 2020
5664bef
Focus styling
Oct 29, 2020
8eec4ef
Focus styling
Oct 29, 2020
d4e3b1d
Jumbotron styling
Oct 29, 2020
9685eef
Jumbotron styling
Oct 29, 2020
80ec11a
Jumbotron styling
Oct 29, 2020
5b78c6a
Jumbotron styling
Oct 29, 2020
5978762
Switching to SVG logo
Oct 29, 2020
4c3c904
Setting SVG logo dimensions
Oct 29, 2020
59fd9bc
Fixing broken image link
Oct 29, 2020
c3e87c8
Added auto_id in case id_for_label is empty
Nov 1, 2020
c512fb6
Merge pull request #25 from springload/bugfix/IETF-78_empty_id_for_label
Nov 1, 2020
1163ac0
Fix duplicate label for multi checkbox or radio buttons
ldanet Nov 2, 2020
6157153
Fix form help text aria attribute
ldanet Nov 2, 2020
9fe828c
Fix multi checkbox and radio group spacing
ldanet Nov 2, 2020
56d56b4
Fix home page python test
ldanet Nov 2, 2020
4fd6751
Add basic wagtail test for form page
ldanet Nov 2, 2020
c5bc4ef
Add basic wagtail test for events pages
ldanet Nov 2, 2020
08b03a2
Remove redundant home page topic image backgrounds
ldanet Nov 2, 2020
645ef89
Add basic wagtail test for glossary
ldanet Nov 2, 2020
e0f85d2
Add test for IESG statement index page
ldanet Nov 2, 2020
4642260
Update readme.md
Nov 2, 2020
7599d58
Fix variable names in tests
ldanet Nov 2, 2020
565039e
Add basic wagtail test for topic index and topic page
ldanet Nov 2, 2020
5470984
Fix tab order in blog and iesg statement pages
ldanet Nov 2, 2020
bebb0b3
Fix main navigation label
ldanet Nov 2, 2020
7d19ca9
Replace sr-only with labels in header
ldanet Nov 2, 2020
be0b242
Replace sr-only labels with aria-labels in various pages
ldanet Nov 2, 2020
f479633
Add aria-label to aside landmark in blog and IESG statement pages
ldanet Nov 2, 2020
494f4ef
Remove sr only button text
ldanet Nov 3, 2020
4b15c8a
Fix standard page FAQ markup
ldanet Nov 3, 2020
f78a985
Prevent logo from bleeding outside of its container
ldanet Nov 3, 2020
aa7b479
Fix 404 page title
ldanet Nov 3, 2020
fcc4a1c
Add styles for left and right floating images
ldanet Nov 3, 2020
e1b7a77
Fix focus when closing datepicker
ldanet Nov 3, 2020
c93a165
Make date picker button label and aria-label
ldanet Nov 3, 2020
393acfc
Use aria label for home breadcrumb
ldanet Nov 3, 2020
45a9de7
Fix breadcrumb home label in other places
ldanet Nov 3, 2020
064835d
Move search drawer and button at the end of header
ldanet Nov 3, 2020
42f8b73
Add link to install instructions in readme.md
ldanet Nov 3, 2020
62a20a8
Add note in installation docs
ldanet Nov 3, 2020
503c83f
Tweak installation instructions.
ldanet Nov 3, 2020
a4cbd1d
Link to the installation docs where appropriate
ldanet Nov 3, 2020
f9953ac
Make second tab contents available on standard page for users without js
ldanet Nov 3, 2020
47d70da
Hide tabs and make content available for users without js
ldanet Nov 3, 2020
9a6e3b3
Use noscript tag instead of css hack
ldanet Nov 3, 2020
98f4f01
Fix blog list showing twice on mobile
ldanet Nov 5, 2020
80197dd
Make Tools dropdown menu right aligned in header
ldanet Nov 5, 2020
13a761e
Add titles to dropdown buttons in header
ldanet Nov 5, 2020
43789d5
Merge pull request #27 from springload/fix/search-after-header
ldanet Nov 5, 2020
679d5b6
Fix accessibility issue in event collapse headings
ldanet Nov 5, 2020
32d67cc
Hide hidden inputs
ldanet Nov 5, 2020
8669e8b
Stretch links over card in home and event listing pages
ldanet Nov 5, 2020
2904a80
Removing commented out code
Nov 30, 2020
5c8e534
Merge pull request #28 from springload/feature/remove-base-comments
Nov 30, 2020
da75a42
Update CONTRIBUTING.md
Nov 30, 2020
9f20ee9
Remove redundant fallback urls in tests
ldanet Dec 1, 2020
02d4b58
Hide facebook from share options
ldanet Dec 11, 2020
1d995e0
Remove sharing from blog index page
ldanet Dec 11, 2020
85f06ac
Improve separation between blog article and sharing
ldanet Dec 11, 2020
fb9b8fd
Update glossary search input placeholder
ldanet Dec 11, 2020
d3f1991
focus styles for keyboard only - make work
liamjohnston Dec 15, 2020
63c743a
Fix event location font size
liamjohnston Dec 15, 2020
bd78183
Tweak some homepage font sizes
liamjohnston Dec 15, 2020
c96dece
Merge pull request #29 from springload/fix/IETF-123-event-location-fo…
liamjohnston Dec 15, 2020
bcaeaae
Tweak size further
liamjohnston Dec 15, 2020
a4e70a1
Merge pull request #30 from springload/fix/IETF-128-home-font-sizes
liamjohnston Dec 15, 2020
96204d6
Clarify filters
ldanet Dec 15, 2020
7f0cbad
Add heading for blog index side bar
ldanet Dec 15, 2020
f4c405f
Display header dropdowns on hover
ldanet Dec 15, 2020
12ef281
Merge pull request #31 from springload/hover-dropdowns
Dec 16, 2020
4e81388
Moving dropdown closer
Dec 16, 2020
39d6244
Blog popout menu fixes
Dec 16, 2020
db840e2
Blog popout menu fixes
Dec 16, 2020
cbcfd51
Blog popout menu fixes
Dec 16, 2020
6694c00
Blog popout menu fixes
Dec 16, 2020
aa4c066
Blog popout menu fixes
Dec 16, 2020
0a933f1
Blog popout menu fixes
Dec 16, 2020
593b548
Merge pull request #32 from springload/feature/zero-width-navlinks
Dec 16, 2020
33944a8
Add bootstrap table scrolling to newly created tables
liamjohnston Dec 16, 2020
d74d874
Merge pull request #33 from springload/fix/table-responsiveness
Dec 17, 2020
002f504
Toggle filters -> Show filters
Dec 17, 2020
fe0e6ab
Fixing menu hover wobble
Dec 17, 2020
87e7988
Remove lead
Dec 17, 2020
b9d512e
Merge pull request #73 from springload/main
rjsparks Jan 25, 2021
019d97e
Add config files needed for deployments
Feb 15, 2021
46dd8b1
Remove the submodule with proprietary infrastructure
Feb 15, 2021
f9a2e9e
Correct endpoints in circleci
Feb 15, 2021
d718e92
Merge pull request #83 from springload/feature/ci
rjsparks Feb 18, 2021
3d15b8a
Added migrations to reflect current project models
Mar 25, 2021
91f2d1a
Bump to Django==2.2.19 and Wagtail==2.10.2
Mar 25, 2021
b18fcb9
Bump to Wagtail==2.11.6 and updated constraints.txt
Mar 25, 2021
ef9872f
Dependencies upgraded
Mar 25, 2021
b164481
Regenerated yarn.lock upgrading several packages
Mar 25, 2021
26bd9e0
Bumped version to 0.11.0
Mar 25, 2021
d2303d4
Merge pull request #35 from springload/feature/FED-upgrade
dgkohn Mar 25, 2021
5c4fe1f
Override _migrate_legacy_clean_name on FormField to avoid issues with…
Mar 28, 2021
f3ce03b
Merge pull request #84 from springload/feature/BED-upgrade
rjsparks Apr 1, 2021
2ff9661
Add awscli and upgrade boto3
Mar 8, 2021
57c02b3
Adds autosnapshots feature using S3
Apr 6, 2021
acc3727
Add awscli and upgrade boto3
Mar 8, 2021
5c398bd
Adds autosnapshots feature using S3
Apr 7, 2021
e444ebc
Reduces table padding
JayDaley Jun 17, 2021
ff9e871
Darkens table border colour
JayDaley Jun 17, 2021
9a695d4
Fix bug in PostgreSQL docker restore script
kesara Jun 30, 2021
8a1212c
Update JavaScript packages
kesara Jun 30, 2021
55a048c
Merge pull request #101 from kesara/master
kesara Jul 1, 2021
cd7e93b
Bump up Python dependencies
kesara Jul 1, 2021
c48d4ea
Merge pull request #102 from kesara/deploy/preview
kesara Jul 1, 2021
2ba66da
Merge pull request #87 from ietf-tools/feature/autosnapshots
kesara Jul 1, 2021
a278363
Merge branch 'main' into deploy/preview
kesara Jul 1, 2021
03ea09a
Merge pull request #103 from ietf-tools/deploy/preview
kesara Jul 1, 2021
69ddc0a
Update CodeQL analysis to run daily at 00:00 UTC
kesara Jul 1, 2021
84978ba
Update CodeQL configuration
kesara Jul 2, 2021
5975baa
Merge pull request #104 from kesara/deploy/preview
kesara Jul 2, 2021
49b6d29
Merge pull request #105 from ietf-tools/deploy/preview
kesara Jul 2, 2021
f8c177f
Merge pull request #93 from JayDaley/JayDaley-css-fixes
kesara Jul 2, 2021
0148fea
Merge pull request #106 from ietf-tools/deploy/preview
kesara Jul 2, 2021
243f77f
Increase event introduction field size to 511
kesara Jul 4, 2021
bdce1fe
Merge pull request #107 from kesara/bugfix/increase-event-introduction
kesara Jul 7, 2021
b1ea24e
Update 404 page content (#108)
kesara Jul 7, 2021
f386a0b
Remove URL reference from 404 'Did you know' text (#110)
kesara Jul 8, 2021
a2797ca
Set FILE_UPLOAD_PERMISSIONS settings (#112)
kesara Jul 15, 2021
d374a73
Merge pull request #109 from ietf-tools/deploy/preview
kesara Aug 2, 2021
202d1cc
Improves install.md instructions
kesara Sep 7, 2021
3c89849
Adds database migration steps to dev docker image
kesara Sep 15, 2021
7af5b34
Bump nth-check from 2.0.0 to 2.0.1
dependabot[bot] Sep 23, 2021
3f400a2
Merge pull request #127 from ietf-tools/dependabot/npm_and_yarn/nth-c…
kesara Sep 23, 2021
8553682
Enable all editing tools
larseggert Sep 8, 2021
9e9f552
Add wagtailmarkdown. Fixes #123.
larseggert Sep 14, 2021
a9770f5
Don't need fontawesome, since we're autoloading it
larseggert Sep 14, 2021
f3f7086
Add comment about wanting more customization
larseggert Sep 14, 2021
e1ddd70
chore(yarn): upgrade packages
synecdokey Sep 8, 2021
57dec6a
fix(bs): rename some css classes and add some
synecdokey Sep 13, 2021
e296bbc
fix(bs): use new utility classes
synecdokey Sep 13, 2021
170c330
fix(bs): update sr-focused classes
synecdokey Sep 13, 2021
e136242
fix(bs): change data attributes
synecdokey Sep 13, 2021
25b4c4c
fix(bs): add light to theme to fix some buttons
synecdokey Sep 13, 2021
dfedd89
feat(bootstrap-theme): re-generate rgb colours
synecdokey Sep 22, 2021
876e53b
fix(bootstrap-theme): recreate jumbotron component
synecdokey Sep 22, 2021
10a9209
fix(event_page): convert font-weight styles to bs5
synecdokey Sep 22, 2021
63685eb
fix(event_page): convert to bs5 font styles
synecdokey Sep 22, 2021
eed4e36
fix(header): constant dropdown behaviour in hover
synecdokey Sep 23, 2021
ecf8b70
fix(home_page): apply image ratio properly
synecdokey Sep 23, 2021
429beb3
fix(footer): reduce padding to 1 rem
synecdokey Sep 24, 2021
4d23e54
Merge pull request #121 from kesara/feature/improve-install-instructions
kesara Sep 24, 2021
09c9662
Merge pull request #128 from synecdokey/fix/footer-vertical-padding
kesara Sep 24, 2021
91599d0
Reverse sense of previous and next for blogs and iesg_statements.
rjsparks Oct 13, 2021
72f94a8
Merge pull request #129 from ietf-tools/main
kesara Oct 13, 2021
6b80e22
Restore guards for preview.
rjsparks Oct 13, 2021
0b99c85
Merge pull request #130 from ietf-tools/main
kesara Oct 13, 2021
8eecd79
Enable backend tests
kesara Aug 3, 2021
976b2de
Merge pull request #115 from kesara/feature/backend-tests
kesara Oct 14, 2021
d363927
Restructure next/previous once again. This has been tested manually. …
rjsparks Oct 14, 2021
f8b4aa3
Merge pull request #132 from ietf-tools/main
kesara Oct 14, 2021
3e311c8
fix(header): remove nav links underline
synecdokey Oct 17, 2021
f77d02a
Merge pull request #133 from synecdokey/fix/remove-nav-links-underline
kesara Oct 17, 2021
1ea0ce1
feat(styles): introduce more heading separation
synecdokey Oct 18, 2021
cf91180
Merge pull request #134 from synecdokey/feat/heading-separation
kesara Oct 19, 2021
05bb091
Fixes social share links for Twitter and LinkedIn
edward-springload Oct 26, 2021
8e51a0c
Merge pull request #136 from springload/feature/social-share
kesara Oct 27, 2021
150fc44
Updates gallium-alpine as the base docker image for the frontend.
kesara Oct 28, 2021
99386e1
Merge pull request #139 from kesara/bugfix/update-docker-image
kesara Oct 28, 2021
0439173
Merge pull request #140 from ietf-tools/deploy/preview
kesara Oct 28, 2021
60cc4af
Bump jquery-ui from 1.12.1 to 1.13.0
dependabot[bot] Oct 28, 2021
27e7d32
Merge pull request #138 from ietf-tools/dependabot/npm_and_yarn/jquer…
kesara Oct 28, 2021
1d79582
Merge pull request #141 from ietf-tools/main
kesara Oct 28, 2021
53c3e66
Adds fully customizable main menu
edward-springload Nov 1, 2021
5ff66de
Use orm method instead
edward-springload Nov 1, 2021
0135b99
Prefetch related to reduce queries for menu
edward-springload Nov 2, 2021
7dcd202
Fix bug with documents module loading
edward-springload Nov 2, 2021
a2d5924
Migrate data to new models
edward-springload Nov 2, 2021
2d63ace
Initialize sort_order explicitly
edward-springload Nov 2, 2021
4cee78b
Prefetch authors of blog posts
edward-springload Nov 3, 2021
8c0d2f4
Moved exclude() to siblings() property to reduce database calls
edward-springload Nov 3, 2021
61fd7ee
Pin wagtail-orderable version
edward-springload Nov 3, 2021
0249887
Fix migrations to work fine in test suite
edward-springload Nov 3, 2021
689344f
Merge pull request #142 from springload/feature/editable-nav-menu
kesara Nov 3, 2021
42f21c8
Merge pull request #143 from springload/feature/blog-view-optimization
kesara Nov 4, 2021
071074c
Adds migration to load data into database to populate menus
edward-springload Nov 4, 2021
45f7631
Fixes for tests
edward-springload Nov 4, 2021
3bc2623
Merge pull request #145 from springload/feature/menumigration
kesara Nov 4, 2021
2dc804a
Revert "Adds migration to load data into database to populate menus"
kesara Nov 4, 2021
9a61df1
Merge pull request #146 from ietf-tools/revert-145-feature/menumigration
kesara Nov 4, 2021
a72b41b
#96 Keeps top level menu and makes new editing features for secondar…
edward-springload Nov 5, 2021
29745ca
Fixes tests
edward-springload Nov 5, 2021
4f7a2a2
Add Tools label
edward-springload Nov 5, 2021
c8d9fb5
Merge pull request #147 from springload/feature/secondary-menu
kesara Nov 5, 2021
da1dd9d
Single page glossary
edward-springload Nov 5, 2021
36df522
Updated padding and margins
edward-springload Nov 5, 2021
505d1e0
Merge pull request #148 from springload/feature/update-glossary
kesara Nov 5, 2021
89f87ec
Custom 500 error handling with context for messages and email excepti…
edward-springload Nov 8, 2021
e3bd076
Merge pull request #149 from springload/feature/500
kesara Nov 8, 2021
1784a30
Merge pull request #150 from ietf-tools/deploy/preview
kesara Nov 17, 2021
aec4d80
Adds sitemap.xml
kesara Dec 1, 2021
68f1169
Merge pull request #152 from kesara/feature/sitemap
kesara Dec 1, 2021
daa75ea
Update to Wagtail 2.15.1
kesara Dec 13, 2021
29ce095
Merge pull request #154 from kesara/feature/wagtail-2.15
kesara Dec 13, 2021
f4ac1f1
Update django-storages library
kesara Dec 14, 2021
124c19b
Merge pull request #155 from kesara/feature/wagtail-2.15
kesara Dec 14, 2021
02b8194
Bump nanoid from 3.1.23 to 3.2.0
dependabot[bot] Jan 25, 2022
5c80ccd
Merge pull request #158 from ietf-tools/deploy/preview
kesara Jan 25, 2022
c5a5ffa
Merge pull request #161 from ietf-tools/dependabot/npm_and_yarn/nanoi…
kesara Jan 25, 2022
6498d6b
Merge pull request #162 from ietf-tools/deploy/preview
kesara Jan 25, 2022
2783cb7
docs: fix LICENSE for proper github detection
NGPixel Jan 26, 2022
4237879
Create docker-publish.yml
kesara Jan 27, 2022
078320d
Merge pull request #163 from ietf-tools/docker-workflow
kesara Jan 27, 2022
0a10530
docs: reformat README.md
NGPixel Jan 31, 2022
d6a2a44
docs: add missing badge link in README
NGPixel Jan 31, 2022
20bc57e
docs: update badge logo in README
NGPixel Jan 31, 2022
77b9791
docs: remove duplicate install.md
NGPixel Jan 31, 2022
4f59bea
docs: update README logo
NGPixel Feb 25, 2022
908bbac
fix: Typo in 404 template (#166)
kesara Feb 27, 2022
712af80
feat(header): add donation button
synecdokey Jan 25, 2022
76f8ea6
feat: migrate theme to @ietf-tools/common-bootstrap-theme
Feb 7, 2022
4eb2ffd
ci: Add latest tag to the docker build/push (#169) (#170)
kesara Mar 3, 2022
2492c25
chore(deps): bump minimist from 1.2.5 to 1.2.6 (#177)
dependabot[bot] Apr 27, 2022
c7f6375
chore(deps): Update Python dependencies (#179)
kesara Apr 28, 2022
b1d60b7
chore(deps): Update JavaScript dependencies (#178)
kesara Apr 28, 2022
9dd3ace
fix: Add a missing menuitem migration (#184)
kesara May 3, 2022
79b214c
test: Check for missing migrations (#185)
kesara May 3, 2022
51ab132
test: Add dry run option to missing migration check (#187)
kesara May 4, 2022
dc25d05
build: Update to Python 3.10 (#188)
kesara May 4, 2022
1c20e44
fix: remove margin, width and add max width (#196)
Juliet-Brown Jun 21, 2022
993a45b
fix: Make img caption smaller (#197)
Juliet-Brown Jun 27, 2022
aa0f2a8
fix: Improve image captions (#232)
Juliet-Brown Jul 26, 2022
1ceb9a3
chore(deps): bump jquery-ui from 1.13.1 to 1.13.2 (#233)
dependabot[bot] Jul 26, 2022
6e052f8
chore(deps): bump terser from 4.8.0 to 4.8.1 (#235)
dependabot[bot] Jul 26, 2022
7b6ffce
feat: Upgrade Wagtail to 3.0.1 (#237)
sephyhe Sep 12, 2022
66aed04
chore: Remove cosign stage from Docker publish GHA (#239)
kesara Sep 29, 2022
23aed9c
chore(deps): bump loader-utils from 1.4.0 to 1.4.2 (#245)
dependabot[bot] Nov 23, 2022
a6563de
fix: Update 404.html (#244)
kesara Nov 23, 2022
34a90f2
Update requirements & constraints
AndrewCalderSpringload Nov 30, 2022
6c50a30
Wagtail 4.0 upgrade - links in preview panel
AndrewCalderSpringload Nov 30, 2022
a191884
Update URL route name
AndrewCalderSpringload Dec 1, 2022
5c4b0c3
Panel customisations - remove 'classname="full"' from panels.
AndrewCalderSpringload Dec 1, 2022
44ca575
BaseSetting model replaced by BaseSiteSetting
AndrewCalderSpringload Dec 1, 2022
e8ee293
Upgrade dependencies for wagtail 4.1
AndrewCalderSpringload Dec 1, 2022
fd7d971
Fix RemovedInWagtail50Warning: StreamField must explicitly set use_js…
AndrewCalderSpringload Dec 1, 2022
3454578
Merge pull request #46 from springload/feature/wagtail-4-upgrade
AndrewCalderSpringload Dec 2, 2022
6ab8601
Fix db_restore script for newer Postgres versions
Dec 6, 2022
1f996f1
Merge pull request #47 from springload/feature/db_restore
AndrewCalderSpringload Dec 7, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"presets": [
[
"@babel/preset-env",
{
"useBuiltIns": "entry",
"corejs": "3.6.5",
"modules": false
}
],
"@babel/preset-typescript"
]
}
13 changes: 13 additions & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# https://github.com/browserslist/browserslist#readme

>= 1%
last 1 major version
not dead
Chrome >= 45
Firefox >= 38
Edge >= 12
Explorer >= 10
iOS >= 9
Safari >= 9
Android >= 4.4
Opera >= 30
92 changes: 92 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
version: 2.1

orbs:
buildkit: springload/[email protected]

workflows:
build_test_and_push_image:
jobs:
- buildkit/builder:
cache_version: v4
builds:
- buildkit/build: # call the build command multiple times to build multiple images
target: frontend # build this stage
tag: frontend # no tag no docker image
path: docker
- buildkit/build: # call the build command multiple times to build multiple images
target: aws-app # build this stage
tag: app # no tag no docker image
path: docker
- buildkit/build: # call the build command multiple times to build multiple images
target: app-test # build this stage
tag: app-test # no tag no docker image
path: docker
after-builds:
- run:
name: run backend tests
command: |-
set -eu

docker run --name=database \
-ePOSTGRES_DB=app \
-ePOSTGRES_PASSWORD=password \
-d postgres:11-alpine
docker run \
-i --rm --name=app-test \
-u root \
--link=database \
-eDATABASE_URL="postgres://postgres:password@database/app" \
-eAPP_SECRET_KEY=xxxx \
-eENVIRONMENT=test \
app-test
- run:
name: tag, push and deploy images
command: |-
set -eu
if [ "${CIRCLE_BRANCH}" == "deploy/preview" ] || [ "${CIRCLE_BRANCH}" == "deploy/production" ]; then
ENVIRONMENT=`basename "${CIRCLE_BRANCH}"`
PROJECT=ietf
VERSION=$(git rev-parse --short HEAD)
wget -O ecs-tool.tar.gz https://github.com/springload/ecs-tool/releases/download/1.5.1/ecs-tool_1.5.1_linux_amd64.tar.gz && tar -C /usr/bin -xvf ecs-tool.tar.gz ecs-tool
apk add jq
export AWS_REGION=us-west-2
export AWS_DEFAULT_REGION=us-west-2
export REPOSITORY=$(ecs-tool ecr-endpoint)
eval $(ecs-tool ecr-login)
pids=""
for image in app; do
for tag in ${ENVIRONMENT}-${VERSION} ${ENVIRONMENT}-latest; do
docker tag ${image} ${REPOSITORY}/${PROJECT}-${image}:${tag}
docker push ${REPOSITORY}/${PROJECT}-${image}:${tag} &
pids="${pids} $!"
done
done
for p in $pids; do
wait $p
done

# running the pre-deployment commands
ecs-tool -p "" --config ".circleci/ecs-${ENVIRONMENT}.toml" run --image_tag "${ENVIRONMENT}-${VERSION}" -- ./deploy.sh
# deploy new services in parallel
ecs-tool -p "" --config ".circleci/ecs-${ENVIRONMENT}.toml" deploy --image_tag "${ENVIRONMENT}-${VERSION}"
fi
- run:
name: test the website
command: |-
set -eu

if [ "${CIRCLE_BRANCH}" == "deploy/preview" ] || [ "${CIRCLE_BRANCH}" == "deploy/production" ]; then
ENVIRONMENT=`basename "${CIRCLE_BRANCH}"`
# add more environments / endpoints as needed
case "${ENVIRONMENT}" in
production)
endpoint=https://www.ietf.org
;;
preview)
endpoint=https://wwwdev.ietf.org
;;
esac


docker run --rm -e BASIC_AUTH=$BASIC_AUTH frontend yarn test $endpoint
fi
8 changes: 8 additions & 0 deletions .circleci/ecs-preview.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
profile = "ietf"
cluster = "ietf-preview"
task_definition = "ietf-preview-app"
container_name = "app"
log_group = "ecs-tool"

[deploy]
services = ["app"]
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*.sql
media*.tgz
.git
media/
docker/database
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
public/
node_modules/

11 changes: 11 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
],
};
66 changes: 66 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: "CodeQL"

on:
push:
branches: [main, deploy/preview]
pull_request:
# The branches below must be a subset of the branches above
branches: [main, deploy/preview]
schedule:
- cron: '0 0 * * *'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
# Override automatic language detection by changing the below list
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
language: ['python', 'javascript']
# Learn more...
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection

steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
setup-python-dependencies: false
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
67 changes: 67 additions & 0 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Docker

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

on:
release:
types: [published]

env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}


jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read
packages: write
# This is used to complete the identity challenge
# with sigstore/fulcio when running outside of PRs.
id-token: write

steps:
- name: Checkout repository
uses: actions/checkout@v2

# Workaround: https://github.com/docker/build-push-action/issues/461
- name: Setup Docker buildx
uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf

# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: .
file: docker/Dockerfile
target: app
push: ${{ github.event_name != 'pull_request' }}
tags: ghcr.io/${{ github.repository }}:${{ github.event.release.tag_name }}, ghcr.io/${{ github.repository }}:latest
labels: ${{ steps.meta.outputs.labels }}
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,8 @@
/docs/_build/
/ietf/static/node_modules
/ietf/static/yarn-error.log
node_modules
.vscode
*.log
ietf/templates/base.html
ietf/static/dist
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lts/erbium
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
**/*.html
**/*.ss
**/*.yml
13 changes: 13 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"trailingComma": "all",
"tabWidth": 4,
"semi": true,
"singleQuote": true,
"arrowParens": "always",
"overrides": [
{
"files": [".travis.yml", ".*"],
"options": { "tabWidth": 2 }
}
]
}
Loading