Skip to content

Commit

Permalink
Merge 22.07 into master 18.07.22 (#22583)
Browse files Browse the repository at this point in the history
* Update release version for dotcms-ui and dotcms-webcomponents

* Modify dotcmsReleaseVersion to 22.07, coreWebReleaseVersion, webComponentsReleaseVersion to rc and dot-cicd branch version to release-22.07

* Update branch in git submodule to release-22.07

* CI: bumps version to 22.7.0-rc.11 [skip ci]

* #22496 fix tail log Whitespaces are printed sometimes at the beginning of the lines (#22538)

* #22508 Add User into the Manifest (#22511)

* #22508 Add User into the Manifest

* #22149 Change Menu label wheter user is selected or not

* #22149 Change message when any user is selected

* Revert "#22149 Change message when any user is selected"

This reverts commit 0251c87.

* Revert "#22149 Change Menu label wheter user is selected or not"

This reverts commit 6c2f5fb.

* #22508 Testing and Fixing Manifest bug

* Fixing test

* Adding javadoc

* Removing NotNull

* #22463 Support old scale redirecting to resize (#22515)

* #22463 Support old scale redirecting to resize

* #22463 update expected content-type

* Revert "#22463 update expected content-type"

This reverts commit abebd0e.

* #22463 debugging filters

* More logging

* Logging

* Testing

* Undo logging

* #22489 Remove "Beta" from the block editor field name

* Fix red

* #22552 fix Log Filter: The console gets blank after switching log files (#22557)

* Postman tests fixes (#22555)

* Adding duration to postman collection run

* Fixing and improving postman tests

* Directly removing GITHUB context displaying

* Enabling workflow steps

* #22501 Drag-N-Drop Navigation reorder not affecting changes to nav menu

In the previous release, we updated the `Folder` class to stop inheriting from `Inode`. The menu reordering code was relying on that, so it stopped working after the change. We're now passing down the Identifier to make it work as expected.

* Renabling chain of jobs-steps at main workflow

* Fixing typo

* #22554 22149 Handle no-license and no-endpoints scenarios and other fixes (#22561)

* #22501 Missing change from previous PR. (#22564)

* Postman improvements (#22565)

* Tuning tests in general

* nop

* #22338 Fixed dupe widgets

* fix: prevent widgets from being repeated

* fix: comment

* CI: bumps version to 22.7.0-rc.24 [skip ci]

* Fix annotations (#22572)

* Fix annotations

* Update HostFactoryImpl.java

* Exclude HostAPITest from mainsuite

Co-authored-by: freddyucv <freddy0309@gmail.com>

* #21129 : Not requiring a value for the folder title when `Show On Menu` property is enabled. (#22576)

* #21129 : Not requiring a value for the folder title when `Show On Menu` property is enabled.

* #21129 : Adding more language files.

* #21129 : Adding more language files.

* #21129 : Adding more language files.

* #21129 : Adding more language files.

* #21129 : Code Review changes.

* Update gradle.properties

* Update release-process.yml

Co-authored-by: victoralfaro-dotcms <victor.alfaro@dotcms.com>
Co-authored-by: alfredo-dotcms <37185433+alfredo-dotcms@users.noreply.github.com>
Co-authored-by: Freddy Rodriguez <freddy0309@gmail.com>
Co-authored-by: Humberto Morera <31667212+hmoreras@users.noreply.github.com>
Co-authored-by: Jose Castro <jose.castro@dotcms.com>
Co-authored-by: Rafael Velazco <rjvelazco21@gmail.com>
  • Loading branch information
7 people committed Jul 19, 2022
1 parent 29540c0 commit 9a35a7c
Show file tree
Hide file tree
Showing 53 changed files with 910 additions and 400 deletions.
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)

0 comments on commit 9a35a7c

Please sign in to comment.