Skip to content

Commit df5aaa5

Browse files
Merge branch 'main' into MBMS-84629-update-registry-content-build
2 parents abb88ba + 8411a4f commit df5aaa5

File tree

92 files changed

+1393
-878
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+1393
-878
lines changed

.github/workflows/continuous-integration.yml

+13-14
Original file line numberDiff line numberDiff line change
@@ -393,20 +393,20 @@ jobs:
393393

394394
cypress-tests:
395395
name: Cypress E2E Tests
396-
runs-on: [self-hosted, asg]
396+
runs-on: ubuntu-16-cores-latest
397397
needs:
398398
- login-to-amazon-ecr
399399
- build
400400
timeout-minutes: 30
401401
container:
402-
image: 008577686731.dkr.ecr.us-gov-west-1.amazonaws.com/cypress-io:node16.13.2-chrome100-ff98
402+
image: 008577686731.dkr.ecr.us-gov-west-1.amazonaws.com/dsva/cypress-io/cypress/browsers:node16.16.0-chrome107-ff107-edge
403403
credentials:
404404
username: ${{ needs.login-to-amazon-ecr.outputs.docker_username }}
405405
password: ${{ needs.login-to-amazon-ecr.outputs.docker_password }}
406-
options: --user 1001:1001
407-
volumes:
408-
- /usr/local/share:/share
409-
- /etc/ssl/certs:/etc/ssl/certs
406+
# options: --user 1001:1001
407+
# volumes:
408+
# - /usr/local/share:/share
409+
# - /etc/ssl/certs:/etc/ssl/certs
410410

411411
env:
412412
NODE_EXTRA_CA_CERTS: /etc/ssl/certs/ca-certificates.crt
@@ -428,13 +428,12 @@ jobs:
428428
uses: ./.github/workflows/install
429429
timeout-minutes: 30
430430
with:
431-
key: on-demand-runner-cypress-${{ hashFiles('**/yarn.lock') }}
432-
restore-keys: on-demand-runner-cypress-
431+
key: ${{ hashFiles('yarn.lock') }}
433432
yarn_cache_folder: .cache/yarn
434433
path: |
435434
.cache/yarn
436435
/github/home/.cache/Cypress
437-
**/node_modules
436+
node_modules
438437
439438
- name: Start server
440439
run: node src/platform/testing/e2e/test-server.js --buildtype vagovprod --port=3002 &
@@ -451,21 +450,21 @@ jobs:
451450
report_paths: 'test-results/e2e-test-output-*.xml'
452451

453452
- name: Archive Cypress test videos
454-
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
453+
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
455454
if: ${{ failure() }}
456455
with:
457456
name: cypress-video-artifacts
458457
path: cypress/videos
459458

460459
- name: Archive Cypress test screenshots
461-
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
460+
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
462461
if: ${{ failure() }}
463462
with:
464463
name: cypress-screenshot-artifacts
465464
path: cypress/screenshots
466465

467466
- name: Archive Mochawesome test results
468-
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
467+
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
469468
if: ${{ always() }}
470469
with:
471470
name: cypress-mochawesome-test-results
@@ -535,7 +534,7 @@ jobs:
535534
working-directory: testing-tools-team-dashboard-data
536535

537536
- name: Download Mochawesome test results
538-
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
537+
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
539538
with:
540539
name: cypress-mochawesome-test-results
541540
path: testing-tools-team-dashboard-data/src/testing-reports/data
@@ -574,7 +573,7 @@ jobs:
574573

575574
- name: Download video artifacts
576575
if: ${{ needs.cypress-tests.result == 'failure' }}
577-
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
576+
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
578577
with:
579578
name: cypress-video-artifacts
580579
path: testing-tools-team-dashboard-data/testing-reports/videos/${{ env.UUID }}

.github/workflows/daily-production-release.yml

+17
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ name: Daily Production Release
22

33
on:
44
workflow_dispatch:
5+
inputs:
6+
override_code_freeze:
7+
type: boolean
8+
description: "Override code freeze and create production tag"
9+
default: false
510
schedule:
611
- cron: 0 16 * * 1-5
712

@@ -15,9 +20,21 @@ env:
1520
DSVA_SCHEDULE_ENABLED: true
1621

1722
jobs:
23+
holiday-checker:
24+
runs-on: ubuntu-latest
25+
outputs:
26+
is_holiday: ${{ steps.holiday-check.outputs.is_holiday }}
27+
steps:
28+
- name: Check if today is a holiday
29+
id: holiday-check
30+
uses: department-of-veterans-affairs/vsp-github-actions/holiday-checker@main
1831
create-release:
1932
name: Create Release
33+
needs: holiday-checker
2034
runs-on: ubuntu-latest
35+
# Do not run the workflow during VA holidays unless we explicitly override it.
36+
if: >
37+
(needs.holiday-checker.outputs.is_holiday == 'false' || (inputs && inputs.override_code_freeze))
2138
outputs:
2239
RELEASE_NAME: ${{ steps.export-release-name.outputs.RELEASE_NAME }}
2340

.github/workflows/install/action.yml

+11-9
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@ description: Install dependencies
33

44
inputs:
55
key:
6-
description: keys for actions/cache@v3
6+
description: keys for actions/cache@v4
77
required: false
88
default: ''
99
restore-keys:
10-
description: restore-keys for actions/cache@v3
10+
description: restore-keys for actions/cache@v4
1111
required: false
1212
default: ''
1313
yarn_cache_folder:
1414
description: path for yarn cache
1515
required: false
1616
default: ''
1717
path:
18-
description: path for actions/cache@v3
18+
description: path for actions/cache@v4
1919
required: false
2020
default: ''
2121

