Skip to content

Commit bc99b66

Browse files
committed
[skip-ci] add angular-webpack sample group
1 parent 3207ce4 commit bc99b66

File tree

5 files changed

+325
-3
lines changed

5 files changed

+325
-3
lines changed

.blueprint/github-build-matrix/__snapshots__/generator.spec.ts.snap

Lines changed: 167 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,173 @@ exports[`generator - github-build-matrix with angular should match matrix value
427427
}"
428428
`;
429429

430+
exports[`generator - github-build-matrix with daily-builds/angular-webpack should match matrix value 1`] = `
431+
"{
432+
"include": [
433+
{
434+
"job-name": "monolith-maven-reactive(false)",
435+
"sample": "monolith-maven-reactive(false)",
436+
"os": "ubuntu-latest",
437+
"node-version": "NODE-VERSION",
438+
"java-version": "JAVA-VERSION",
439+
"npm-version": "NPM-VERSION",
440+
"default-environment": "prod",
441+
"jwt-secret-key": "ZjY4MTM4YjI5YzMwZjhjYjI2OTNkNTRjMWQ5Y2Q0Y2YwOWNmZTE2NzRmYzU3NTMwM2NjOTE3MTllOTM3MWRkMzcyYTljMjVmNmQ0Y2MxOTUzODc0MDhhMTlkMDIxMzI2YzQzZDM2ZDE3MmQ3NjVkODk3OTVmYzljYTQyZDNmMTQ=",
442+
"args": "jdl",
443+
"cmd-frontend": "./npmw run ci:frontend:test",
444+
"cmd-backend": "./npmw run ci:backend:test",
445+
"cmd-e2e-1": "./npmw run e2e:devserver",
446+
"cmd-e2e-2": "./npmw run ci:e2e:package && npm run ci:e2e:prepare && npm run ci:e2e:run",
447+
"jdl": "application {\\n config {\\n testFrameworks [cypress]\\n applicationType monolith\\n buildTool maven\\n reactive false\\n }\\n}",
448+
"samples-group": "angular-webpack",
449+
"build-jhipster-bom": true,
450+
"jhipster-bom-branch": "main",
451+
"jhipster-bom-cicd-version": "0.0.0-CICD"
452+
},
453+
{
454+
"job-name": "monolith-maven-reactive(true)",
455+
"sample": "monolith-maven-reactive(true)",
456+
"os": "ubuntu-latest",
457+
"node-version": "NODE-VERSION",
458+
"java-version": "JAVA-VERSION",
459+
"npm-version": "NPM-VERSION",
460+
"default-environment": "prod",
461+
"jwt-secret-key": "ZjY4MTM4YjI5YzMwZjhjYjI2OTNkNTRjMWQ5Y2Q0Y2YwOWNmZTE2NzRmYzU3NTMwM2NjOTE3MTllOTM3MWRkMzcyYTljMjVmNmQ0Y2MxOTUzODc0MDhhMTlkMDIxMzI2YzQzZDM2ZDE3MmQ3NjVkODk3OTVmYzljYTQyZDNmMTQ=",
462+
"args": "jdl",
463+
"cmd-frontend": "./npmw run ci:frontend:test",
464+
"cmd-backend": "./npmw run ci:backend:test",
465+
"cmd-e2e-1": "./npmw run e2e:devserver",
466+
"cmd-e2e-2": "./npmw run ci:e2e:package && npm run ci:e2e:prepare && npm run ci:e2e:run",
467+
"jdl": "application {\\n config {\\n testFrameworks [cypress]\\n applicationType monolith\\n buildTool maven\\n reactive true\\n }\\n}",
468+
"samples-group": "angular-webpack",
469+
"build-jhipster-bom": true,
470+
"jhipster-bom-branch": "main",
471+
"jhipster-bom-cicd-version": "0.0.0-CICD"
472+
},
473+
{
474+
"job-name": "monolith-gradle-reactive(false)-spring-websocket",
475+
"sample": "monolith-gradle-reactive(false)-spring-websocket",
476+
"os": "ubuntu-latest",
477+
"node-version": "NODE-VERSION",
478+
"java-version": "JAVA-VERSION",
479+
"npm-version": "NPM-VERSION",
480+
"default-environment": "prod",
481+
"jwt-secret-key": "ZjY4MTM4YjI5YzMwZjhjYjI2OTNkNTRjMWQ5Y2Q0Y2YwOWNmZTE2NzRmYzU3NTMwM2NjOTE3MTllOTM3MWRkMzcyYTljMjVmNmQ0Y2MxOTUzODc0MDhhMTlkMDIxMzI2YzQzZDM2ZDE3MmQ3NjVkODk3OTVmYzljYTQyZDNmMTQ=",
482+
"args": "jdl",
483+
"cmd-frontend": "./npmw run ci:frontend:test",
484+
"cmd-backend": "./npmw run ci:backend:test",
485+
"cmd-e2e-1": "./npmw run e2e:devserver",
486+
"cmd-e2e-2": "./npmw run ci:e2e:package && npm run ci:e2e:prepare && npm run ci:e2e:run",
487+
"jdl": "application {\\n config {\\n testFrameworks [cypress]\\n applicationType monolith\\n buildTool gradle\\n reactive false\\n websocket spring-websocket\\n }\\n}",
488+
"samples-group": "angular-webpack",
489+
"build-jhipster-bom": true,
490+
"jhipster-bom-branch": "main",
491+
"jhipster-bom-cicd-version": "0.0.0-CICD"
492+
},
493+
{
494+
"job-name": "monolith-gradle-reactive(true)",
495+
"sample": "monolith-gradle-reactive(true)",
496+
"os": "ubuntu-latest",
497+
"node-version": "NODE-VERSION",
498+
"java-version": "JAVA-VERSION",
499+
"npm-version": "NPM-VERSION",
500+
"default-environment": "prod",
501+
"jwt-secret-key": "ZjY4MTM4YjI5YzMwZjhjYjI2OTNkNTRjMWQ5Y2Q0Y2YwOWNmZTE2NzRmYzU3NTMwM2NjOTE3MTllOTM3MWRkMzcyYTljMjVmNmQ0Y2MxOTUzODc0MDhhMTlkMDIxMzI2YzQzZDM2ZDE3MmQ3NjVkODk3OTVmYzljYTQyZDNmMTQ=",
502+
"args": "jdl",
503+
"cmd-frontend": "./npmw run ci:frontend:test",
504+
"cmd-backend": "./npmw run ci:backend:test",
505+
"cmd-e2e-1": "./npmw run e2e:devserver",
506+
"cmd-e2e-2": "./npmw run ci:e2e:package && npm run ci:e2e:prepare && npm run ci:e2e:run",
507+
"jdl": "application {\\n config {\\n testFrameworks [cypress]\\n applicationType monolith\\n buildTool gradle\\n reactive true\\n }\\n}",
508+
"samples-group": "angular-webpack",
509+
"build-jhipster-bom": true,
510+
"jhipster-bom-branch": "main",
511+
"jhipster-bom-cicd-version": "0.0.0-CICD"
512+
},
513+
{
514+
"job-name": "gateway-maven-reactive(false)",
515+
"sample": "gateway-maven-reactive(false)",
516+
"os": "ubuntu-latest",
517+
"node-version": "NODE-VERSION",
518+
"java-version": "JAVA-VERSION",
519+
"npm-version": "NPM-VERSION",
520+
"default-environment": "prod",
521+
"jwt-secret-key": "ZjY4MTM4YjI5YzMwZjhjYjI2OTNkNTRjMWQ5Y2Q0Y2YwOWNmZTE2NzRmYzU3NTMwM2NjOTE3MTllOTM3MWRkMzcyYTljMjVmNmQ0Y2MxOTUzODc0MDhhMTlkMDIxMzI2YzQzZDM2ZDE3MmQ3NjVkODk3OTVmYzljYTQyZDNmMTQ=",
522+
"args": "jdl --experimental",
523+
"cmd-frontend": "./npmw run ci:frontend:test",
524+
"cmd-backend": "./npmw run ci:backend:test",
525+
"cmd-e2e-1": "./npmw run e2e:devserver",
526+
"cmd-e2e-2": "./npmw run ci:e2e:package && npm run ci:e2e:prepare && npm run ci:e2e:run",
527+
"jdl": "application {\\n config {\\n testFrameworks [cypress]\\n applicationType gateway\\n buildTool maven\\n reactive false\\n }\\n}",
528+
"samples-group": "angular-webpack",
529+
"build-jhipster-bom": true,
530+
"jhipster-bom-branch": "main",
531+
"jhipster-bom-cicd-version": "0.0.0-CICD"
532+
},
533+
{
534+
"job-name": "gateway-maven-reactive(true)",
535+
"sample": "gateway-maven-reactive(true)",
536+
"os": "ubuntu-latest",
537+
"node-version": "NODE-VERSION",
538+
"java-version": "JAVA-VERSION",
539+
"npm-version": "NPM-VERSION",
540+
"default-environment": "prod",
541+
"jwt-secret-key": "ZjY4MTM4YjI5YzMwZjhjYjI2OTNkNTRjMWQ5Y2Q0Y2YwOWNmZTE2NzRmYzU3NTMwM2NjOTE3MTllOTM3MWRkMzcyYTljMjVmNmQ0Y2MxOTUzODc0MDhhMTlkMDIxMzI2YzQzZDM2ZDE3MmQ3NjVkODk3OTVmYzljYTQyZDNmMTQ=",
542+
"args": "jdl",
543+
"cmd-frontend": "./npmw run ci:frontend:test",
544+
"cmd-backend": "./npmw run ci:backend:test",
545+
"cmd-e2e-1": "./npmw run e2e:devserver",
546+
"cmd-e2e-2": "./npmw run ci:e2e:package && npm run ci:e2e:prepare && npm run ci:e2e:run",
547+
"jdl": "application {\\n config {\\n testFrameworks [cypress]\\n applicationType gateway\\n buildTool maven\\n reactive true\\n }\\n}",
548+
"samples-group": "angular-webpack",
549+
"build-jhipster-bom": true,
550+
"jhipster-bom-branch": "main",
551+
"jhipster-bom-cicd-version": "0.0.0-CICD"
552+
},
553+
{
554+
"job-name": "gateway-gradle-reactive(false)-spring-websocket",
555+
"sample": "gateway-gradle-reactive(false)-spring-websocket",
556+
"os": "ubuntu-latest",
557+
"node-version": "NODE-VERSION",
558+
"java-version": "JAVA-VERSION",
559+
"npm-version": "NPM-VERSION",
560+
"default-environment": "prod",
561+
"jwt-secret-key": "ZjY4MTM4YjI5YzMwZjhjYjI2OTNkNTRjMWQ5Y2Q0Y2YwOWNmZTE2NzRmYzU3NTMwM2NjOTE3MTllOTM3MWRkMzcyYTljMjVmNmQ0Y2MxOTUzODc0MDhhMTlkMDIxMzI2YzQzZDM2ZDE3MmQ3NjVkODk3OTVmYzljYTQyZDNmMTQ=",
562+
"args": "jdl --experimental",
563+
"cmd-frontend": "./npmw run ci:frontend:test",
564+
"cmd-backend": "./npmw run ci:backend:test",
565+
"cmd-e2e-1": "./npmw run e2e:devserver",
566+
"cmd-e2e-2": "./npmw run ci:e2e:package && npm run ci:e2e:prepare && npm run ci:e2e:run",
567+
"jdl": "application {\\n config {\\n testFrameworks [cypress]\\n applicationType gateway\\n buildTool gradle\\n reactive false\\n websocket spring-websocket\\n }\\n}",
568+
"samples-group": "angular-webpack",
569+
"build-jhipster-bom": true,
570+
"jhipster-bom-branch": "main",
571+
"jhipster-bom-cicd-version": "0.0.0-CICD"
572+
},
573+
{
574+
"job-name": "gateway-gradle-reactive(true)",
575+
"sample": "gateway-gradle-reactive(true)",
576+
"os": "ubuntu-latest",
577+
"node-version": "NODE-VERSION",
578+
"java-version": "JAVA-VERSION",
579+
"npm-version": "NPM-VERSION",
580+
"default-environment": "prod",
581+
"jwt-secret-key": "ZjY4MTM4YjI5YzMwZjhjYjI2OTNkNTRjMWQ5Y2Q0Y2YwOWNmZTE2NzRmYzU3NTMwM2NjOTE3MTllOTM3MWRkMzcyYTljMjVmNmQ0Y2MxOTUzODc0MDhhMTlkMDIxMzI2YzQzZDM2ZDE3MmQ3NjVkODk3OTVmYzljYTQyZDNmMTQ=",
582+
"args": "jdl",
583+
"cmd-frontend": "./npmw run ci:frontend:test",
584+
"cmd-backend": "./npmw run ci:backend:test",
585+
"cmd-e2e-1": "./npmw run e2e:devserver",
586+
"cmd-e2e-2": "./npmw run ci:e2e:package && npm run ci:e2e:prepare && npm run ci:e2e:run",
587+
"jdl": "application {\\n config {\\n testFrameworks [cypress]\\n applicationType gateway\\n buildTool gradle\\n reactive true\\n }\\n}",
588+
"samples-group": "angular-webpack",
589+
"build-jhipster-bom": true,
590+
"jhipster-bom-branch": "main",
591+
"jhipster-bom-cicd-version": "0.0.0-CICD"
592+
}
593+
]
594+
}"
595+
`;
596+
430597
exports[`generator - github-build-matrix with devserver should match matrix value 1`] = `
431598
"{
432599
"include": [

.blueprint/github-build-matrix/command.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
import type { JHipsterCommandDefinition } from '../../lib/command/index.ts';
22

3-
export const workflowChoices = ['angular', 'devserver', 'graalvm', 'react', 'docker-compose-integration', 'vue'] as const;
3+
export const workflowChoices = [
4+
'angular',
5+
'devserver',
6+
'graalvm',
7+
'react',
8+
'docker-compose-integration',
9+
'vue',
10+
'daily-builds/angular-webpack',
11+
] as const;
412
export const eventNameChoices = ['push', 'pull_request', 'daily'] as const;
513

614
export default {

.blueprint/github-build-matrix/generator.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@ export default class extends BaseGenerator {
3030

3131
let matrix: GitHubMatrixGroup = {};
3232
let randomEnvironment = false;
33-
if (this.workflow === 'docker-compose-integration') {
34-
const { samples, warnings } = await getGithubSamplesGroup(this.templatePath('../samples/'), this.workflow);
33+
if (this.workflow === 'docker-compose-integration' || this.workflow?.startsWith('daily-builds/')) {
34+
const [group, workflow] = this.workflow.includes('/') ? this.workflow.split('/') : ['', this.workflow];
35+
const { samples, warnings } = await getGithubSamplesGroup(this.templatePath(`../samples/${group}`), workflow);
3536
matrix = samples;
3637
if (warnings.length) {
3738
this.log.warn(warnings.join('\n'));
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import type { GitHubMatrixGroup } from '../../../../lib/testing/github-matrix.ts';
2+
import { extendFilteredMatrix, fromMatrix } from '../../../../lib/testing/support/matrix-utils.ts';
3+
import { convertOptionsToJDL } from '../../support/jdl.ts';
4+
5+
export default Object.fromEntries(
6+
[
7+
...Object.entries(
8+
extendFilteredMatrix(
9+
fromMatrix({
10+
applicationType: ['monolith', 'gateway'],
11+
buildTool: ['maven', 'gradle'],
12+
reactive: [false, true],
13+
}),
14+
data => !data.reactive,
15+
{
16+
websocket: [undefined, 'spring-websocket'],
17+
},
18+
),
19+
),
20+
].map(([key, value]) => [
21+
key,
22+
{
23+
args: `jdl${value.applicationType === 'gateway' && !value.reactive ? ' --experimental' : ''}`,
24+
'cmd-frontend': './npmw run ci:frontend:test',
25+
'cmd-backend': './npmw run ci:backend:test',
26+
'cmd-e2e-1': './npmw run e2e:devserver',
27+
'cmd-e2e-2': './npmw run ci:e2e:package && npm run ci:e2e:prepare && npm run ci:e2e:run',
28+
jdl: convertOptionsToJDL(value),
29+
},
30+
]),
31+
) satisfies GitHubMatrixGroup;

.github/workflows/daily-builds.yml

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
#
2+
# Copyright the original author or authors from the JHipster project.
3+
#
4+
# This file is part of the JHipster project, see https://www.jhipster.tech/
5+
# for more information.
6+
#
7+
# Licensed under the Apache License, Version 2.0 (the "License");
8+
# you may not use this file except in compliance with the License.
9+
# You may obtain a copy of the License at
10+
#
11+
# https://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing, software
14+
# distributed under the License is distributed on an "AS IS" BASIS,
15+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
# See the License for the specific language governing permissions and
17+
# limitations under the License.
18+
#
19+
20+
name: Daily Builds
21+
on:
22+
workflow_dispatch:
23+
inputs:
24+
sample-group:
25+
type: choice
26+
description: Sample group to test
27+
options:
28+
- daily-builds/angular-webpack
29+
env:
30+
NODE_OPTIONS: --dns-result-order=ipv4first
31+
FORCE_COLOR: 2
32+
jobs:
33+
build-matrix:
34+
runs-on: ubuntu-latest
35+
outputs:
36+
matrix: ${{ steps.build.outputs.matrix }}
37+
empty-matrix: ${{ steps.build.outputs.empty-matrix }}
38+
steps:
39+
- uses: actions/checkout@v5
40+
with:
41+
fetch-depth: 1
42+
- uses: actions/setup-node@v5
43+
with:
44+
node-version: 24
45+
- run: npm ci --ignore-scripts
46+
- id: build
47+
run: bin/jhipster.cjs github-build-matrix ${{ inputs.sample-group }}
48+
applications:
49+
name: ${{ matrix.job-name }}
50+
needs: build-matrix
51+
runs-on: ${{ matrix.os }}
52+
defaults:
53+
run:
54+
working-directory: ${{ github.workspace }}/app
55+
timeout-minutes: 40
56+
strategy:
57+
fail-fast: false
58+
matrix: ${{ fromJson(needs.build-matrix.outputs.matrix) }}
59+
steps:
60+
#----------------------------------------------------------------------
61+
# Install all tools and check configuration
62+
#----------------------------------------------------------------------
63+
- name: 'SETUP: Checkout generator-jhipster'
64+
uses: actions/checkout@v5
65+
with:
66+
path: generator-jhipster
67+
fetch-depth: 2
68+
- uses: jhipster/actions/setup-runner@v1
69+
with:
70+
node-version: ${{ matrix.node-version }}
71+
java-version: ${{ matrix.java-version }}
72+
npm-version: ${{ matrix.npm-version }}
73+
maven-cache: true
74+
gradle-cache: ${{ matrix.gradle-cache }}
75+
binary-dir: ${{ github.workspace }}/generator-jhipster/bin
76+
- run: npm ci --ignore-scripts
77+
working-directory: ${{ github.workspace }}/generator-jhipster
78+
- uses: jhipster/actions/build-jhipster-bom@v1
79+
with:
80+
jhipster-bom-ref: main
81+
- name: Generate project
82+
run: jhipster.cjs ${{ matrix.args }} --defaults
83+
env:
84+
JHIPSTER_DEPENDENCIES_VERSION: 0.0.0-CICD
85+
JHI_SKIP_JHIPSTER_DEPENDENCIES: true
86+
JHI_PROFILE: ${{ matrix.default-environment }}
87+
JHI_JDL: ${{ matrix.jdl }}
88+
- run: jhipster.cjs info
89+
- run: ${{ matrix.cmd-frontend }}
90+
id: frontend
91+
- run: ${{ matrix.cmd-backend }}
92+
id: backend
93+
- run: ${{ matrix.cmd-e2e-1 }}
94+
id: e2e-1
95+
- run: ${{ matrix.cmd-e2e-2 }}
96+
id: e2e-2
97+
- name: Upload cypress screenshots
98+
uses: actions/upload-artifact@v4
99+
if: always() && (steps.e2e-1.outcome == 'failure' || steps.e2e-2.outcome == 'failure')
100+
with:
101+
name: screenshots-${{ matrix.name }}
102+
path: ${{ github.workspace }}app//*/cypress/screenshots
103+
check-workflow:
104+
permissions:
105+
contents: none
106+
runs-on: ubuntu-latest
107+
needs: [applications]
108+
if: always()
109+
steps:
110+
- run: |
111+
echo '${{ toJSON(needs) }}'
112+
if [ 'skipped' == '${{ needs.applications.result }}' ] || [ 'success' == '${{ needs.applications.result }}' ] || [ 'closed' == '${{ github.event.action }}' ]; then
113+
exit 0
114+
fi
115+
exit 1

0 commit comments

Comments
 (0)