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

Prod Push for Aug 11 2022 #412

Merged
merged 54 commits into from
Aug 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
f847427
USAGOV-363-egress-allow-acl: the aws endpoint url provided by cloud.g…
ednark Jul 29, 2022
d607597
USAGOV-363-egress-allow-acl: update allowed egress acl
ednark Jul 29, 2022
0589706
USAGOV-363-egress-allow-acl: dont need these in whitelist
ednark Jul 29, 2022
3dec39b
USAGOV-363-egress-allow-acl: allow cloud.gov apps
ednark Jul 29, 2022
0c30858
Merge pull request #399 from usagov/USAGOV-363-egress-allow-acl
ednark Jul 29, 2022
025b52d
dev: update regex for alternate aws endpoint
ednark Jul 29, 2022
30e49a1
dev: go back to previous way of doing things. directly disabling prox…
ednark Jul 29, 2022
e824758
dev: waf should set envs for waf
ednark Jul 30, 2022
9e51155
USAGOV-347-add-noindex: add noindex meta tag for all pages
cwacht Aug 1, 2022
9f6e459
usagov-97-do-you-have-a-question: usagov-97-question_box
sinchagrenchik Aug 2, 2022
c4b4513
Merge pull request #400 from usagov/USAGOV-347-add-noindex
oadekoya12 Aug 2, 2022
509e892
usagov-97-do-you-have-a-question: usagov-97-do-you-have-a-question
sinchagrenchik Aug 2, 2022
9297ab8
usagov-345: usagov-345-update-darkblue-color-hex-number
developer43 Aug 2, 2022
f2ac7b0
Merge branch 'dev' into usagov-97-do-you-have-a-question
cwacht Aug 2, 2022
b5635d9
usagov-97-do-you-have-a-question: Use USWDS utility classes
cwacht Aug 2, 2022
2a4312d
Merge pull request #401 from usagov/usagov-97-do-you-have-a-question
cwacht Aug 2, 2022
8396f72
usagov-97-do-you-have-a-question: usagov-97-do-you-have-a-question
sinchagrenchik Aug 2, 2022
df09aa8
usagov-97-do-you-have-a-question: Merge branch 'usagov-97-do-you-have…
cwacht Aug 2, 2022
f5e2d53
usagov-97-do-you-have-a-question: margin below Question box
cwacht Aug 2, 2022
da61779
usagov-97-do-you-have-a-question: Margin below Question box
cwacht Aug 2, 2022
6218498
Merge branch 'dev' into usagov-97-do-you-have-a-question
cwacht Aug 2, 2022
5e9c03f
Merge pull request #402 from usagov/usagov-97-do-you-have-a-question
cwacht Aug 2, 2022
0c0a085
usagov-97-do-you-have-a-question: Update left padding and focus outline
cwacht Aug 2, 2022
25207f4
Merge branch 'dev' into usagov-97-do-you-have-a-question
cwacht Aug 2, 2022
9962f86
dev: add apex domains for newrelic and docker
ednark Aug 3, 2022
edaea08
dev: add ccb lister
ednark Aug 3, 2022
a569c24
Merge branch 'dev' into usagov-97-do-you-have-a-question
cwacht Aug 3, 2022
07eb2c3
usagov-97-do-you-have-a-question: lint: declaration-empty-line-before
cwacht Aug 3, 2022
60cb713
dev: tome shoudl run automatically on LESS THAN thirty minutes uptime
ednark Aug 3, 2022
8af39a6
Merge branch 'dev' into usagov-97-do-you-have-a-question
cwacht Aug 3, 2022
d55ce23
USAGOV-371-ccb-script: assume you are asking for a diff from prod
ednark Aug 3, 2022
93f0a7b
USAGOV-371-ccb-script: fix missspepllling
ednark Aug 3, 2022
142fd62
USAGOV-371-ccb-script: add space and tab as project-ticketnumber sepa…
ednark Aug 3, 2022
65789b2
Merge pull request #405 from usagov/USAGOV-371-ccb-script
ednark Aug 3, 2022
ccaeb3c
dev: normalize output ticket format
ednark Aug 3, 2022
3e868b4
Merge branch 'dev' into usagov-97-do-you-have-a-question
cwacht Aug 3, 2022
25edbdb
usagov-345: Merge branch 'dev' into usagov-345 # Please enter a commi…
developer43 Aug 3, 2022
bdd9e4a
Merge pull request #403 from usagov/usagov-97-do-you-have-a-question
sinchagrenchik Aug 3, 2022
52ccbd3
usagov-97-do-you-have-a-question: Prevent Icons from squishing on mobile
cwacht Aug 3, 2022
a38125a
Merge branch 'dev' into usagov-97-do-you-have-a-question
cwacht Aug 3, 2022
980adaf
Merge pull request #407 from usagov/usagov-97-do-you-have-a-question
sinchagrenchik Aug 3, 2022
17ecfbe
Merge branch 'dev' into usagov-345
oadekoya12 Aug 4, 2022
d880c0e
Merge pull request #406 from usagov/usagov-345
oadekoya12 Aug 4, 2022
ee840f4
dev: convert sed to | since we are using / paths inside calls
ednark Aug 4, 2022
ccca35b
Usagov-345-correct-value-for-color-function: Use a valid value for th…
cwacht Aug 4, 2022
d754fc9
Merge pull request #409 from usagov/Usagov-345-correct-value-for-colo…
thetypicalprogrammer Aug 4, 2022
d849c10
USAGOV-30 - State Directory Content Type (#386)
thetypicalprogrammer Aug 4, 2022
8cf1ec2
dev:
ednark Aug 4, 2022
3228ae0
dev: remove explicit export of BUID BGID here, to allow env.local to …
ednark Aug 4, 2022
e7478a8
dev: bash started complaining about $(id -u) being used here, so we c…
ednark Aug 4, 2022
9e347bc
dev: dont override bid/gid
ednark Aug 4, 2022
94f269c
usagov-369-Share-This-Page-module-edits: usagov-369-Share-This-Page-u…
sinchagrenchik Aug 5, 2022
742cc94
Merge branch 'dev' into usagov-369-Share-This-Page-module-edits
cwacht Aug 5, 2022
3a9ba8e
Merge pull request #410 from usagov/usagov-369-Share-This-Page-module…
cwacht Aug 5, 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
7 changes: 2 additions & 5 deletions bin/build
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,9 @@ if [ -f env.local ]; then
. env.local
fi

CURR_UID=$(id -u)
CURR_GID=$(id -g)

docker compose build --no-cache \
--build-arg BUID=${BUID:-"$CURR_UID"} \
--build-arg BGID=${BGID:-"$CURR_GID"} \
--build-arg BUID=${BUID:-$(id -u)} \
--build-arg BGID=${BGID:-$(id -g)} \
--build-arg GITBRANCH=$(git symbolic-ref --short HEAD 2>/dev/null || echo "") \
--build-arg GITCOMMIT=$(git rev-parse HEAD 2>/dev/null || echo "") \
--build-arg GITTAG=$(git tag --points-at $(git rev-parse HEAD 2>/dev/null) | grep ^v | sort -rV | head -n 1 2>/dev/null || echo "") \
Expand Down
31 changes: 31 additions & 0 deletions bin/ccb
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/bash

COMMIT_A=${1:-stage}
COMMIT_B=${2:-prod}

if ! git cat-file -t $COMMIT_A > /dev/null; then
echo "Commit '$COMMIT_A' not found in this repo"
exit 1
fi
if ! git cat-file -t $COMMIT_B > /dev/null; then
echo "Commit '$COMMIT_B' not found in this repo"
exit 1
fi

# reorder the inputs by commit time
COMMIT_SORT=$(git show -s --format="%ct %S" $COMMIT_B $COMMIT_A | sort -n | awk '{print $2}')
NEWEST=$(echo "$COMMIT_SORT" | head -n 1)
OLDEST=$(echo "$COMMIT_SORT" | tail -n 1)

if [ "$NEWEST" == "$OLDEST" ]; then
echo "Commits are the same $NEWEST..$OLDEST"
exit 0
fi

echo "Tickets between $NEWEST <-> $OLDEST"
echo

# the name of the repo shows up as a ticket so we have to explicitly ignore it
# branch names have been sloppy so accept anything from "Usa 123" to "usa_123" to "USAGOV-123"
# be careful because [-_ ] has a space and a tab inside of the brackets
git log ${NEWEST}..${OLDEST} | grep -Eio 'usa(gov)?[-_ ]([0-9]+)' | sed -E 's/usa(gov)?[-_ ]([0-9]+)/USAGOV-\2/ig' | grep -iv usagov-2021 | sort -u
14 changes: 6 additions & 8 deletions bin/cloudgov/apps-egress-allow.acl
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
*.google.com
*.drupal.org
*.npmjs.com
*.newrelic.com
*.packagist.org
*.github.com
*.amazonaws.com
*.s3.amazonaws.com
secureauth.gsa.gov
*.docker.io
*.docker.com
docker.io
docker.com
*.newrelic.com
newrelic.com
*.app.cloud.gov
*.apps.internal
4 changes: 4 additions & 0 deletions bin/cloudgov/create-app-space
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ STARTORG=$( cf target | grep org: | awk '{ print $2 }')
APP_SPACE=${1:-$STARTSPACE}
APP_ORG=${2:-$STARTORG}

# we have no control over the container host so we cannot tell it about our proxy
# we must allow apps that are in a staging state un-proxied access to docker hub
# so the host can access the available images

# default staging asgs: dns public_network trusted_local_networks
# default running asgs: dns
STAGING_SECURITY_GROUPS="dns trusted_local_networks_egress public_networks_egress"
Expand Down
2 changes: 1 addition & 1 deletion bin/cloudgov/deploy-cms
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ else
cf push cms --docker-image ${DOCKERUSER}/${DOCKERREPO}${CDIGEST}
fi

# the egress-settup doesn't interfere with bootstrapping
# the egress-setup doesn't interfere with bootstrapping
# but cms needs to exist in the first place
# for route mapping and egress setup to run

Expand Down
4 changes: 4 additions & 0 deletions bin/cloudgov/deploy-waf
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ printf "\tAPPS_DOMAIN: $APPS_DOMAIN\n"
printf "\nFetching ROUTE_DOMAIN\n"
printf "\tAPPS_DOMAIN: $ROUTE_DOMAIN\n"

# remove proxy during staging
cf set-env waf http_proxy ""
cf set-env waf https_proxy ""

cf push "${ROUTE_SERVICE_APP_NAME}" --no-start --var app-name="${ROUTE_SERVICE_APP_NAME}"
cf set-env "${ROUTE_SERVICE_APP_NAME}" ALLOWED_IPS "$(printf "%s" "${NGINX_ALLOW_STATEMENTS:-}")"
cf start "${ROUTE_SERVICE_APP_NAME}"
Expand Down
9 changes: 7 additions & 2 deletions bin/cloudgov/setup-egress-for-apps
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,13 @@ for app in $applist; do
$output cf set-env "$app" https_proxy $proxyroute
$output cf set-env "$app" AWS_CA_BUNDLE /etc/ssl/certs/ca-certificates.crt
$output cf set-env "$app" REQUESTS_CA_BUNDLE /etc/ssl/certs/ca-certificates.crt
# $output cf restart "$app" --no-wait --strategy rolling
$output cf restart "$app"

# do not restart app here as this causes extra restarts during cms deploy
# devs may have to call cf restart directly in some cases where this script
# is used standone from the deploy scripts

$output cf restart "$app" --no-wait --strategy rolling
# $output cf restart "$app"
done

popspace
7 changes: 4 additions & 3 deletions bin/cloudgov/setup-egress-for-space
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,11 @@ for app in $applist ; do
do
# Add attached buckets to the allow list
BUCKET=$( echo -E "$VCAP_SERVICES" | jq -r ".s3[$i].credentials.bucket")
AWS_ENDPOINT=$( echo -E "$VCAP_SERVICES" | jq -r ".s3[$i].credentials.endpoint")
AWS_FIPS_ENDPOINT=$( echo -E "$VCAP_SERVICES" | jq -r ".s3[$i].credentials.fips_endpoint")
AWS_ENDPOINT=$( echo -E "$VCAP_SERVICES" | jq -r ".s3[$i].credentials.endpoint" | uniq )
AWS_ENDPOINT_ALT=$( echo -E "$AWS_ENDPOINT" | sed 's/s3\-us\-/s3.us-/g' | uniq )
AWS_FIPS_ENDPOINT=$( echo -E "$VCAP_SERVICES" | jq -r ".s3[$i].credentials.fips_endpoint" | uniq )
# Add both the FIPS and non-FIPS hostnames
buckethosts="$buckethosts ${BUCKET}.${AWS_ENDPOINT} ${BUCKET}.${AWS_FIPS_ENDPOINT}"
buckethosts="$buckethosts ${BUCKET}.${AWS_ENDPOINT} ${BUCKET}.${AWS_ENDPOINT_ALT} ${BUCKET}.${AWS_FIPS_ENDPOINT}"
((i+=1))
done
done
Expand Down
6 changes: 2 additions & 4 deletions bin/init
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
# Setup environmental variables so current User and Group Ids are available at container build time
# spam out to a variety of possible files to cover common cases
echo "Setup BUID and BGID environmental variables"
export BUID=$(id -u)
export GUID=$(id -g)
if [ -f ~/.zshrc ] && ! grep -q 'export BUID=' ~/.zshrc; then
echo "export BUID=\$(id -u)" >> ~/.zshrc
echo "export BGID=\$(id -g)" >> ~/.zshrc
Expand Down Expand Up @@ -47,8 +45,8 @@ bin/build

echo "Fix permissions inside Containers - this could take a long time"
docker compose run \
-e BUID=$(id -u) \
-e BGID=$(id -g) \
-e BUID=${BUID:-$(id -u)} \
-e BGID=${BGID:-$(id -g)} \
--rm --no-deps --workdir /var/www \
-u root composer /var/www/bin/fix-perms-in-container

Expand Down
1 change: 1 addition & 0 deletions config/sync/block.block.leftmenuenglish_3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,4 @@ visibility:
bundles:
basic_page: basic_page
directory_record: directory_record
state_directory_record: state_directory_record
2 changes: 2 additions & 0 deletions config/sync/block.block.leftmenuspanish_2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,5 @@ visibility:
node: '@node.node_route_context:node'
bundles:
basic_page: basic_page
directory_record: directory_record
state_directory_record: state_directory_record
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
uuid: fec2315e-00a5-475b-98a7-f112199f2abe
langcode: en
status: true
dependencies:
config:
- node.type.state_directory_record
id: node.state_directory_record.promote
field_name: promote
entity_type: node
bundle: state_directory_record
label: 'Promoted to front page'
description: ''
required: false
translatable: true
default_value:
-
value: 0
default_value_callback: ''
settings:
on_label: 'On'
off_label: 'Off'
field_type: boolean
Loading