@@ -28,7 +28,7 @@ runs:
2828
run: echo NODE_VERSION=$(cat .nvmrc) >> $GITHUB_OUTPUT
2929

3030
- name: Setup Node
31-
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
31+
uses: actions/setup-node@v4
3232
with:
3333
node-version: ${{ steps.get-node-version.outputs.NODE_VERSION }}
3434

@@ -38,17 +38,19 @@ runs:
3838

3939
- name: Cache dependencies
4040
id: cache-dependencies
41-
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
41+
uses: actions/cache@v4
4242
with:
4343
path: ${{ inputs.path }}
4444
key: ${{ steps.get-node-version.outputs.NODE_VERSION }}-${{ inputs.key }}
45-
restore-keys: ${{ steps.get-node-version.outputs.NODE_VERSION }}-${{ inputs.restore-keys }}
4645

4746
- name: Install dependencies
48-
uses: nick-invision/retry@943e742917ac94714d2f408a0e8320f2d1fcafcd # v2.8.3
47+
uses: nick-fields/retry@v3
4948
with:
50-
command: yarn install --frozen-lockfile --prefer-offline --production=false
49+
command: |
50+
CYPRESS_INSTALL_BINARY=https://vetsgov-website-builds-s3-upload.s3.us-gov-west-1.amazonaws.com/artifacts/cypress/13.3.0.zip yarn install --frozen-lockfile --prefer-offline --production=false --network-timeout 1000000000
51+
npx cypress install
52+
npx cypress --version
5153
max_attempts: 3
5254
timeout_minutes: 7
5355
env:
54-
YARN_CACHE_FOLDER: ${{ inputs.yarn_cache_folder }}
56+
YARN_CACHE_FOLDER: ${{ inputs.yarn_cache_folder }}

.github/workflows/preview-environment-cleanup.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
uses: EndBug/add-and-commit@1bad3abcf0d6ec49a5857d124b0bfb52dc7bb081 # 9.1.3
5656
with:
5757
author_name: va-vsp-bot
58-
author_email: [email protected]
58+
author_email: [email protected]
5959
branch: main
6060
cwd: manifests/apps/preview-environment/dev/
6161
add: 'pe-envs'
@@ -66,7 +66,7 @@ jobs:
6666
uses: EndBug/add-and-commit@1bad3abcf0d6ec49a5857d124b0bfb52dc7bb081 # 9.1.3
6767
with:
6868
author_name: va-vsp-bot
69-
author_email: [email protected]
69+
author_email: [email protected]
7070
branch: main
7171
cwd: manifests/apps/preview-environment/dev/
7272
add: 'argocd-apps'

docs/packagist.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Content Build in Packagist
2+
[Packagist](https://packagist.org/) is the main public package library, similar to NPM for Javascript or Gems for Ruby. [Composer](https://getcomposer.org/) is used to manage PHP packages for a given application, similar to the `npm` or `gem` applications.
3+
4+
[Content Build is published to Packagist as a public package](https://packagist.org/packages/va-gov/content-build). This enables PHP applications to pull in Content Build via its Composer document as part of its build process.
5+
6+
## Updating Content Build on Packagist
7+
Content Build on Packagist is updated automatically via webhook; see [Packagist's documentation for Github webhook integration](https://packagist.org/about), and Content Build's own Github settings for the specifics of the webhook.

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
"@babel/preset-react": "^7.23.3",
9999
"@babel/register": "^7.23.7",
100100
"@department-of-veterans-affairs/eslint-plugin": "^1.1.0",
101-
"@department-of-veterans-affairs/web-components": "^16.0.1",
101+
"@department-of-veterans-affairs/web-components": "^16.4.0",
102102
"@octokit/rest": "^18.10.0",
103103
"@sentry/browser": "^6.13.1",
104104
"@testing-library/cypress": "^8.0.3",
@@ -273,4 +273,4 @@
273273
"**/ansi-regex": "^4.1.1",
274274
"**/@babel/core": "^7.23.2"
275275
}
276-
}
276+
}

script/preview.js

+5
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ const createMetalSmithSymlink = require('../src/site/stages/build/plugins/create
2626
const {
2727
processLovellPages,
2828
} = require('../src/site/stages/build/drupal/process-lovell-pages');
29+
const {
30+
processManilaPages,
31+
} = require('../src/site/stages/build/drupal/process-manila-pages');
2932

3033
const defaultBuildtype = ENVIRONMENTS.LOCALHOST;
3134
const defaultHost = HOSTNAMES[defaultBuildtype];
@@ -284,6 +287,8 @@ app.get('/preview', async (req, res, next) => {
284287

285288
drupalData.data.nodeQuery = drupalData.data.nodes;
286289
processLovellPages(drupalData);
290+
processManilaPages(drupalData);
291+
287292
const pageIndex = req.query?.lovellVariant === 'va' ? 1 : 0;
288293

289294
const drupalPage = drupalData.data.nodes.entities[pageIndex];

src/applications/registry-schema.json

+3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
"rootUrl": {
2121
"type": "string"
2222
},
23+
"useLocalStylesAndComponents": {
24+
"type": "boolean"
25+
},
2326
"template": {
2427
"type": "object",
2528
"properties": {

0 commit comments

Comments
 (0)