Skip to content

Commit

Permalink
Merge branch 'master' of github.com:dotCMS/core into issue-27286-depl…
Browse files Browse the repository at this point in the history
…oy-cli-on-new-merged-code
  • Loading branch information
Daniel Colina committed Mar 4, 2024
2 parents 60d3ea4 + ead11bc commit a57e16a
Show file tree
Hide file tree
Showing 40 changed files with 907 additions and 542 deletions.
26 changes: 20 additions & 6 deletions .github/workflows/cli-release-process.yml
Original file line number Diff line number Diff line change
Expand Up @@ -352,20 +352,32 @@ jobs:
# Check if the npm package exists
if ! npm view $PACKAGE_FULL_NAME &> /dev/null; then
echo "The package $PACKAGE_FULL_NAME does not exist on npm."
echo "::error::The package $PACKAGE_FULL_NAME does not exist on npm."
exit 1
fi
# Check if the package is a snapshot
REGEX="([0-9]+\.[0-9]+\.[0-9]+)-SNAPSHOT"
if [[ $MVN_PACKAGE_VERSION =~ $REGEX ]]; then
echo "Snapshot version found."
echo "::debug::Snapshot version found."
NPM_PACKAGE_VERSION_TAG="rc"
MVN_BASE_VERSION="${BASH_REMATCH[1]}"
MVN_PACKAGE_VERSION_WITHOUT_DOTS=$(echo "$MVN_BASE_VERSION" | sed "s/\.//g")
VERSION_NPM_FORMAT=$(date -d "$MVN_PACKAGE_VERSION_WITHOUT_DOTS" "+%y.%-m.%d")
# Use regular expression to extract version components
if [[ $MVN_BASE_VERSION =~ ([0-9]+)\.([0-9]+)\.([0-9]+) ]]; then
MAJOR=$(echo "${BASH_REMATCH[1]}" | sed "s/\b0\+\([1-9]\)/\1/g")
MINOR=$(echo "${BASH_REMATCH[2]}" | sed "s/\b0\+\([1-9]\)/\1/g")
PATCH=$(echo "${BASH_REMATCH[3]}" | sed "s/\b0\+\([1-9]\)/\1/g")
VERSION_NPM_FORMAT="${MAJOR}.${MINOR}.${PATCH}"
echo "::debug::VERSION_NPM_FORMAT: ${VERSION_NPM_FORMAT}"
else
echo "::error::Invalid Maven version format: $MVN_BASE_VERSION"
exit 1
fi
LAST_RC_VERSION=$(npm view $PACKAGE_FULL_NAME versions --json | jq -r 'map(select(test("-rc\\d+$"))) | max')
if [[ $LAST_RC_VERSION == "$VERSION_NPM_FORMAT"* ]]; then
Expand All @@ -377,11 +389,13 @@ jobs:
NPM_PACKAGE_VERSION=${MVN_BASE_VERSION}${RC_SUFFIX}
else
echo "Release version found."
echo "::debug::Release version found."
NPM_PACKAGE_VERSION_TAG="latest"
NPM_PACKAGE_VERSION=${MVN_PACKAGE_VERSION}
fi;
echo "::debug::NPM_PACKAGE_VERSION: $NPM_PACKAGE_VERSION"
echo "::debug::NPM_PACKAGE_VERSION_TAG: $NPM_PACKAGE_VERSION_TAG"
echo "NPM_PACKAGE_VERSION=$NPM_PACKAGE_VERSION" >> $GITHUB_ENV
echo "NPM_PACKAGE_VERSION_TAG=$NPM_PACKAGE_VERSION_TAG" >> $GITHUB_ENV
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/maven-release-process.yml
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ jobs:
-DskipITs=true \
deploy \
--file dotCMS/pom.xml
if: github.event.inputs.deploy_artifact == 'true'

- name: Generate/Push Javadoc
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/vulnerability-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ jobs:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
LICENSE_KEY: ${{ secrets.DOTCMS_LICENSE }}
CUSTOM_STARTER_URL: "https://repo.dotcms.com/artifactory/libs-release-local/com/dotcms/starter/20210920/starter-20210920.zip"
CUSTOM_STARTER_URL: "https://repo.dotcms.com/artifactory/libs-release-local/com/dotcms/starter/20240213/starter-20240213.zip"
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ <h5 class="announcements__title">{{ 'announcements' | dm }}</h5>
<a
class="announcements__url"
[href]="item.url"
(click)="toggleDialog($event)"
target="_blank"
rel="noopener noreferrer"
data-testId="announcement_link"
Expand All @@ -39,6 +40,7 @@ <h5 class="announcements__title">{{ 'announcements' | dm }}</h5>
<a
class="announcements__link"
[href]="linkToDotCms()"
(click)="toggleDialog($event)"
target="_blank"
data-testId="announcement_link_all"
rel="noopener"
Expand All @@ -54,6 +56,7 @@ <h5 class="announcements__title">{{ item.title | dm }}</h5>
<a
class="announcements__about-link"
[href]="item.url"
(click)="toggleDialog($event)"
data-testId="announcements__about-link"
target="_blank"
rel="noopener"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
@use "variables" as *;

