-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into dependabot/maven/src/commons-io-commons-io…
…-2.7
- Loading branch information
Showing
447 changed files
with
25,083 additions
and
11,086 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven | ||
|
||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- '[0-9]+.[0-9]+*' | ||
pull_request: | ||
branches: | ||
- master | ||
- '[0-9]+.[0-9]+*' | ||
|
||
jobs: | ||
# Run build and test | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: '11' | ||
distribution: 'adopt' | ||
cache: maven | ||
- name: Build with Maven | ||
run: mvn -B clean install -Pextjs,h2_disk,auditing | ||
## Only on push event, publish on geosolutions maven repo | ||
publish: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event_name == 'push' && github.repository == 'geosolutions-it/geostore' }} | ||
needs: build | ||
concurrency: ci-${{ github.ref }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Maven Central Repository | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '11' | ||
distribution: 'adopt' | ||
server-id: geosolutions | ||
server-username: MAVEN_USERNAME | ||
server-password: MAVEN_PASSWORD | ||
- name: Publish package | ||
run: mvn clean install deploy -Ppostgres,extjs | ||
env: | ||
MAVEN_USERNAME: ${{ secrets.GS_MAVEN_USERNAME }} | ||
MAVEN_PASSWORD: ${{ secrets.GS_MAVEN_PASSWORD }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: Cut Release Branch | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
current-version: | ||
description: Current version (e.g. 2.1) | ||
required: true | ||
next-version: | ||
description: Next version (e.g. 2.2). | ||
required: true | ||
main-branch: | ||
description: main branch | ||
default: master | ||
pr-options: | ||
description: Options for Pull request | ||
default: --squash --auto --delete-branch | ||
jobs: | ||
cut-release: | ||
name: Create release branch and PRs into main main branch | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: master | ||
- name: Create release branch and generate PR body | ||
id: create-branch | ||
env: | ||
CURR: ${{ github.event.inputs.current-version }} | ||
NEXT: ${{ github.event.inputs.next-version }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
MAIN_BRANCH: ${{ github.event.inputs.main-branch }} | ||
PR_OPTIONS: ${{ github.event.inputs.pr-options }} | ||
RUN_ID: ${{ github.run_id }} | ||
|
||
run: | | ||
# script will go here | ||
echo "Initializing git" | ||
# Optional | ||
git config user.name github-actions | ||
git config user.email github-actions@github.com | ||
BRANCH_NAME="${CURR}.x" | ||
echo "creating branch is $BRANCH_NAME" | ||
git checkout -b "$BRANCH_NAME" | ||
git push --set-upstream origin "$BRANCH_NAME" | ||
echo "branch created" | ||
echo "creating bump changes" | ||
git checkout "$MAIN_BRANCH" | ||
mvn -q -B release:update-versions -DautoVersionSubmodules=true -DdevelopmentVersion=${NEXT}-SNAPSHOT # sets the internal verison | ||
mvn -q -B versions:set-property -B -Dproperty=geostore-version -DnewVersion=${NEXT}-SNAPSHOT # sets geostore-version property | ||
pr_branch_name="bump-${NEXT}-${RUN_ID}" | ||
echo "Creating a temp PR on branch: ${pr_branch_name}" | ||
git checkout -b "${pr_branch_name}" | ||
find . -name 'pom.xml' | xargs git add | ||
git commit -m "Bump version to ${NEXT}" | ||
git push origin "${pr_branch_name}" | ||
pr_url=$(gh pr create -B "${MAIN_BRANCH}" -H "${pr_branch_name}" --title "[github-action] Bump version to ${NEXT}" --body "This automatic pull request bumps version of ${MAIN_BRANCH} branch to ${NEXT}") | ||
sleep 10 | ||
gh pr merge "$pr_url" ${PR_OPTIONS} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven | ||
|
||
name: Release | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: 'Version to release, e.g. 2.1.0 (make sure to execute on this on the release branch)' | ||
required: true | ||
base: | ||
description: 'Base Version. e.g. 2.1' | ||
required: true | ||
|
||
jobs: | ||
fix-version: | ||
# if: ${{ github.repository == 'geosolutions-it/geostore' && github.ref != 'master' }} | ||
concurrency: ci-${{ github.ref }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check branch | ||
if: ${{ github.repository != 'geosolutions-it/geostore' || github.ref == 'master' }} | ||
uses: actions/github-script@v3 | ||
with: | ||
script: | | ||
core.setFailed('This workflow can not run on master branch') | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '11' | ||
distribution: 'adopt' | ||
cache: maven | ||
|
||
- name: Fix versions, commit and push new tag | ||
run: | | ||
# fix versions to ${{ inputs.version }} | ||
mvn versions:set -DnewVersion=${{ inputs.version }} -DgenerateBackupPoms=false # set versions | ||
mvn versions:set-property -Dproperty=geostore-version -DnewVersion=${{ inputs.version }} # set geostore-version property | ||
mvn versions:use-releases # check to not use SNAPSHOTs | ||
# script will go here | ||
echo "Initializing git" | ||
# Optional | ||
git config user.name github-actions | ||
git config user.email github-actions@github.com | ||
# Commit changes | ||
find . -name 'pom.xml' | xargs git add | ||
git commit -m "Version Release ${{ inputs.version }}" | ||
git tag v${{ inputs.version }} # create tag | ||
git push origin ${{ github.ref_name }} --tags | ||
- name: Build with Maven | ||
run: mvn -B clean install -Pextjs,h2_disk,auditing | ||
|
||
- name: Set up Maven Repository | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '11' | ||
distribution: 'adopt' | ||
server-id: geosolutions | ||
server-username: MAVEN_USERNAME | ||
server-password: MAVEN_PASSWORD | ||
|
||
- name: Publish package | ||
run: mvn clean install deploy -Ppostgres,extjs | ||
env: | ||
MAVEN_USERNAME: ${{ secrets.GS_MAVEN_USERNAME }} | ||
MAVEN_PASSWORD: ${{ secrets.GS_MAVEN_PASSWORD }} | ||
- name: Restore Snapshots | ||
run: | | ||
# restore versions to ${{ inputs.base }}-SNAPSHOT | ||
mvn versions:set -DnewVersion=${{ inputs.base }}-SNAPSHOT -DgenerateBackupPoms=false | ||
mvn versions:set-property -Dproperty=geostore-version -DnewVersion=${{ inputs.base }}-SNAPSHOT # set geostore-version property | ||
find . -name 'pom.xml' | xargs git add | ||
git commit -m "Restore snapshots from ${{ inputs.version }} to ${{ inputs.base }}-SNAPSHOT" | ||
git tag ${VERSION} # create tag | ||
git push origin ${{ github.ref_name }} | ||
echo "Snapshots version restored" | ||
release: | ||
runs-on: ubuntu-latest | ||
needs: fix-version | ||
concurrency: release-${{ github.ref }} | ||
steps: | ||
- name: create_release | ||
id: create_release | ||
uses: softprops/action-gh-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | ||
with: | ||
tag_name: "v${{ inputs.version }}" | ||
name: "${{ inputs.version }}" | ||
generate_release_notes: true | ||
draft: false | ||
prerelease: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,23 @@ | ||
-- CREATE SCHEMA geostore | ||
CREATE user geostore LOGIN PASSWORD 'geostore' NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE; | ||
CREATE USER geostore LOGIN PASSWORD 'geostore' NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE; | ||
|
||
CREATE SCHEMA geostore; | ||
|
||
GRANT USAGE ON SCHEMA geostore TO geostore ; | ||
GRANT ALL ON SCHEMA geostore TO geostore ; | ||
|
||
--GRANT SELECT ON public.spatial_ref_sys to geostore; | ||
--GRANT SELECT,INSERT,DELETE ON public.geometry_columns to geostore; | ||
GRANT SELECT ON public.spatial_ref_sys to geostore; | ||
GRANT SELECT,INSERT,DELETE ON public.geometry_columns to geostore; | ||
|
||
alter user geostore set search_path to geostore , public; | ||
ALTER USER geostore SET search_path TO geostore , public; | ||
|
||
-- CREATE SCHEMA georepo_test | ||
CREATE user geostore_test LOGIN PASSWORD 'geostore_test' NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE; | ||
CREATE USER geostore_test LOGIN PASSWORD 'geostore_test' NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE; | ||
|
||
CREATE SCHEMA geostore_test; | ||
|
||
GRANT USAGE ON SCHEMA geostore_test TO geostore_test; | ||
GRANT ALL ON SCHEMA geostore_test TO geostore_test; | ||
|
||
--GRANT SELECT ON public.spatial_ref_sys to geostore_test; | ||
--GRANT SELECT,INSERT,DELETE ON public.geometry_columns to geostore_test; | ||
GRANT SELECT ON public.spatial_ref_sys to geostore_test; | ||
GRANT SELECT,INSERT,DELETE ON public.geometry_columns to geostore_test; | ||
|
||
alter user geostore_test set search_path to geostore_test, public; | ||
ALTER USER geostore_test SET search_path TO geostore_test, public; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.