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

[Backport 2024.01.xx] Dependency updates for mapstore-services and POMs refactoring (#10015) #10105

Merged
merged 6 commits into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 3 additions & 2 deletions .github/ISSUE_TEMPLATE/release_steps.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ This steps have to be followed always when preparing a new release.
With the following Parameters:
- [ ] Use workflow from branch `master`
- [ ] MapStore branch name to use: `YYYY.XX.xx`
- [ ] Version of *MapFish Print*, *GeoStore* and *HTTP-Proxy* accordingly to the [MapStore release calendar](https://github.com/geosolutions-it/MapStore2/wiki/MapStore-Release-Calendars)
- [ ] use the default value for the other parameters
- [ ] Wait for the process to complete. At the end:
- A Pull request will be created to the master
Expand All @@ -39,7 +38,9 @@ This steps have to be followed always when preparing a new release.

## Before the Release

- [ ] Check `pom.xml` dependencies are all in fixed stable versions ( no `-SNAPSHOT` usage release).
- [ ] Check `pom.xml` dependencies are all in fixed stable versions ( no `-SNAPSHOT` usage release). If not, You use the action [`Update dependencies versions`](https://github.com/geosolutions-it/MapStoreExtension/actions/workflows/update_dependencies_versions.yml) to fix them, setting:
- [ ] the branch to `YYYY.XX.xx`
- [ ] the of geostore, http_proxy and mapfish-print versions accordingly with the [MapStore release calendar](https://github.com/geosolutions-it/MapStore2/wiki/MapStore-Release-Calendars)
- [ ] Check that [MapStoreExtension](https://github.com/geosolutions-it/MapStoreExtension) repository is aligned and working
- [ ] Test on QA [https://qa-mapstore.geosolutionsgroup.com/mapstore/](https://qa-mapstore.geosolutionsgroup.com/mapstore/)
- [ ] Test **everything**, not only the new features
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,13 @@ jobs:
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Publish maven packages
run: mvn clean install deploy -f java/pom.xml
# Here it deploys only java modules and root, needed for MS project builds.
# Product, binary modules are to big to be hosted on the repository in snapshots, so they are skipped
run: |
# deploys java packages
mvn clean install deploy -f java/pom.xml
# deploys also the root module, needed for dependencies
mvn deploy --non-recursive
env:
MAVEN_USERNAME: ${{ secrets.GS_MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.GS_MAVEN_PASSWORD }}
Expand Down
39 changes: 2 additions & 37 deletions .github/workflows/cut_major_branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,6 @@ on:
release-branch:
description: MapStore branch name to use (YYYY.MM.xx). E.g. 2024.01.xx
required: true
mapfish-version:
description: Mapfish print version to use (e.g. 2.3-SNAPSHOT)
required: true
default: '2.3-SNAPSHOT'
geostore-version:
description: GeoStore version to use (e.g. 2.0.0).
required: true
default: '2.0.0'
http-proxy-version:
description: Http proxy version to use (e.g. 2.4).
required: true
default: '1.4.0'
main-branch:
description: main branch
default: master
Expand All @@ -36,15 +24,8 @@ jobs:
- name: Create release branch and generate PR body
id: create-branch
env:
MAPFISH_GROUP: org.mapfish.print
MAPFISH_VERSION: ${{ github.event.inputs.mapfish-version }}
GEOSTORE_GROUP: it.geosolutions.geostore
GEOSTORE_VERSION: ${{ github.event.inputs.geostore-version }}
HTTP_PROXY_GROUP: proxy
HTTP_PROXY_VERSION: ${{ github.event.inputs.http-proxy-version }}
RELEASE_BRANCH: ${{ github.event.inputs.release-branch }}

GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_BRANCH: ${{ github.event.inputs.release-branch }}
MAIN_BRANCH: ${{ github.event.inputs.main-branch }}
PR_OPTIONS: ${{ github.event.inputs.pr-options }}
RUN_ID: ${{ github.run_id }}
Expand All @@ -58,22 +39,6 @@ jobs:
BRANCH_NAME="${RELEASE_BRANCH}"
echo "creating branch is $BRANCH_NAME"
git checkout -b "$BRANCH_NAME"
# Find all pom.xml files and update-dependencies on them
echo "Updating versions on release branch"
# Find all pom.xml files and update-dependencies on them
echo "Updating versions on release branch"
POM_FILES=$(git ls-files . | grep 'pom\.xml$' | grep -v 'project/standard/templates/backend/pom\.xml$'| grep -v 'project/standard/templates/pom\.xml$');# note: exclues one file not involved that is not valid pom.xml, because it is a template
for POM_FILE in $POM_FILES; do
mvn versions:use-dep-version -f $POM_FILE -Dincludes=$MAPFISH_GROUP -DdepVersion=$MAPFISH_VERSION -DforceVersion=true -DgenerateBackupPoms=false -DautoVersionSubmodules=true -Pprinting
mvn versions:use-dep-version -f $POM_FILE -Dincludes=$GEOSTORE_GROUP -DdepVersion=$GEOSTORE_VERSION -DforceVersion=true -DgenerateBackupPoms=false -DautoVersionSubmodules=true -Pprinting
mvn versions:use-dep-version -f $POM_FILE -Dincludes=$HTTP_PROXY_GROUP -DdepVersion=$HTTP_PROXY_VERSION -DforceVersion=true -DgenerateBackupPoms=false -DautoVersionSubmodules=true -Pprinting
done
echo $POM_FILES | xargs git add
if ! git diff-index --quiet HEAD; then
git commit -m "Set versions of main dependencies to a stable version"
else
echo "::notice::No version changes in dependencies to commit. Please make sure to make this version fixed later"
fi
git push --set-upstream origin "$BRANCH_NAME"
echo "branch created"
echo "creating bump changes"
Expand All @@ -85,7 +50,7 @@ jobs:
echo "Java packages versions updated from $OLD_JAVA_VERSION to $NEXT_JAVA_VERSION"
### increase dependency of project to new version
echo "Updating project dependency to new version"
mvn versions:use-dep-version -f project/standard/templates/web/pom.xml -Dincludes=it.geosolutions.mapstore -DdepVersion=$NEXT_JAVA_VERSION -DforceVersion=true -DgenerateBackupPoms=false
mvn versions:set-property -f project/standard/templates/web/pom.xml -Dproperty=mapstore-services.version -DnewVersion=$NEXT_JAVA_VERSION -DgenerateBackupPoms=false -DautoVersionSubmodules=true -Pprinting
# Increase release minor version
echo "Updating project version to new version in package.json"
npm version minor --git-tag-version=false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/post_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
echo
echo "Restoring snapshot version tp $SNAPSHOT_VERSION"
mvn versions:set -DnewVersion=$SNAPSHOT_VERSION -DprocessAllModules -DgenerateBackupPoms=false -Pprinting,binary,printingbundle
mvn versions:use-dep-version -f project/standard/templates/web/pom.xml -Dincludes=it.geosolutions.mapstore -DdepVersion=$SNAPSHOT_VERSION -DforceVersion=true -DgenerateBackupPoms=false
mvn versions:set-property -f project/standard/templates/web/pom.xml -Dproperty=mapstore-services.version -DnewVersion=$SNAPSHOT_VERSION -DgenerateBackupPoms=false -DautoVersionSubmodules=true -Pprinting
npm version patch --git-tag-version=false
echo "Committing changes"
find . -name 'pom.xml' | xargs git add
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pre_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:

# Update project dependency
echo "updating project pom.xml dependency from mapstore packages to version: $JAVA_MODULES_NEW_VERSION"
mvn versions:use-dep-version -f project/standard/templates/web/pom.xml -Dincludes=it.geosolutions.mapstore -DdepVersion=$JAVA_MODULES_NEW_VERSION -DforceVersion=true -DgenerateBackupPoms=false
mvn versions:set-property -f project/standard/templates/web/pom.xml -Dproperty=mapstore-services.version -DnewVersion=$JAVA_MODULES_NEW_VERSION -DgenerateBackupPoms=false -DautoVersionSubmodules=true -Pprinting
# Update changelog
echo "Updating changelog"
update_changelog $LAST_MS_VERSION $NEW_MS_VERSION
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,19 @@ jobs:
git config user.email github-actions@github.com
# Find all pom.xml files and update-dependencies on them
echo "Updating versions of dependencies in all pom.xml files to versions mapfish: $MAPFISH_VERSION, geostore: $GEOSTORE_VERSION, http-proxy: $HTTP_PROXY_VERSION"
POM_FILES=$(git ls-files . | grep 'pom\.xml$' | grep -v 'project/standard/templates/backend/pom\.xml$'| grep -v 'project/standard/templates/pom\.xml$');# note: exclues one file not involved that is not valid pom.xml, because it is a template

## Update the versions of the dependencies in the project
# updating in main `pom.xml` (the mvn properties `geostore-webapp.version` and `http_proxy.version`, `print-lib.version` contain the versions of the dependencies to update)
mvn versions:set-property -Dproperty=print-lib.version -DnewVersion=$MAPFISH_VERSION -DgenerateBackupPoms=false -DautoVersionSubmodules=true -Pprinting
mvn versions:set-property -Dproperty=geostore-webapp.version -DnewVersion=$GEOSTORE_VERSION -DgenerateBackupPoms=false -DautoVersionSubmodules=true -Pprinting
mvn versions:set-property -Dproperty=http_proxy.version -DnewVersion=$HTTP_PROXY_VERSION -DgenerateBackupPoms=false -DautoVersionSubmodules=true -Pprinting
git add pom.xml
## Update the versions of the dependencies in the project templates
POM_FILES=$(git ls-files project/standard/templates/ | grep 'pom\.xml$')
for POM_FILE in $POM_FILES; do
mvn versions:use-dep-version -f $POM_FILE -Dincludes=$MAPFISH_GROUP -DdepVersion=$MAPFISH_VERSION -DforceVersion=true -DgenerateBackupPoms=false -DautoVersionSubmodules=true -Pprinting
mvn versions:use-dep-version -f $POM_FILE -Dincludes=$GEOSTORE_GROUP -DdepVersion=$GEOSTORE_VERSION -DforceVersion=true -DgenerateBackupPoms=false -DautoVersionSubmodules=true -Pprinting
mvn versions:use-dep-version -f $POM_FILE -Dincludes=$HTTP_PROXY_GROUP -DdepVersion=$HTTP_PROXY_VERSION -DforceVersion=true -DgenerateBackupPoms=false -DautoVersionSubmodules=true -Pprinting
mvn versions:set-property -f $POM_FILE -Dproperty=print-lib.version -DnewVersion=$MAPFISH_VERSION -DgenerateBackupPoms=false -DautoVersionSubmodules=true -Pprinting
mvn versions:set-property -f $POM_FILE -Dproperty=geostore-webapp.version -DnewVersion=$GEOSTORE_VERSION -DgenerateBackupPoms=false -DautoVersionSubmodules=true -Pprinting
mvn versions:set-property -f $POM_FILE -Dproperty=http_proxy.version -DnewVersion=$HTTP_PROXY_VERSION -DgenerateBackupPoms=false -DautoVersionSubmodules=true -Pprinting
done
pr_branch_name="up_versions-${RUN_ID}"
echo "Creating a PR on branch: ${pr_branch_name} for ${{ github.ref_name }}"
Expand Down
2 changes: 1 addition & 1 deletion binary/bin-war/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<dependency>
<groupId>it.geosolutions.mapstore</groupId>
<artifactId>mapstore-product</artifactId>
<version>1.7-SNAPSHOT</version>
<version>${project.version}</version>
<type>war</type>
<scope>runtime</scope>
</dependency>
Expand Down
Loading
Loading