Skip to content

Commit

Permalink
ci: update compare-sample (#294)
Browse files Browse the repository at this point in the history
  • Loading branch information
mshima authored Dec 28, 2024
1 parent 6d0dbf4 commit b3e766b
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 72 deletions.
4 changes: 2 additions & 2 deletions .blueprint/generate-sample/generator.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export default class extends BaseGenerator {
'sample-file': sampleFile = sampleName,
'sample-folder': sampleFolder = samplesPath,
generatorOptions,
jdlOptions,
templateOptions = {},
} = samples[sampleName];

this.generatorOptions = generatorOptions;
Expand All @@ -53,7 +53,7 @@ export default class extends BaseGenerator {
this.copyTemplate(join(sampleFolder, jdlFile), jdlFile, { noGlob: true });
} else if (sampleType === 'jdl-ejs') {
const jdlFile = `${sampleFile}.jdl`;
this.renderTemplate(join(sampleFolder, `${jdlFile}.ejs`), jdlFile, jdlOptions, undefined, { noGlob: true });
this.renderTemplate(join(sampleFolder, `${jdlFile}.ejs`), jdlFile, templateOptions, undefined, { noGlob: true });
} else if (sampleType === 'yo-rc') {
this.copyTemplate('**', '', {
fromBasePath: this.templatePath(sampleFolder, sampleFile),
Expand Down
4 changes: 1 addition & 3 deletions .blueprint/generate-sample/templates/samples.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ export default Object.fromEntries(
'job-name': `${auditFramework}, ${buildTool}, postgresql-mvc-jwt`,
'sample-type': 'jdl-ejs',
'sample-file': 'postgresql-mvc-jwt',
jdlOptions: { auditFramework, buildTool },
'audit-framework': auditFramework,
'build-tool': buildTool,
templateOptions: { auditFramework, buildTool },
},
]),
);

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,8 @@ exports[`generator - github-build-matrix > with samples > should match matrix va
{
"include": [
{
"audit-framework": "custom",
"build-tool": "maven",
"default-environment": "prod",
"java-version": "17",
"jdlOptions": {
"auditFramework": "custom",
"buildTool": "maven",
},
"job-name": "custom, maven, postgresql-mvc-jwt",
"jwt-secret-key": "ZjY4MTM4YjI5YzMwZjhjYjI2OTNkNTRjMWQ5Y2Q0Y2YwOWNmZTE2NzRmYzU3NTMwM2NjOTE3MTllOTM3MWRkMzcyYTljMjVmNmQ0Y2MxOTUzODc0MDhhMTlkMDIxMzI2YzQzZDM2ZDE3MmQ3NjVkODk3OTVmYzljYTQyZDNmMTQ=",
"node-version": "22.12.0",
Expand All @@ -21,16 +15,14 @@ exports[`generator - github-build-matrix > with samples > should match matrix va
"sample-file": "postgresql-mvc-jwt",
"sample-type": "jdl-ejs",
"samples-group": "samples",
"templateOptions": {
"auditFramework": "custom",
"buildTool": "maven",
},
},
{
"audit-framework": "javers",
"build-tool": "maven",
"default-environment": "prod",
"java-version": "17",
"jdlOptions": {
"auditFramework": "javers",
"buildTool": "maven",
},
"job-name": "javers, maven, postgresql-mvc-jwt",
"jwt-secret-key": "ZjY4MTM4YjI5YzMwZjhjYjI2OTNkNTRjMWQ5Y2Q0Y2YwOWNmZTE2NzRmYzU3NTMwM2NjOTE3MTllOTM3MWRkMzcyYTljMjVmNmQ0Y2MxOTUzODc0MDhhMTlkMDIxMzI2YzQzZDM2ZDE3MmQ3NjVkODk3OTVmYzljYTQyZDNmMTQ=",
"node-version": "22.12.0",
Expand All @@ -40,16 +32,14 @@ exports[`generator - github-build-matrix > with samples > should match matrix va
"sample-file": "postgresql-mvc-jwt",
"sample-type": "jdl-ejs",
"samples-group": "samples",
"templateOptions": {
"auditFramework": "javers",
"buildTool": "maven",
},
},
{
"audit-framework": "custom",
"build-tool": "gradle",
"default-environment": "prod",
"java-version": "17",
"jdlOptions": {
"auditFramework": "custom",
"buildTool": "gradle",
},
"job-name": "custom, gradle, postgresql-mvc-jwt",
"jwt-secret-key": "ZjY4MTM4YjI5YzMwZjhjYjI2OTNkNTRjMWQ5Y2Q0Y2YwOWNmZTE2NzRmYzU3NTMwM2NjOTE3MTllOTM3MWRkMzcyYTljMjVmNmQ0Y2MxOTUzODc0MDhhMTlkMDIxMzI2YzQzZDM2ZDE3MmQ3NjVkODk3OTVmYzljYTQyZDNmMTQ=",
"node-version": "22.12.0",
Expand All @@ -59,16 +49,14 @@ exports[`generator - github-build-matrix > with samples > should match matrix va
"sample-file": "postgresql-mvc-jwt",
"sample-type": "jdl-ejs",
"samples-group": "samples",
"templateOptions": {
"auditFramework": "custom",
"buildTool": "gradle",
},
},
{
"audit-framework": "javers",
"build-tool": "gradle",
"default-environment": "prod",
"java-version": "17",
"jdlOptions": {
"auditFramework": "javers",
"buildTool": "gradle",
},
"job-name": "javers, gradle, postgresql-mvc-jwt",
"jwt-secret-key": "ZjY4MTM4YjI5YzMwZjhjYjI2OTNkNTRjMWQ5Y2Q0Y2YwOWNmZTE2NzRmYzU3NTMwM2NjOTE3MTllOTM3MWRkMzcyYTljMjVmNmQ0Y2MxOTUzODc0MDhhMTlkMDIxMzI2YzQzZDM2ZDE3MmQ3NjVkODk3OTVmYzljYTQyZDNmMTQ=",
"node-version": "22.12.0",
Expand All @@ -78,6 +66,10 @@ exports[`generator - github-build-matrix > with samples > should match matrix va
"sample-file": "postgresql-mvc-jwt",
"sample-type": "jdl-ejs",
"samples-group": "samples",
"templateOptions": {
"auditFramework": "javers",
"buildTool": "gradle",
},
},
],
}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/samples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
!contains(github.event.pull_request.labels.*.name, 'pr: disable-compare')
with:
generator-path: generator-jhipster-entity-audit
cmd: cli.cjs generate-sample ${{ matrix.sample-file }} --build ${{ matrix.build-tool }} --audit-framework ${{ matrix.audit-framework }} --audit-page --no-insight --skip-git --skip-commit-hook --skip-jhipster-dependencies --no-cypress-audit --audit-update-type all --skip-install
cmd: cli.cjs generate-sample ${{ matrix.sample }} --skip-jhipster-dependencies --skip-install ${{ matrix.extra-args }}
- run: npm run ci:backend:test
if: steps.compare.outputs.equals != 'true'
id: backend
Expand Down

0 comments on commit b3e766b

Please sign in to comment.