Merge branch 'helma-🐜' into renovate/major-jetty-packages
This commit is contained in:
commit
c5f68013b1
8 changed files with 88 additions and 21 deletions
50
.github/workflows/staging.yml
vendored
Normal file
50
.github/workflows/staging.yml
vendored
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
name: Staging
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch
|
||||||
|
|
||||||
|
env:
|
||||||
|
SSH_AUTH_SOCK: /tmp/ssh-agent.sock
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
install:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
environment:
|
||||||
|
name: staging
|
||||||
|
url: https://antville-test.click
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Java
|
||||||
|
uses: actions/setup-java@v4
|
||||||
|
with:
|
||||||
|
distribution: temurin
|
||||||
|
java-version: 21
|
||||||
|
|
||||||
|
- name: Set up Gradle
|
||||||
|
uses: gradle/actions/setup-gradle@v3
|
||||||
|
|
||||||
|
- name: Build with Gradle
|
||||||
|
run: ./gradlew installDist
|
||||||
|
|
||||||
|
- name: Set up SSH agent
|
||||||
|
run: |
|
||||||
|
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
|
||||||
|
ssh-add - <<< "${{ secrets.SSH_PRIVATE_KEY }}"
|
||||||
|
mkdir -p ~/.ssh
|
||||||
|
echo '${{ vars.SSH_CONFIG }}' > ~/.ssh/config
|
||||||
|
echo '${{ vars.KNOWN_HOSTS }}' > ~/.ssh/known_hosts
|
||||||
|
|
||||||
|
- name: Publish to staging server
|
||||||
|
run: |
|
||||||
|
rsync build/install/helma/ antville.dev:/ \
|
||||||
|
--verbose --archive --delete --compress \
|
||||||
|
--filter '+ launcher.jar' \
|
||||||
|
--filter '+ lib' \
|
||||||
|
--filter '+ *.jar' \
|
||||||
|
--filter '- *' \
|
||||||
|
|
||||||
|
- name: Restart Helma
|
||||||
|
run: ssh antville.dev restart
|
|
@ -34,9 +34,9 @@ Helma is built with [Gradle](https://gradle.org), the build task depends on the
|
||||||
### Additional Prerequisites
|
### Additional Prerequisites
|
||||||
|
|
||||||
* [Rsync](https://rsync.samba.org) version ≥ 3.1.0
|
* [Rsync](https://rsync.samba.org) version ≥ 3.1.0
|
||||||
* [NodeJS](https://nodejs.org) LTS version
|
* [Node.js](https://nodejs.org) LTS version
|
||||||
|
|
||||||
Clone this repository to your machine and start the build process with `./gradlew install`. The build script is going to ask you if you want to update the installation, enter `y`.
|
Clone this repository to your machine and start the build process with `./gradlew install`. The build script is going to ask you if you want to update the installation, enter `yes` or `no`.
|
||||||
|
|
||||||
> ⚠️
|
> ⚠️
|
||||||
> Please be aware that this step is going to overwrite files in the installation directory – escpecially at a later time when there might be substantial changes. Should this happen by accident you find the previous installation in the `backups` directory.
|
> Please be aware that this step is going to overwrite files in the installation directory – escpecially at a later time when there might be substantial changes. Should this happen by accident you find the previous installation in the `backups` directory.
|
||||||
|
|
26
build.gradle
26
build.gradle
|
@ -147,7 +147,10 @@ distZip {
|
||||||
|
|
||||||
installDist {
|
installDist {
|
||||||
dependsOn build
|
dependsOn build
|
||||||
finalizedBy 'update'
|
|
||||||
|
if (!System.getenv('CI')) {
|
||||||
|
finalizedBy 'update'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
run {
|
run {
|
||||||
|
@ -180,11 +183,11 @@ task processSource(type: Sync) {
|
||||||
}
|
}
|
||||||
|
|
||||||
task update {
|
task update {
|
||||||
def rsyncArgs = ['--archive', '--exclude', 'backups']
|
def rsyncArgs = ['--archive', '--filter', '- backups']
|
||||||
|
|
||||||
def confirm = {
|
def confirm = {
|
||||||
ant.input(message: 'Update this installation?', validargs: 'y,n', addproperty: 'continue')
|
ant.input(message: 'Update this installation?', validargs: 'yes,no', addproperty: 'continue')
|
||||||
return ant.continue == 'y'
|
return ant.continue == 'yes'
|
||||||
}
|
}
|
||||||
|
|
||||||
onlyIf { confirm() }
|
onlyIf { confirm() }
|
||||||
|
@ -195,20 +198,29 @@ task update {
|
||||||
mkdir backupDir
|
mkdir backupDir
|
||||||
|
|
||||||
exec {
|
exec {
|
||||||
// Using rsync instead of a CopyTask because the latter chokes on multi-byte characters
|
// Create a backup with rsync instead of a CopyTask because the latter chokes on multi-byte characters
|
||||||
// See https://github.com/gradle/gradle/issues/789
|
// See https://github.com/gradle/gradle/issues/789
|
||||||
executable 'rsync'
|
executable 'rsync'
|
||||||
args rsyncArgs
|
args rsyncArgs
|
||||||
args "$projectDir/", backupDir
|
args "$projectDir/", backupDir
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print "Created backup of ${projectDir} in ${backupDir}"
|
||||||
}
|
}
|
||||||
|
|
||||||
doLast {
|
doLast {
|
||||||
exec {
|
exec {
|
||||||
// Using rsync instead of installDist task because it does not overwrite the project directory
|
// Using rsync to selectively update the repo directory
|
||||||
executable 'rsync'
|
executable 'rsync'
|
||||||
|
args '--delete'
|
||||||
args rsyncArgs
|
args rsyncArgs
|
||||||
args '--exclude', 'bin'
|
args '--filter', '+ bin/***'
|
||||||
|
args '--filter', '+ docs/***'
|
||||||
|
args '--filter', '+ extras/***'
|
||||||
|
args '--filter', '+ launcher.jar'
|
||||||
|
args '--filter', '+ lib'
|
||||||
|
args '--filter', '+ *.jar'
|
||||||
|
args '--filter', '- *'
|
||||||
args "${installDist.destinationDir}/", projectDir
|
args "${installDist.destinationDir}/", projectDir
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -1,6 +1,6 @@
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
|
20
gradlew.bat
vendored
20
gradlew.bat
vendored
|
@ -43,11 +43,11 @@ set JAVA_EXE=java.exe
|
||||||
%JAVA_EXE% -version >NUL 2>&1
|
%JAVA_EXE% -version >NUL 2>&1
|
||||||
if %ERRORLEVEL% equ 0 goto execute
|
if %ERRORLEVEL% equ 0 goto execute
|
||||||
|
|
||||||
echo.
|
echo. 1>&2
|
||||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
|
||||||
echo.
|
echo. 1>&2
|
||||||
echo Please set the JAVA_HOME variable in your environment to match the
|
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||||
echo location of your Java installation.
|
echo location of your Java installation. 1>&2
|
||||||
|
|
||||||
goto fail
|
goto fail
|
||||||
|
|
||||||
|
@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||||
|
|
||||||
if exist "%JAVA_EXE%" goto execute
|
if exist "%JAVA_EXE%" goto execute
|
||||||
|
|
||||||
echo.
|
echo. 1>&2
|
||||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
|
||||||
echo.
|
echo. 1>&2
|
||||||
echo Please set the JAVA_HOME variable in your environment to match the
|
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||||
echo location of your Java installation.
|
echo location of your Java installation. 1>&2
|
||||||
|
|
||||||
goto fail
|
goto fail
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
dependencies {
|
dependencies {
|
||||||
runtimeOnly 'dom4j:dom4j:20040902.021138'
|
runtimeOnly 'dom4j:dom4j:1.1.3'
|
||||||
runtimeOnly 'jaxen:jaxen:1.1-beta-8'
|
runtimeOnly 'jaxen:jaxen:1.1-beta-8'
|
||||||
runtimeOnly 'net.sf.javamusictag:jid3lib:0.5.4'
|
runtimeOnly 'net.sf.javamusictag:jid3lib:0.5.4'
|
||||||
|
|
||||||
|
|
|
@ -39,6 +39,11 @@
|
||||||
"description": "Group Jetty packages",
|
"description": "Group Jetty packages",
|
||||||
"matchPackagePrefixes": ["org.eclipse.jetty"],
|
"matchPackagePrefixes": ["org.eclipse.jetty"],
|
||||||
"groupName": "Jetty packages"
|
"groupName": "Jetty packages"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Group Lucene packages",
|
||||||
|
"matchPackagePrefixes": ["org.apache.lucene"],
|
||||||
|
"groupName": "Lucene packages"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue