Skip to content

Commit

Permalink
Merge pull request #1336 from USEPA/main
Browse files Browse the repository at this point in the history
Version - 20240304
  • Loading branch information
carsoncho authored Mar 4, 2024
2 parents 7982c13 + 568ae14 commit 6f9eee5
Show file tree
Hide file tree
Showing 34 changed files with 6,953 additions and 614 deletions.
17 changes: 2 additions & 15 deletions .buildkite/feature.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,25 +117,12 @@ steps:
concurrency_group: $BUILDKITE_PIPELINE_SLUG/build-$BUILDKITE_BRANCH
concurrency: 4

commands: docker build services/metrics

plugins:
- cultureamp/aws-assume-role#v0.1.0:
role: arn:aws:iam::316981092358:role/BuildkiteRoleForImageBuilds

- docker#v3.12.0:
image: gcr.io/kaniko-project/executor:debug
workdir: /workspace

propagate-aws-auth-tokens: true

entrypoint: /bin/sh
command:
- -ec
- |
echo '{"credsStore":"ecr-login"}' >/kaniko/.docker/config.json
/kaniko/executor \
--context=/workspace/services/metrics \
--no-push
# Perform a Terraform formatting check. See the terraform-fmt.sh script for more details
# on what is executed in this step.
- label: ":terraform: Formatting"
Expand Down
19 changes: 4 additions & 15 deletions .buildkite/webcms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,25 +80,14 @@ steps:
concurrency_group: $BUILDKITE_PIPELINE_SLUG/build-$BUILDKITE_BRANCH
concurrency: 4

commands:
- docker build services/metrics --tag "${WEBCMS_REPO_URL}/webcms-${WEBCMS_ENVIRONMENT}-${WEBCMS_SITE}-fpm-metrics:${WEBCMS_IMAGE_TAG}"
- docker push "${WEBCMS_REPO_URL}/webcms-${WEBCMS_ENVIRONMENT}-${WEBCMS_SITE}-fpm-metrics:${WEBCMS_IMAGE_TAG}"

plugins:
- cultureamp/aws-assume-role#v0.1.0:
role: arn:aws:iam::316981092358:role/BuildkiteRoleForImageBuilds

- docker#v3.12.0:
image: gcr.io/kaniko-project/executor:debug
workdir: /workspace

propagate-aws-auth-tokens: true

entrypoint: /bin/sh
command:
- -ec
- |
echo '{"credsStore":"ecr-login"}' >/kaniko/.docker/config.json
/kaniko/executor \
--context=/workspace/services/metrics \
--destination="${WEBCMS_REPO_URL}/webcms-${WEBCMS_ENVIRONMENT}-${WEBCMS_SITE}-fpm-metrics:${WEBCMS_IMAGE_TAG}"
- wait: ~

