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

Merge 22.07 into master 18.07.22 #22583

Merged
merged 27 commits into from
Jul 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
364cce9
Update release version for dotcms-ui and dotcms-webcomponents
victoralfaro-dotcms Jul 7, 2022
5dee96e
Modify dotcmsReleaseVersion to 22.07, coreWebReleaseVersion, webCompo…
victoralfaro-dotcms Jul 7, 2022
4b41fb5
Update branch in git submodule to release-22.07
victoralfaro-dotcms Jul 7, 2022
7e6b08e
CI: bumps version to 22.7.0-rc.11 [skip ci]
victoralfaro-dotcms Jul 7, 2022
2a22d4f
dotCMS/core#22496 fix tail log Whitespaces are printed sometimes at t…
alfredo-dotcms Jul 8, 2022
619b834
#22508 Add User into the Manifest (#22511)
freddyDOTCMS Jul 8, 2022
33f29d8
#22463 Support old scale redirecting to resize (#22515)
dsilvam Jul 8, 2022
5ce7ac6
dotCMS/core#22489 Remove "Beta" from the block editor field name
hmoreras Jul 11, 2022
9ee9bf6
Fix red
dsilvam Jul 11, 2022
f63960e
Merge branch 'release-22.07' of github.com:dotCMS/core into release-2…
dsilvam Jul 11, 2022
47370f4
dotCMS/core#22552 fix Log Filter: The console gets blank after switch…
alfredo-dotcms Jul 11, 2022
9fbbac5
Postman tests fixes (#22555)
victoralfaro-dotcms Jul 12, 2022
306f5a3
Directly removing GITHUB context displaying
victoralfaro-dotcms Jul 12, 2022
54414ee
Enabling workflow steps
victoralfaro-dotcms Jul 12, 2022
00af582
dotCMS/core#22501 Drag-N-Drop Navigation reorder not affecting change…
jcastro-dotcms Jul 12, 2022
d5c4120
Renabling chain of jobs-steps at main workflow
victoralfaro-dotcms Jul 12, 2022
43e606c
Fixing typo
victoralfaro-dotcms Jul 12, 2022
c7a9d3d
#22554 22149 Handle no-license and no-endpoints scenarios and other f…
dsilvam Jul 12, 2022
7571706
dotCMS/core#22501 Missing change from previous PR. (#22564)
jcastro-dotcms Jul 12, 2022
8e3fd39
Postman improvements (#22565)
victoralfaro-dotcms Jul 13, 2022
8a1f2aa
dotCMS/core#22338 Fixed dupe widgets
rjvelazco Jul 14, 2022
2e4074e
CI: bumps version to 22.7.0-rc.24 [skip ci]
victoralfaro-dotcms Jul 14, 2022
fd7f6ff
Fix annotations (#22572)
dsilvam Jul 14, 2022
5133774
#21129 : Not requiring a value for the folder title when `Show On Men…
jcastro-dotcms Jul 14, 2022
355349f
Update gradle.properties
dsilvam Jul 18, 2022
7ddcdcc
Update release-process.yml
dsilvam Jul 18, 2022
be87765
Merge branch 'master' into merge-22.07-into-master-18.07.22
dsilvam Jul 18, 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
12 changes: 1 addition & 11 deletions .github/actions/build-core/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,7 @@ const COMMANDS = {
gradle: [
{
cmd: gradleCmd,
args: ['createDistPrep'],
workingDir: dotCmsRoot
},
{
cmd: gradleCmd,
args: ['compileIntegrationTestJava'],
workingDir: dotCmsRoot
},
{
cmd: gradleCmd,
args: ['prepareIntegrationTests'],
args: ['createDistPrep', 'compileIntegrationTestJava', 'prepareIntegrationTests'],
workingDir: dotCmsRoot
}
],
Expand Down
12 changes: 1 addition & 11 deletions .github/actions/build-core/src/core-builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,7 @@ const COMMANDS: Commands = {
gradle: [
{
cmd: gradleCmd,
args: ['createDistPrep'],
workingDir: dotCmsRoot
},
{
cmd: gradleCmd,
args: ['compileIntegrationTestJava'],
workingDir: dotCmsRoot
},
{
cmd: gradleCmd,
args: ['prepareIntegrationTests'],
args: ['createDistPrep', 'compileIntegrationTestJava', 'prepareIntegrationTests'],
workingDir: dotCmsRoot
}
],
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/cache-core/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ inputs:
default: |
{
"gradle": {
"dependencies": "${{ runner.os }}-gradle-dependencies-${{ hashFiles('**/build.gradle', '**/dependencies.gradle', '**/deploy.gradle', '**/immutables.gradle', '**/settings.gradle', '**/gradle.properties', '**/gradle-wrapper.properties') }}",
"dependencies": "${{ runner.os }}-gradle-dependencies-${{ hashFiles('**/build.gradle', '**/dependencies.gradle', '**/deploy.gradle', '**/immutables.gradle', '**/settings.gradle', '**/gradle.properties', '**/gradle-wrapper.properties', '**/core-cicd-tests.yml') }}",
"buildOutput": "${{ runner.os }}-gradle-build-output-${{ github.SHA }}"
},
"maven": {
"dependencies": "${{ runner.os }}-maven-dependencies-${{ hashFiles('**/pom.xml') }}",
"dependencies": "${{ runner.os }}-maven-dependencies-${{ hashFiles('**/pom.xml', '**/core-cicd-tests.yml') }}",
"buildOutput": "${{ runner.os }}-maven-build-output-${{ github.SHA }}"
}
}
Expand Down
18 changes: 16 additions & 2 deletions .github/actions/cache-core/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.cacheCore = void 0;
const cache = __importStar(__nccwpck_require__(7799));
const core = __importStar(__nccwpck_require__(2186));
const exec = __importStar(__nccwpck_require__(1514));
const cache_1 = __nccwpck_require__(7799);
const EMPTY_CACHE_RESULT = {
cacheKey: '',
Expand All @@ -68,7 +69,7 @@ const cacheCore = () => __awaiter(void 0, void 0, void 0, function* () {
locations: []
};
const locationTypes = Object.keys(cacheLocations);
core.info(`Caching these locations: ${locationTypes}`);
core.info(`Caching these locations: ${locationTypes.join(', ')}`);
for (const locationType of locationTypes) {
const cacheLocationMetadata = yield cacheLocation(cacheLocations, cacheKeys, locationType);
if (cacheLocationMetadata !== EMPTY_CACHE_RESULT) {
Expand All @@ -89,10 +90,14 @@ exports.cacheCore = cacheCore;
const cacheLocation = (cacheLocations, resolvedKeys, locationType) => __awaiter(void 0, void 0, void 0, function* () {
const cacheKey = resolvedKeys[locationType];
const resolvedLocations = cacheLocations[locationType];
core.info(`Caching locations:\n [${resolvedLocations}]\n with key: ${cacheKey}`);
core.info(`Caching locations:\n [${resolvedLocations.join(', ')}]\n with key: ${cacheKey}`);
let cacheResult = EMPTY_CACHE_RESULT;
try {
const cacheId = yield cache.saveCache(resolvedLocations, cacheKey);
core.info('Location contents');
for (const location of resolvedLocations) {
ls(location);
}
core.info(`Cache id found: ${cacheId}`);
cacheResult = {
cacheKey,
Expand All @@ -117,6 +122,15 @@ const cacheLocation = (cacheLocations, resolvedKeys, locationType) => __awaiter(
}
return Promise.resolve(cacheResult);
});
const ls = (location) => __awaiter(void 0, void 0, void 0, function* () {
core.info(`Listing folder ${location}`);
try {
yield exec.exec('ls', ['-las', location]);
}
catch (err) {
core.info(`Cannot list folder ${location}`);
}
});


/***/ }),
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/cache-core/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .github/actions/cache-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"dependencies": {
"@actions/cache": "^1.0.9",
"@actions/core": "^1.6.0",
"@actions/exec": "^1.1.0"
"@actions/exec": "^1.1.1"
},
"devDependencies": {
"@tsconfig/node16": "^1.0.2",
Expand Down
18 changes: 16 additions & 2 deletions .github/actions/cache-core/src/cache.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as cache from '@actions/cache'
import * as core from '@actions/core'
import * as exec from '@actions/exec'
import {ReserveCacheError} from '@actions/cache'

export interface CacheLocations {
Expand Down Expand Up @@ -60,7 +61,7 @@ export const cacheCore = async (): Promise<CacheMetadata> => {
}

const locationTypes = Object.keys(cacheLocations)
core.info(`Caching these locations: ${locationTypes}`)
core.info(`Caching these locations: ${locationTypes.join(', ')}`)
for (const locationType of locationTypes) {
const cacheLocationMetadata: CacheLocationMetadata = await cacheLocation(cacheLocations, cacheKeys, locationType)
if (cacheLocationMetadata !== EMPTY_CACHE_RESULT) {
Expand All @@ -86,11 +87,15 @@ const cacheLocation = async (
): Promise<CacheLocationMetadata> => {
const cacheKey = resolvedKeys[locationType as keyof BuildEnvCacheKeys]
const resolvedLocations = cacheLocations[locationType as keyof CacheLocations]
core.info(`Caching locations:\n [${resolvedLocations}]\n with key: ${cacheKey}`)
core.info(`Caching locations:\n [${resolvedLocations.join(', ')}]\n with key: ${cacheKey}`)

let cacheResult = EMPTY_CACHE_RESULT
try {
const cacheId = await cache.saveCache(resolvedLocations, cacheKey)
core.info('Location contents')
for (const location of resolvedLocations) {
ls(location)
}
core.info(`Cache id found: ${cacheId}`)
cacheResult = {
cacheKey,
Expand All @@ -114,3 +119,12 @@ const cacheLocation = async (

return Promise.resolve(cacheResult)
}

const ls = async (location: string) => {
core.info(`Listing folder ${location}`)
try {
await exec.exec('ls', ['-las', location])
} catch (err) {
core.info(`Cannot list folder ${location}`)
}
}
30 changes: 21 additions & 9 deletions .github/actions/core-cache-locator/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,31 @@ exports.getCacheLocations = void 0;
const core = __importStar(__nccwpck_require__(186));
const fs = __importStar(__nccwpck_require__(147));
const path = __importStar(__nccwpck_require__(17));
const HOME_FOLDER = path.join('/home', 'runner');
const GRADLE_FOLDER = path.join(HOME_FOLDER, '.gradle');
const M2_FOLDER = path.join(HOME_FOLDER, '.m2');
const PROJECT_ROOT = core.getInput('project_root');
const DOTCMS_ROOT = path.join(PROJECT_ROOT, 'dotCMS');
const CACHE_CONFIGURATION = {
gradle: {
dependencies: ['~/.gradle/caches', '~/.gradle/wrapper'],
buildOutput: ['dotCMS/.gradle', 'dotCMS/build/classes', 'dotCMS/build/resources', 'dist/dotserver']
dependencies: [path.join(GRADLE_FOLDER, 'caches'), path.join(GRADLE_FOLDER, 'wrapper')],
buildOutput: [
path.join(DOTCMS_ROOT, '.gradle'),
path.join(DOTCMS_ROOT, 'build', 'classes'),
path.join(DOTCMS_ROOT, 'build', 'resources')
]
},
maven: {
dependencies: ['~/.m2/repository'],
buildOutput: ['dotCMS/target']
dependencies: [path.join(M2_FOLDER, 'repository')],
buildOutput: [path.join(DOTCMS_ROOT, 'target')]
}
};
const EMPTY_CACHE_LOCATIONS = {
dependencies: [],
buildOutput: []
};
const BUILD_OUTPUT = 'buildOutput';
const CACHE_FOLDER = path.join(path.dirname(core.getInput('project_root')), 'cache');
//const BUILD_OUTPUT = 'buildOutput'
//const CACHE_FOLDER = path.join(path.dirname(core.getInput('project_root')), 'cache')
/**
* Resolves locations to be cached after building core.
*
Expand All @@ -65,7 +74,9 @@ const getCacheLocations = () => {
return EMPTY_CACHE_LOCATIONS;
}
// For each cache location resolves the location to be cached
Object.keys(cacheLocations).forEach(key => resolveLocations(buildEnv, cacheLocations, key, key === BUILD_OUTPUT ? decorateBuildOutput : undefined));
for (const key of Object.keys(cacheLocations)) {
resolveLocations(buildEnv, cacheLocations, key, undefined);
}
return cacheLocations;
};
exports.getCacheLocations = getCacheLocations;
Expand All @@ -81,12 +92,13 @@ exports.getCacheLocations = getCacheLocations;
const resolveLocations = (buildEnv, cacheLocations, key, decorateFn) => {
const cacheEnableKey = key.replace(/[A-Z]/g, letter => `_${letter.toLowerCase()}`);
const cacheEnable = core.getBooleanInput(`cache_${cacheEnableKey}`);
const locationKey = key;
if (!cacheEnable) {
core.notice(`Core cache is disabled for ${key}`);
cacheLocations[locationKey] = undefined;
return;
}
core.info(`Looking cache configuration for ${key}`);
const locationKey = key;
const locations = cacheLocations[locationKey];
if (!locations) {
core.warning(`Cannot resolve any ${key} locations for build env ${buildEnv}`);
Expand All @@ -111,7 +123,7 @@ const resolveLocations = (buildEnv, cacheLocations, key, decorateFn) => {
* @param location location
* @returns decorated string
*/
const decorateBuildOutput = (location) => path.join(CACHE_FOLDER, location);
//const decorateBuildOutput = (location: string): string => path.join(CACHE_FOLDER, location)


/***/ }),
Expand Down
36 changes: 23 additions & 13 deletions .github/actions/core-cache-locator/src/cache-locator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,32 @@ import * as fs from 'fs'
import * as path from 'path'

interface CacheLocations {
dependencies: string[]
buildOutput: string[]
dependencies?: string[]
buildOutput?: string[]
}

interface CacheConfiguration {
gradle: CacheLocations
maven: CacheLocations
}

const HOME_FOLDER = path.join('/home', 'runner')
const GRADLE_FOLDER = path.join(HOME_FOLDER, '.gradle')
const M2_FOLDER = path.join(HOME_FOLDER, '.m2')
const PROJECT_ROOT = core.getInput('project_root')
const DOTCMS_ROOT = path.join(PROJECT_ROOT, 'dotCMS')
const CACHE_CONFIGURATION: CacheConfiguration = {
gradle: {
dependencies: ['~/.gradle/caches', '~/.gradle/wrapper'],
buildOutput: ['dotCMS/.gradle', 'dotCMS/build/classes', 'dotCMS/build/resources', 'dist/dotserver']
dependencies: [path.join(GRADLE_FOLDER, 'caches'), path.join(GRADLE_FOLDER, 'wrapper')],
buildOutput: [
path.join(DOTCMS_ROOT, '.gradle'),
path.join(DOTCMS_ROOT, 'build', 'classes'),
path.join(DOTCMS_ROOT, 'build', 'resources')
]
},
maven: {
dependencies: ['~/.m2/repository'],
buildOutput: ['dotCMS/target']
dependencies: [path.join(M2_FOLDER, 'repository')],
buildOutput: [path.join(DOTCMS_ROOT, 'target')]
}
}

Expand All @@ -28,8 +37,8 @@ const EMPTY_CACHE_LOCATIONS: CacheLocations = {
buildOutput: []
}

const BUILD_OUTPUT = 'buildOutput'
const CACHE_FOLDER = path.join(path.dirname(core.getInput('project_root')), 'cache')
//const BUILD_OUTPUT = 'buildOutput'
//const CACHE_FOLDER = path.join(path.dirname(core.getInput('project_root')), 'cache')

/**
* Resolves locations to be cached after building core.
Expand All @@ -48,9 +57,9 @@ export const getCacheLocations = (): CacheLocations => {
}

// For each cache location resolves the location to be cached
Object.keys(cacheLocations).forEach(key =>
resolveLocations(buildEnv, cacheLocations, key, key === BUILD_OUTPUT ? decorateBuildOutput : undefined)
)
for (const key of Object.keys(cacheLocations)) {
resolveLocations(buildEnv, cacheLocations, key, undefined)
}

return cacheLocations
}
Expand All @@ -72,13 +81,14 @@ const resolveLocations = (
) => {
const cacheEnableKey = key.replace(/[A-Z]/g, letter => `_${letter.toLowerCase()}`)
const cacheEnable = core.getBooleanInput(`cache_${cacheEnableKey}`)
const locationKey = key as keyof CacheLocations
if (!cacheEnable) {
core.notice(`Core cache is disabled for ${key}`)
cacheLocations[locationKey] = undefined
return
}

core.info(`Looking cache configuration for ${key}`)
const locationKey = key as keyof CacheLocations
const locations = cacheLocations[locationKey]
if (!locations) {
core.warning(`Cannot resolve any ${key} locations for build env ${buildEnv}`)
Expand Down Expand Up @@ -108,4 +118,4 @@ const resolveLocations = (
* @param location location
* @returns decorated string
*/
const decorateBuildOutput = (location: string): string => path.join(CACHE_FOLDER, location)
//const decorateBuildOutput = (location: string): string => path.join(CACHE_FOLDER, location)
Loading