.announcements__main-container {
max-height: 100vh;
overflow: auto;
display: block;
width: 24rem;
}

Expand Down Expand Up @@ -104,6 +101,7 @@
.announcements__url {
text-decoration: none;
color: $black;
width: 100%;
}

.announcements__badge {
Expand All @@ -118,3 +116,12 @@
left: 39px;
top: 14px;
}

::ng-deep {
.toolbar-announcements__container {
&.p-overlaypanel {
max-height: 80vh;
overflow: auto;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,26 @@ describe('DotToolbarAnnouncementsComponent', () => {
const announcementLink = spectator.query(byTestId('announcements__about-link'));
expect(announcementLink.getAttribute('target')).toBe('_blank');
});

it('should call markAnnouncementsAsRead on ng on init', () => {
const refreshUtmParametersSpy = spyOn(
spectator.component.announcementsStore,
'refreshUtmParameters'
);
spectator.component.ngOnInit();
expect(refreshUtmParametersSpy).toHaveBeenCalled();

// Checking that is not called again in the ngOnChanges
refreshUtmParametersSpy.calls.reset();
spectator.component.ngOnChanges({ showUnreadAnnouncement: { currentValue: false } });
expect(refreshUtmParametersSpy).not.toHaveBeenCalled();
});

it('should close the overlaypanel when clicking on the links', () => {
const announcementPanel = spectator.query(byTestId('announcement_link'));
const links = spectator.queryAll(byTestId('announcement_link'));
links.forEach((link) => link.dispatchEvent(new MouseEvent('click')));
spectator.detectChanges();
expect(announcementPanel).toBeFalsy();
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ export class DotToolbarAnnouncementsComponent implements OnInit, OnChanges {

ngOnInit(): void {
this.announcementsStore.load();
this.announcementsStore.refreshUtmParameters();
this.aboutLinks = this.getAboutLinks();
}

ngOnChanges(changes): void {
if (!changes.showUnreadAnnouncement.currentValue) {
this.announcementsStore.refreshUtmParameters();
this.announcementsStore.markAnnouncementsAsRead();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ services:
DOT_ES_ENDPOINTS: 'https://opensearch:9200'
DOT_INITIAL_ADMIN_PASSWORD: 'admin'
DOT_DOTCMS_CLUSTER_ID: 'dotcms-production'
#CUSTOM_STARTER_URL: 'https://repo.dotcms.com/artifactory/libs-release-local/com/dotcms/starter/20211201/starter-20211201.zip'
#CUSTOM_STARTER_URL: 'https://repo.dotcms.com/artifactory/libs-release-local/com/dotcms/starter/20240213/starter-20240213.zip'
depends_on:
- opensearch
- db
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ services:
DOT_ES_ENDPOINTS: 'https://opensearch:9200'
DOT_INITIAL_ADMIN_PASSWORD: 'admin'
DOT_DOTCMS_CLUSTER_ID: 'dotcms-production'
#CUSTOM_STARTER_URL: 'https://repo.dotcms.com/artifactory/libs-release-local/com/dotcms/starter/20211201/starter-20211201.zip'
#CUSTOM_STARTER_URL: 'https://repo.dotcms.com/artifactory/libs-release-local/com/dotcms/starter/20240213/starter-20240213.zip'
volumes:
#- {local_data_path}:/data/shared
- {license_local_path}/license.zip:/data/shared/assets/license.zip
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ services:
DOT_ES_ENDPOINTS: 'https://opensearch-receiver:9200'
DOT_INITIAL_ADMIN_PASSWORD: 'admin'
DOT_DOTCMS_CLUSTER_ID: 'dotcms-receiver'
#CUSTOM_STARTER_URL: 'https://repo.dotcms.com/artifactory/libs-release-local/com/dotcms/starter/20211201/starter-20211201.zip'
#CUSTOM_STARTER_URL: 'https://repo.dotcms.com/artifactory/libs-release-local/com/dotcms/starter/20240213/starter-20240213.zip'
depends_on:
- opensearch-receiver
- db-receiver
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ services:
DOT_ES_ENDPOINTS: 'https://opensearch-sender:9200'
DOT_INITIAL_ADMIN_PASSWORD: 'admin'
DOT_DOTCMS_CLUSTER_ID: 'dotcms-sender'
#CUSTOM_STARTER_URL: 'https://repo.dotcms.com/artifactory/libs-release-local/com/dotcms/starter/20211201/starter-20211201.zip'
#CUSTOM_STARTER_URL: 'https://repo.dotcms.com/artifactory/libs-release-local/com/dotcms/starter/20240213/starter-20240213.zip'
depends_on:
- opensearch-sender
- db-sender
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ services:
DOT_ES_ENDPOINTS: 'https://opensearch-sender:9200'
DOT_INITIAL_ADMIN_PASSWORD: 'admin'
DOT_DOTCMS_CLUSTER_ID: 'dotcms-sender'
#CUSTOM_STARTER_URL: 'https://repo.dotcms.com/artifactory/libs-release-local/com/dotcms/starter/20211201/starter-20211201.zip'
#CUSTOM_STARTER_URL: 'https://repo.dotcms.com/artifactory/libs-release-local/com/dotcms/starter/20240213/starter-20240213.zip'
depends_on:
- opensearch-sender
- db-sender
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ services:
DOT_ES_ENDPOINTS: 'https://opensearch:9200'
DOT_INITIAL_ADMIN_PASSWORD: 'admin'
DOT_DOTCMS_CLUSTER_ID: 'dotcms-production'
#CUSTOM_STARTER_URL: 'https://repo.dotcms.com/artifactory/libs-release-local/com/dotcms/starter/20211201/starter-20211201.zip'
#CUSTOM_STARTER_URL: 'https://repo.dotcms.com/artifactory/libs-release-local/com/dotcms/starter/20240213/starter-20240213.zip'
depends_on:
- opensearch
- db
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ services:
DOT_ES_ENDPOINTS: 'https://opensearch:9200'
DOT_INITIAL_ADMIN_PASSWORD: 'admin'
DOT_DOTCMS_CLUSTER_ID: 'dotcms-production'
CUSTOM_STARTER_URL: https://repo.dotcms.com/artifactory/libs-release-local/com/dotcms/starter/20220713/starter-20220713.zip
CUSTOM_STARTER_URL: https://repo.dotcms.com/artifactory/libs-release-local/com/dotcms/starter/20240213/starter-20240213.zip
depends_on:
- opensearch
- db
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ services:
DOT_ES_ENDPOINTS: 'https://opensearch:9200'
DOT_INITIAL_ADMIN_PASSWORD: 'admin'
DOT_DOTCMS_CLUSTER_ID: 'dotcms-production'
#CUSTOM_STARTER_URL: 'https://repo.dotcms.com/artifactory/libs-release-local/com/dotcms/starter/20211201/starter-20211201.zip'
#CUSTOM_STARTER_URL: 'https://repo.dotcms.com/artifactory/libs-release-local/com/dotcms/starter/20240213/starter-20240213.zip'
depends_on:
- opensearch
- db
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ services:
DOT_ES_ENDPOINTS: 'https://opensearch:9200'
DOT_INITIAL_ADMIN_PASSWORD: 'admin'
DOT_DOTCMS_CLUSTER_ID: 'dotcms-production'
#CUSTOM_STARTER_URL: 'https://repo.dotcms.com/artifactory/libs-release-local/com/dotcms/starter/20211201/starter-20211201.zip'
#CUSTOM_STARTER_URL: 'https://repo.dotcms.com/artifactory/libs-release-local/com/dotcms/starter/20240213/starter-20240213.zip'
depends_on:
- opensearch
- db
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ services:
DOT_ES_AUTH_BASIC_PASSWORD: 'admin'
DOT_ES_ENDPOINTS: 'https://opensearch:9200'
DOT_INITIAL_ADMIN_PASSWORD: 'admin'
#CUSTOM_STARTER_URL: 'https://repo.dotcms.com/artifactory/libs-release-local/com/dotcms/starter/20230712/starter-20230712.zip'
#CUSTOM_STARTER_URL: 'https://repo.dotcms.com/artifactory/libs-release-local/com/dotcms/starter/20240213/starter-20240213.zip'
depends_on:
- opensearch
- db
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ services:
DOT_DOT_PUBSUB_PROVIDER_OVERRIDE: 'com.dotcms.dotpubsub.RedisPubSubImpl'
DOT_REDIS_LETTUCECLIENT_URLS: 'redis://MY_SECRET_P4SS@redis'
DOT_CACHE_DEFAULT_CHAIN: 'com.dotmarketing.business.cache.provider.caffine.CaffineCache,com.dotcms.cache.lettuce.RedisCache'
#CUSTOM_STARTER_URL: 'https://repo.dotcms.com/artifactory/libs-release-local/com/dotcms/starter/20211201/starter-20211201.zip'
#CUSTOM_STARTER_URL: 'https://repo.dotcms.com/artifactory/libs-release-local/com/dotcms/starter/20240213/starter-20240213.zip'
depends_on:
- opensearch
- db
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ services:
DOT_DOT_PUBSUB_PROVIDER_OVERRIDE: 'com.dotcms.dotpubsub.RedisPubSubImpl'
DOT_REDIS_LETTUCECLIENT_URLS: 'redis://MY_SECRET_P4SS@redis'
DOT_CACHE_DEFAULT_CHAIN: 'com.dotmarketing.business.cache.provider.caffine.CaffineCache,com.dotcms.cache.lettuce.RedisCache'
#CUSTOM_STARTER_URL: 'https://repo.dotcms.com/artifactory/libs-release-local/com/dotcms/starter/20211201/starter-20211201.zip'
#CUSTOM_STARTER_URL: 'https://repo.dotcms.com/artifactory/libs-release-local/com/dotcms/starter/20240213/starter-20240213.zip'
volumes:
#- {local_data_path}:/data/shared
- {license_local_path}/license.zip:/data/shared/assets/license.zip
Expand Down

0 comments on commit a57e16a

Please sign in to comment.