- label: ":terraform: WebCMS (${WEBCMS_SITE}-en)"
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,3 @@ cypress/e2e/fixtures/timings*
mochawesome-report/*
test/e2e/fixtures/users.json
test/e2e/screenshots/*
test/e2e/specs/unfinished/*
23 changes: 21 additions & 2 deletions services/metrics/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
FROM alpine:latest
FROM debian:stable-slim

RUN apk add --no-cache aws-cli curl jq
RUN set -ex \
# 1. Install packages needed for this container
&& apt-get update \
&& apt-get install --yes --no-install-recommends \
ca-certificates \
curl \
jq \
unzip \
# 2. Download and install the latest AWS CLI
&& cd /tmp \
&& curl -fsSL https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip -o awscliv2.zip \
&& unzip awscliv2.zip \
&& ./aws/install \
# 3. Clean up the CLI installer files
&& rm -rf ./aws awscliv2.zip \
# 4. Remove unneeded packages by marking them as automatic and letting the
# 'autoremove' command do its thing
&& apt-mark auto unzip \
&& apt-get autoremove --purge --yes \
&& rm -rf /var/apt/lists/*

COPY transform.jq /etc/transform.jq
COPY entrypoint.sh /bin/entrypoint.sh
Expand Down
282 changes: 141 additions & 141 deletions test/e2e/fixtures/basicPageErrors.json
Original file line number Diff line number Diff line change
@@ -1,148 +1,148 @@
{
"formatItems":
[
{
"section": "",
"itemId": ".field--name-field-wide-template",
"itemName": "Use wide template",
"fields": [{"fieldName": "input", "fieldValue": true, "fieldType": "checkbox", "fieldDefault": false}],
"errors": [
"Channel field is required.",
"Description field is required.",
"Title field is required.",
"Type field is required."]
},
{
"section": "",
"itemId": ".field--name-title",
"itemName": "Title",
"fields":[{"fieldName":"input","fieldType": "text","fieldValue": "New Basic Page Test","fieldDefault": ""}],
"errors": ["Description field is required.", "Type field is required.", "Channel field is required."]
},
{
"section": "",
"itemId": ".field--name-field-description",
"itemName": "Description",
"fields":[{"fieldName":"[id=edit-field-description-0-value]","fieldType": "text",
"fieldValue": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Purus gravida quis blandit turpis cursus in. {enter} Placerat in egestas erat imperdiet. Nisl purus in mollis nunc sed id. Odio aenean sed adipiscing diam donec adipiscing tristique risus nec.",
"fieldDefault": ""
}],
"errors": ["Type field is required.", "Channel field is required."]
},
{
"section": "",
"itemId": ".field--name-field-keywords",
"itemName": "Keywords",
"fields":[
{"fieldName": "[id=edit-field-keywords-target-id]", "fieldType": "text", "fieldValue": "blood lead testing (331587), drupal (332750)", "fieldDefault": ""}
],
"formatItems":
[
{
"section": "",
"itemId": ".field--name-field-wide-template",
"itemName": "Use wide template",
"fields": [{"fieldId": "input", "fieldValue": true, "fieldType": "checkbox", "fieldDefault": false}],
"errors": [
"Channel field is required.",
"Description field is required.",
"Title field is required.",
"Type field is required."]
},
{
"section": "",
"itemId": ".field--name-title",
"itemName": "Title",
"fields":[{"fieldId":"input","fieldType": "text","fieldValue": "New Basic Page Test","fieldDefault": ""}],
"errors": ["Description field is required.", "Type field is required.", "Channel field is required."]
},
{
"section": "",
"itemId": ".field--name-field-description",
"itemName": "Description",
"fields":[{"fieldId":"[id=edit-field-description-0-value]","fieldType": "text",
"fieldValue": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Purus gravida quis blandit turpis cursus in. {enter} Placerat in egestas erat imperdiet. Nisl purus in mollis nunc sed id. Odio aenean sed adipiscing diam donec adipiscing tristique risus nec.",
"fieldDefault": ""
}],
"errors": ["Type field is required.", "Channel field is required."]
},
{
"section": "",
"itemId": ".field--name-field-type",
"itemName":"Type",
"fields":[{"fieldName": "[id=edit-field-type]", "fieldType": "select", "fieldValue": "News Release", "fieldDefault": 0}],
"errors": ["Channel field is required."]
},
{
"section": "Body",
"itemId": ".paragraph-type--from-library",
"itemName": "From library",
"errors": ["Channel field is required.", "Reusable paragraph field is required."]
},
{
"section": "Body",
"itemId": ".paragraph-type--card-group",
"itemName": "Card Group",
"errors": ["Body field is required.", "Channel field is required.","Link text field is required.","Title field is required.","URL field is required." ]
},
{
"section": "Body",
"itemId": ".paragraph-type--header",
"itemName": "Header",
"errors": ["Channel field is required.", "Level field is required." ]
},
{
"section": "Body",
"itemId": ".paragraph-type--link-list",
"itemName": "Link List",
"errors": ["Channel field is required.", "URL field is required." ]
},

{
"section": "Body",
"itemId": ".paragraph-type--slideshow",
"itemName": "Slideshow",
"errors": ["Channel field is required."]
},
},
{
"section": "",
"itemId": ".field--name-field-keywords",
"itemName": "Keywords",
"fields":[
{"fieldId": "[id=edit-field-keywords-target-id]", "fieldType": "text", "fieldValue": "blood lead testing (331587), drupal (332750)", "fieldDefault": ""}
],
"errors": ["Type field is required.", "Channel field is required."]
},
{
"section": "",
"itemId": ".field--name-field-type",
"itemName":"Type",
"fields":[{"fieldId": "[id=edit-field-type]", "fieldType": "select", "fieldValue": "News Release", "fieldDefault": 0}],
"errors": ["Channel field is required."]
},
{
"section": "Body",
"itemId": ".paragraph-type--from-library",
"itemName": "From library",
"errors": ["Channel field is required.", "Reusable paragraph field is required."]
},
{
"section": "Body",
"itemId": ".paragraph-type--card-group",
"itemName": "Card Group",
"errors": ["Body field is required.", "Channel field is required.","Link text field is required.","Title field is required.","URL field is required." ]
},
{
"section": "Body",
"itemId": ".paragraph-type--header",
"itemName": "Header",
"errors": ["Channel field is required.", "Level field is required." ]
},
{
"section": "Body",
"itemId": ".paragraph-type--link-list",
"itemName": "Link List",
"errors": ["Channel field is required.", "URL field is required." ]
},

{
"section": "Body",
"itemId": ".paragraph-type--dynamic-list",
"itemName": "Dynamic List",
"errors": ["Channel field is required."]
},
{
"section": "Body",
"itemId": ".paragraph-type--html",
"itemName": "HTML",
"itemIndex": 0,
"errors": ["Channel field is required."]
},
{
"section": "Body",
"itemId": ".paragraph-type--html",
"itemName": "HTML",
"itemIndex": 1,
"errors": ["Channel field is required."]
},
{
"section": "Body",
"itemId": ".paragraph-type--slideshow",
"itemName": "Slideshow",
"errors": ["Channel field is required."]
},

{
"section": "Sidebar",
"itemId": ".paragraph-type--html",
"itemName": "HTML",
"itemIndex": 0,
"errors": ["Body field is required.", "Channel field is required." ]
},
{
"section": "Sidebar",
"itemId": ".paragraph-type--from-library",
"itemName": "From library",
"errors": ["Body field is required.","Channel field is required.","Reusable paragraph field is required." ]
},
{
"section": "Body",
"itemId": ".paragraph-type--dynamic-list",
"itemName": "Dynamic List",
"errors": ["Channel field is required."]
},
{
"section": "Body",
"itemId": ".paragraph-type--html",
"itemName": "HTML",
"itemIndex": 0,
"errors": ["Channel field is required."]
},
{
"section": "Body",
"itemId": ".paragraph-type--html",
"itemName": "HTML",
"itemIndex": 1,
"errors": ["Channel field is required."]
},

{
"section": "Sidebar",
"itemId": ".paragraph-type--box",
"itemName": "Summary Box",
"errors": ["Body field is required.", "Channel field is required."]
},
{
"section": "Sidebar",
"itemId": ".paragraph-type--header",
"itemName": "Header",
"errors": ["Body field is required.","Channel field is required.","Level field is required." ]
},
{
"section": "Sidebar",
"itemId": ".paragraph-type--link-list",
"itemName": "Link List",
"errors": ["Body field is required.","Channel field is required.", "URL field is required."]
},

{
"section": "Sidebar",
"itemId": ".paragraph-type--slideshow",
"itemName": "Slideshow",
"errors": ["Body field is required.", "Channel field is required."]
},
{
"section": "Sidebar",
"itemId": ".paragraph-type--html",
"itemName": "HTML",
"itemIndex": 0,
"errors": ["Body field is required.", "Channel field is required." ]
},
{
"section": "Sidebar",
"itemId": ".paragraph-type--from-library",
"itemName": "From library",
"errors": ["Body field is required.","Channel field is required.","Reusable paragraph field is required." ]
},

{
"section": "Sidebar",
"itemId": ".paragraph-type--dynamic-list",
"itemName": "Dynamic List",
"errors": ["Body field is required.", "Channel field is required."]
}
]
{
"section": "Sidebar",
"itemId": ".paragraph-type--box",
"itemName": "Summary Box",
"errors": ["Body field is required.", "Channel field is required."]
},
{
"section": "Sidebar",
"itemId": ".paragraph-type--header",
"itemName": "Header",
"errors": ["Body field is required.","Channel field is required.","Level field is required." ]
},
{
"section": "Sidebar",
"itemId": ".paragraph-type--link-list",
"itemName": "Link List",
"errors": ["Body field is required.","Channel field is required.", "URL field is required."]
},

{
"section": "Sidebar",
"itemId": ".paragraph-type--slideshow",
"itemName": "Slideshow",
"errors": ["Body field is required.", "Channel field is required."]
},

{
"section": "Sidebar",
"itemId": ".paragraph-type--dynamic-list",
"itemName": "Dynamic List",
"errors": ["Body field is required.", "Channel field is required."]
}
]
}
Loading

0 comments on commit 6f9eee5

Please sign in to comment.