Skip to content
Commits on Source (66)
......@@ -24,7 +24,7 @@ jobs:
- name: Build documentation
run: ./gradlew clean build -x test
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: build-artifacts
path: build/docs/javadoc/
......@@ -32,7 +32,7 @@ jobs:
# DEPLOY TO GH-PAGES
- name: Deploy to GitHub-Pages
uses: JamesIves/github-pages-deploy-action@v4.2.5
uses: JamesIves/github-pages-deploy-action@v4.3.4
with:
branch: gh-pages
folder: build/docs/javadoc
......@@ -61,13 +61,13 @@ jobs:
- name: List files
run: ls -ahl build/libs
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: build-artifacts-gradle
path: |
build/libs/
if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn`
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
if: failure()
with:
name: report
......
......@@ -59,13 +59,13 @@ jobs:
- name: List files
run: ls -ahl build/libs
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: build-artifacts-gradle
path: |
build/libs/
if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn`
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
if: failure()
with:
name: report
......
......@@ -9,7 +9,7 @@ jobs:
gradle:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
......@@ -23,14 +23,14 @@ jobs:
run: ./gradlew build --info --stacktrace
- name: List files in libs
run: ls -ahl build/libs
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: build-artifacts-gradle
path: |
build/libs/
!build/libs/libraries/
if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn`
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
if: failure()
with:
name: report
......
......@@ -16,71 +16,24 @@ variables:
SECRET_DETECTION_EXCLUDED_PATHS: ""
services:
- name: griefed/gitlab-ci-cd:2.0.3
- name: griefed/gitlab-ci-cd:2.2.1
alias: docker
sast:
stage: Tests
artifacts:
reports:
sast: gl-sast-report.json
rules:
- when: never
variables:
SEARCH_MAX_DEPTH: 4
script:
- echo "$CI_JOB_NAME is used for configuration only, and its script should not be executed"
- exit 1
.sast-analyzer:
stage: Tests
extends: sast
allow_failure: true
# `rules` must be overridden explicitly by each child job
# see https://gitlab.com/gitlab-org/gitlab/-/issues/218444
script:
- /analyzer run
.secret-analyzer:
stage: Tests
image: "$SECURE_ANALYZERS_PREFIX/secrets:$SECRETS_ANALYZER_VERSION"
services: []
allow_failure: true
# `rules` must be overridden explicitly by each child job
# see https://gitlab.com/gitlab-org/gitlab/-/issues/218444
artifacts:
reports:
secret_detection: gl-secret-detection-report.json
secret_detection:
stage: Tests
extends: .secret-analyzer
workflow:
rules:
- if: $SECRET_DETECTION_DISABLED
- if: '$CI_MERGE_REQUEST_EVENT_TYPE == "detached"'
when: never
- if: $CI_COMMIT_BRANCH
script:
- if [ -n "$CI_COMMIT_TAG" ]; then echo "Skipping Secret Detection for tags. No code changes have occurred."; exit 0; fi
- if [ "$CI_COMMIT_BRANCH" = "$CI_DEFAULT_BRANCH" ]; then echo "Running Secret Detection on default branch."; /analyzer run; exit 0; fi
- git fetch origin $CI_DEFAULT_BRANCH $CI_COMMIT_REF_NAME
- git log --left-right --cherry-pick --pretty=format:"%H" refs/remotes/origin/$CI_DEFAULT_BRANCH...refs/remotes/origin/$CI_COMMIT_REF_NAME > "$CI_COMMIT_SHA"_commit_list.txt
- export SECRET_DETECTION_COMMITS_FILE="$CI_COMMIT_SHA"_commit_list.txt
- /analyzer run
- rm "$CI_COMMIT_SHA"_commit_list.txt
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
when: never
- if: '$CI_COMMIT_TITLE =~ /^RELEASE:.+$/ && $CI_COMMIT_BRANCH' # && $CI_COMMIT_TAG == null
when: never
- when: always
Gradle Test:
stage: Tests
image: griefed/baseimage-ubuntu-jdk-8:2.0.6
image: griefed/baseimage-ubuntu-jdk-8:2.0.15
before_script:
- echo "**** Running in $CI_JOB_ID ****"
- echo "**** Java location ****"
- which java
- echo "**** Java version ****"
- java -version
- echo "**** Allowing execution of gradlew ****"
- chmod +x gradlew
- echo "**** Ensure clean environment ****"
- "./gradlew clean"
script:
- echo "**** Building ${CI_PROJECT_NAME} ****"
- "./gradlew build --info --full-stacktrace"
......@@ -103,9 +56,7 @@ Generate Release:
needs:
- job: Gradle Test
artifacts: false
- job: secret_detection
artifacts: false
image: ghcr.io/griefed/gitlab-ci-cd:2.0.5
image: ghcr.io/griefed/gitlab-ci-cd:2.2.1
script:
- npx semantic-release
rules:
......@@ -115,7 +66,7 @@ Generate Release:
Build Release:
stage: Build Release
image: griefed/baseimage-ubuntu-jdk-8:2.0.6
image: griefed/baseimage-ubuntu-jdk-8:2.0.15
before_script:
- echo "**** Running in $CI_JOB_ID ****"
- echo "**** Java location ****"
......@@ -133,73 +84,164 @@ Build Release:
- LC_COLLATE=C ls -ahl --group-directories-first --color=auto build
- LC_COLLATE=C ls -ahl --group-directories-first --color=auto build/libs
- echo "**** Uploading packages ****"
- 'curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file build/libs/${CI_PROJECT_NAME}-${CI_COMMIT_TAG}.jar
"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${CI_PROJECT_NAME}/${CI_COMMIT_TAG}/${CI_PROJECT_NAME}-${CI_COMMIT_TAG}.jar"'
- 'curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file build/libs/${CI_PROJECT_NAME}-${CI_COMMIT_TAG}-javadoc.jar
"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${CI_PROJECT_NAME}/${CI_COMMIT_TAG}/${CI_PROJECT_NAME}-${CI_COMMIT_TAG}-javadoc.jar"'
- 'curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file build/libs/${CI_PROJECT_NAME}-${CI_COMMIT_TAG}-sources.jar
"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${CI_PROJECT_NAME}/${CI_COMMIT_TAG}/${CI_PROJECT_NAME}-${CI_COMMIT_TAG}-sources.jar"'
- 'curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file build/libs/${CI_PROJECT_NAME}-${CI_COMMIT_TAG}.jar "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${CI_PROJECT_NAME}/${CI_COMMIT_TAG}/${CI_PROJECT_NAME}-${CI_COMMIT_TAG}.jar"'
- 'curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file build/libs/${CI_PROJECT_NAME}-${CI_COMMIT_TAG}-javadoc.jar "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${CI_PROJECT_NAME}/${CI_COMMIT_TAG}/${CI_PROJECT_NAME}-${CI_COMMIT_TAG}-javadoc.jar"'
- 'curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file build/libs/${CI_PROJECT_NAME}-${CI_COMMIT_TAG}-sources.jar "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${CI_PROJECT_NAME}/${CI_COMMIT_TAG}/${CI_PROJECT_NAME}-${CI_COMMIT_TAG}-sources.jar"'
- echo "**** Create asset links ****"
- 'curl --request POST --header "PRIVATE-TOKEN: ${GITLAB_TOKEN}" --data tag_name="${CI_COMMIT_TAG}"
--data name="${CI_PROJECT_NAME}-${CI_COMMIT_TAG}.jar" --data url="${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${CI_PROJECT_NAME}/${CI_COMMIT_TAG}/${CI_PROJECT_NAME}-${CI_COMMIT_TAG}.jar"
--data link_type="package" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/releases/${CI_COMMIT_TAG}/assets/links"'
- 'curl --request POST --header "PRIVATE-TOKEN: ${GITLAB_TOKEN}" --data tag_name="${CI_COMMIT_TAG}"
--data name="${CI_PROJECT_NAME}-${CI_COMMIT_TAG}-javadoc.jar" --data url="${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${CI_PROJECT_NAME}/${CI_COMMIT_TAG}/${CI_PROJECT_NAME}-${CI_COMMIT_TAG}-javadoc.jar"
--data link_type="package" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/releases/${CI_COMMIT_TAG}/assets/links"'
- 'curl --request POST --header "PRIVATE-TOKEN: ${GITLAB_TOKEN}" --data tag_name="${CI_COMMIT_TAG}"
--data name="${CI_PROJECT_NAME}-${CI_COMMIT_TAG}-sources.jar" --data url="${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${CI_PROJECT_NAME}/${CI_COMMIT_TAG}/${CI_PROJECT_NAME}-${CI_COMMIT_TAG}-sources.jar"
--data link_type="package" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/releases/${CI_COMMIT_TAG}/assets/links"'
- 'curl --request POST --header "PRIVATE-TOKEN: ${GITLAB_TOKEN}" --data tag_name="${CI_COMMIT_TAG}" --data name="${CI_PROJECT_NAME}-${CI_COMMIT_TAG}.jar" --data url="${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${CI_PROJECT_NAME}/${CI_COMMIT_TAG}/${CI_PROJECT_NAME}-${CI_COMMIT_TAG}.jar" --data link_type="package" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/releases/${CI_COMMIT_TAG}/assets/links"'
- 'curl --request POST --header "PRIVATE-TOKEN: ${GITLAB_TOKEN}" --data tag_name="${CI_COMMIT_TAG}" --data name="${CI_PROJECT_NAME}-${CI_COMMIT_TAG}-javadoc.jar" --data url="${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${CI_PROJECT_NAME}/${CI_COMMIT_TAG}/${CI_PROJECT_NAME}-${CI_COMMIT_TAG}-javadoc.jar" --data link_type="package" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/releases/${CI_COMMIT_TAG}/assets/links"'
- 'curl --request POST --header "PRIVATE-TOKEN: ${GITLAB_TOKEN}" --data tag_name="${CI_COMMIT_TAG}" --data name="${CI_PROJECT_NAME}-${CI_COMMIT_TAG}-sources.jar" --data url="${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${CI_PROJECT_NAME}/${CI_COMMIT_TAG}/${CI_PROJECT_NAME}-${CI_COMMIT_TAG}-sources.jar" --data link_type="package" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/releases/${CI_COMMIT_TAG}/assets/links"'
rules:
- if: "$CI_COMMIT_TAG =~ /^\\d+\\.\\d+\\.\\d+(-beta|-alpha)\\.\\d+$/"
- if: "$CI_COMMIT_TAG =~ /^\\d+\\.\\d+\\.\\d+$/"
Publish Maven Artifacts:
Sign Java Publication:
stage: Build Release
image: ghcr.io/griefed/baseimage-ubuntu-jdk-8:2.0.8
image: ghcr.io/griefed/baseimage-ubuntu-jdk-8:2.0.15
needs:
- job: Build Release
artifacts: false
optional: false
before_script:
- echo "**** Running in $CI_JOB_ID ****"
- echo "**** Java location ****"
- which java
- echo "**** Java version ****"
- java -version
- echo "**** Allowing execution of gradlew ****"
- chmod +x gradlew
- echo "**** Ensure clean environment ****"
- "./gradlew clean"
script:
- echo "**** Publishing Maven Artifacts ****"
- "./gradlew publish -Pversion=${CI_COMMIT_TAG} -x test --info --stacktrace"
- "./gradlew signMavenJavaPublication -Pversion=${CI_COMMIT_TAG} -x test --info --stacktrace"
rules:
- if: '$CI_COMMIT_TAG =~ /^\d+\.\d+\.\d+-(alpha|beta)\.\d+$/ && $CI_SERVER_HOST == "git.griefed.de"'
- if: '$CI_COMMIT_TAG =~ /^\d+\.\d+\.\d+-beta\.\d+$/ && $CI_SERVER_HOST == "git.griefed.de"'
- if: '$CI_COMMIT_TAG =~ /^\d+\.\d+\.\d+$/ && $CI_SERVER_HOST == "git.griefed.de"'
cache:
- key:
files:
- build.gradle
- gradle/gradle-wrapper.properties
paths:
- .gradle
policy: pull
Inform About Release:
Publish GitHub:
stage: Build Release
image: ghcr.io/griefed/gitlab-ci-cd:2.0.5
image: ghcr.io/griefed/baseimage-ubuntu-jdk-8:2.0.15
needs:
- job: Build Release
artifacts: false
- job: Sign Java Publication
optional: false
artifacts: true
before_script:
- chmod +x gradlew
script:
- echo "**** Publishing Maven Artifacts to GitHub ****"
- "./gradlew publishMavenJavaPublicationToGitHubPackagesRepository -Pversion=${CI_COMMIT_TAG} -x test --info --stacktrace"
rules:
- if: '$CI_COMMIT_TAG =~ /^\d+\.\d+\.\d+-beta\.\d+$/ && $CI_SERVER_HOST == "git.griefed.de"'
- if: '$CI_COMMIT_TAG =~ /^\d+\.\d+\.\d+$/ && $CI_SERVER_HOST == "git.griefed.de"'
cache:
- key:
files:
- build.gradle
- gradle/gradle-wrapper.properties
paths:
- .gradle
policy: pull
Publish GitLab:
stage: Build Release
image: ghcr.io/griefed/baseimage-ubuntu-jdk-8:2.0.15
needs:
- job: Sign Java Publication
optional: false
artifacts: true
before_script:
- chmod +x gradlew
script:
- echo "**** Publishing Maven Artifacts to GitLab ****"
- "./gradlew publishMavenJavaPublicationToMaven2Repository -Pversion=${CI_COMMIT_TAG} -x test --info --stacktrace"
rules:
- if: '$CI_COMMIT_TAG =~ /^\d+\.\d+\.\d+-beta\.\d+$/ && $CI_SERVER_HOST == "git.griefed.de"'
- if: '$CI_COMMIT_TAG =~ /^\d+\.\d+\.\d+$/ && $CI_SERVER_HOST == "git.griefed.de"'
cache:
- key:
files:
- build.gradle
- gradle/gradle-wrapper.properties
paths:
- .gradle
policy: pull
Publish GitGriefed:
stage: Build Release
image: ghcr.io/griefed/baseimage-ubuntu-jdk-8:2.0.15
needs:
- job: Sign Java Publication
optional: false
artifacts: true
before_script:
- chmod +x gradlew
script:
- /discord.sh
--webhook-url="$WEBHOOK_URL"
--username "$CI_PROJECT_TITLE"
--avatar "https://i.griefed.de/images/2020/11/18/Prosper_Docker_300x300.png"
--text "There's been a new release for ${CI_PROJECT_TITLE}. The new version is ${CI_COMMIT_TAG} and is available at <${CI_PROJECT_URL}/-/releases/${CI_COMMIT_TAG}>"
--title "New ${CI_PROJECT_TITLE} Release"
--description "There's been a new release for ${CI_PROJECT_TITLE}. The new version is ${CI_COMMIT_TAG} and is available at ${CI_PROJECT_URL}/-/releases/${CI_COMMIT_TAG}"
--color "0xC0FFEE"
--url "${CI_PROJECT_URL}/-/releases/${CI_COMMIT_TAG}"
--author "Griefed"
--author-url "https://${CI_SERVER_HOST}/Griefed"
--author-icon "https://i.griefed.de/images/2022/01/21/sam_1500x1500.th.jpg"
--thumbnail "https://i.griefed.de/images/2020/11/18/Prosper_Docker_300x300.th.png"
--field "Author;[Griefed](https://${CI_SERVER_HOST}/Griefed)"
--field "Platform;[${CI_SERVER_HOST}](https://${CI_SERVER_HOST})"
--footer "Released at $CI_JOB_STARTED_AT"
--footer-icon "https://i.griefed.de/images/2022/01/21/start_generation.png"
- echo "**** Publishing Maven Artifacts GitGriefed ****"
- "./gradlew publishMavenJavaPublicationToMavenRepository -Pversion=${CI_COMMIT_TAG} -x test --info --stacktrace"
rules:
- if: '$CI_COMMIT_TAG =~ /^\d+\.\d+\.\d+-(alpha|beta)\.\d+$/'
- if: '$CI_COMMIT_TAG =~ /^\d+\.\d+\.\d+$/'
- if: '$CI_COMMIT_TAG =~ /^\d+\.\d+\.\d+-beta\.\d+$/ && $CI_SERVER_HOST == "git.griefed.de"'
- if: '$CI_COMMIT_TAG =~ /^\d+\.\d+\.\d+$/ && $CI_SERVER_HOST == "git.griefed.de"'
cache:
- key:
files:
- build.gradle
- gradle/gradle-wrapper.properties
paths:
- .gradle
policy: pull
Publish OSSRH:
stage: Build Release
image: ghcr.io/griefed/baseimage-ubuntu-jdk-8:2.0.15
needs:
- job: Sign Java Publication
optional: false
artifacts: true
before_script:
- chmod +x gradlew
script:
- echo "**** Publishing Maven Artifacts to OSSRH ****"
- "./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository -Pversion=${CI_COMMIT_TAG} -x test --info --stacktrace"
rules:
- if: '$CI_COMMIT_TAG =~ /^\d+\.\d+\.\d+-beta\.\d+$/ && $CI_SERVER_HOST == "git.griefed.de"'
- if: '$CI_COMMIT_TAG =~ /^\d+\.\d+\.\d+$/ && $CI_SERVER_HOST == "git.griefed.de"'
cache:
- key:
files:
- build.gradle
- gradle/gradle-wrapper.properties
paths:
- .gradle
policy: pull
#Inform About Release:
# stage: Build Release
# image: ghcr.io/griefed/gitlab-ci-cd:2.0.9
# needs:
# - job: Build Release
# artifacts: false
# script:
# - /discord.sh
# --webhook-url="$WEBHOOK_URL"
# --username "$CI_PROJECT_TITLE"
# --avatar "https://i.griefed.de/images/2020/11/18/Prosper_Docker_300x300.png"
# --text "There's been a new release for ${CI_PROJECT_TITLE}. The new version is ${CI_COMMIT_TAG} and is available at <${CI_PROJECT_URL}/-/releases/${CI_COMMIT_TAG}>"
# --title "New ${CI_PROJECT_TITLE} Release"
# --description "There's been a new release for ${CI_PROJECT_TITLE}. The new version is ${CI_COMMIT_TAG} and is available at ${CI_PROJECT_URL}/-/releases/${CI_COMMIT_TAG}"
# --color "0xC0FFEE"
# --url "${CI_PROJECT_URL}/-/releases/${CI_COMMIT_TAG}"
# --author "Griefed"
# --author-url "https://${CI_SERVER_HOST}/Griefed"
# --author-icon "https://i.griefed.de/images/2022/01/21/sam_1500x1500.th.jpg"
# --thumbnail "https://i.griefed.de/images/2020/11/18/Prosper_Docker_300x300.th.png"
# --field "Author;[Griefed](https://${CI_SERVER_HOST}/Griefed)"
# --field "Platform;[${CI_SERVER_HOST}](https://${CI_SERVER_HOST})"
# --footer "Released at $CI_JOB_STARTED_AT"
# --footer-icon "https://i.griefed.de/images/2022/01/21/start_generation.png"
# rules:
# - if: '$CI_COMMIT_TAG =~ /^\d+\.\d+\.\d+-(alpha|beta)\.\d+$/'
# - if: '$CI_COMMIT_TAG =~ /^\d+\.\d+\.\d+$/'
release_job:
stage: Release
......@@ -220,14 +262,15 @@ coverage:
script:
- python /opt/cover2cover.py build/jacoco/test/jacocoTestReport.xml $CI_PROJECT_DIR/backend/main/java/ > build/cobertura.xml || true
- python /opt/source2filename.py build/cobertura.xml || true
needs: ["Gradle Test"]
artifacts:
reports:
cobertura: build/cobertura.xml
coverage_report:
coverage_format: cobertura
path: build/cobertura.xml
pages:
stage: Documentation
image: griefed/baseimage-ubuntu-jdk-8:2.0.6
image: griefed/baseimage-ubuntu-jdk-8:2.0.15
before_script:
- which java
- chmod +x gradlew
......
## [1.1.3](https://git.griefed.de/Griefed/VersionChecker/compare/1.1.2...1.1.3) (2022-11-30)
### 🛠 Fixes
* Sigh.....allow execution of the gradlew script. Why must things be this way. :'-( ([b959ecc](https://git.griefed.de/Griefed/VersionChecker/commit/b959ecccc66de8d7dc1c76c2c1dc307a896cd934))
## [1.1.2](https://git.griefed.de/Griefed/VersionChecker/compare/1.1.1...1.1.2) (2022-11-30)
### 🦊 CI/CD
* Disable release notification. Disable unneeded analyzers. Update gitlab-ci-cd image version. Only run jobs when necessary. ([58c658f](https://git.griefed.de/Griefed/VersionChecker/commit/58c658f60dafe85cccb378579e77a3a856fbb948))
### 🛠 Fixes
* Clean YAML errors and orphan job dependency ([b569594](https://git.griefed.de/Griefed/VersionChecker/commit/b569594ff08bb006307fd474360bf9f6478341d9))
* Switch to per-maven configuration and introduce io.github.gradle-nexus.publish-plugin ([00ad66d](https://git.griefed.de/Griefed/VersionChecker/commit/00ad66d5b448beccbdf4b2727f66c8574e1ed17f))
## [1.1.1](https://git.griefed.de/Griefed/VersionChecker/compare/1.1.0...1.1.1) (2022-11-30)
### 🦊 CI/CD
* Update dependencies. ([120bbfc](https://git.griefed.de/Griefed/VersionChecker/commit/120bbfc8c5af878f5aa74a737f412533c8d7d502))
* **GitLab:** Fix coverage job ([852c034](https://git.griefed.de/Griefed/VersionChecker/commit/852c034227e8df673744d05ef191d57316713250))
### 🧪 Tests
* Remove GitLab from tests as it no longer has the most recent SPC releases available due to CI limitations ([ffffe91](https://git.griefed.de/Griefed/VersionChecker/commit/ffffe913d621de13bad1105762adc18da1ad77ee))
### Other
* **deps:** update actions/checkout action to v3 ([67290b9](https://git.griefed.de/Griefed/VersionChecker/commit/67290b9d6360cfcbd02162a4ff0c3695efec76a8))
* **deps:** update actions/upload-artifact action to v3 ([99f8629](https://git.griefed.de/Griefed/VersionChecker/commit/99f862905c9cc756e1643cc26b8b06f1405603d0))
* **deps:** update dependency com.fasterxml.jackson.core:jackson-databind to v2.13.3 ([08eec64](https://git.griefed.de/Griefed/VersionChecker/commit/08eec6405034edf6facbfdca7f2799af251e5105))
* **deps:** update dependency ghcr.io/griefed/baseimage-ubuntu-jdk-8 to v2.0.10 ([e261fc7](https://git.griefed.de/Griefed/VersionChecker/commit/e261fc7f5f40805a3060dcd3380ecdfc7f73f86a))
* **deps:** update dependency ghcr.io/griefed/baseimage-ubuntu-jdk-8 to v2.0.11 ([41966b6](https://git.griefed.de/Griefed/VersionChecker/commit/41966b6b7c8a23b2191acb3a73eedf1d8670f164))
* **deps:** update dependency ghcr.io/griefed/baseimage-ubuntu-jdk-8 to v2.0.12 ([1e03db2](https://git.griefed.de/Griefed/VersionChecker/commit/1e03db2d557a1e9c21169c8c551402e34622ad80))
* **deps:** update dependency ghcr.io/griefed/baseimage-ubuntu-jdk-8 to v2.0.13 ([0530135](https://git.griefed.de/Griefed/VersionChecker/commit/0530135431d9e4ccf4331375bdfcd3e78a2ddd4a))
* **deps:** update dependency ghcr.io/griefed/baseimage-ubuntu-jdk-8 to v2.0.9 ([efd6b7c](https://git.griefed.de/Griefed/VersionChecker/commit/efd6b7c45adb295191c016ed9cee51ad33238838))
* **deps:** update dependency ghcr.io/griefed/gitlab-ci-cd to v2.0.6 ([8101ad3](https://git.griefed.de/Griefed/VersionChecker/commit/8101ad35f7e1af2f62c7d5f7278d96c87da03e0e))
* **deps:** update dependency ghcr.io/griefed/gitlab-ci-cd to v2.0.8 ([986cc62](https://git.griefed.de/Griefed/VersionChecker/commit/986cc62625563f53b5cb2c02000bb018df080932))
* **deps:** update dependency ghcr.io/griefed/gitlab-ci-cd to v2.0.9 ([73a7850](https://git.griefed.de/Griefed/VersionChecker/commit/73a7850b5d66aa10fecb762436500696d345993d))
* **deps:** update dependency griefed/baseimage-ubuntu-jdk-8 to v2.0.11 ([aacd861](https://git.griefed.de/Griefed/VersionChecker/commit/aacd8614856890c58bba95e7cffd5566edb81cfa))
* **deps:** update dependency griefed/baseimage-ubuntu-jdk-8 to v2.0.12 ([8b0d475](https://git.griefed.de/Griefed/VersionChecker/commit/8b0d4756df8824e9b1e994169d24f8ac70d0e2b2))
* **deps:** update dependency griefed/baseimage-ubuntu-jdk-8 to v2.0.13 ([fe7b8a0](https://git.griefed.de/Griefed/VersionChecker/commit/fe7b8a0ec9eba59e91f4bf5b9b22444e48442be8))
* **deps:** update dependency griefed/baseimage-ubuntu-jdk-8 to v2.0.9 ([80b6235](https://git.griefed.de/Griefed/VersionChecker/commit/80b623504e631e0a8058272d9d6cb06a919761b5))
* **deps:** update dependency griefed/gitlab-ci-cd to v2.0.6 ([e509daf](https://git.griefed.de/Griefed/VersionChecker/commit/e509daff6aeb8350d6494642779cefbed0341e8a))
* **deps:** update dependency griefed/gitlab-ci-cd to v2.0.8 ([9f0abb5](https://git.griefed.de/Griefed/VersionChecker/commit/9f0abb5c456c5293cd276979ac23d4f5c23aaf40))
* **deps:** update dependency griefed/gitlab-ci-cd to v2.0.9 ([d5e4a9c](https://git.griefed.de/Griefed/VersionChecker/commit/d5e4a9c677b535c4144f738a199fae1456f91610))
* **deps:** update dependency org.apache.logging.log4j:log4j-core to v2.17.2 ([d3cf5fb](https://git.griefed.de/Griefed/VersionChecker/commit/d3cf5fbf78ed0503e4621720616f4f07f84d5fe0))
* **deps:** update dependency org.apache.logging.log4j:log4j-core to v2.18.0 ([fd31b19](https://git.griefed.de/Griefed/VersionChecker/commit/fd31b196cc5cb8556a4853d2e29c0dbc5b4ad544))
* **deps:** update ghcr.io/griefed/baseimage-ubuntu-jdk-8 docker tag to v2.0.14 ([6961c54](https://git.griefed.de/Griefed/VersionChecker/commit/6961c541ed423a8831c61c951beba586ae8c8d29))
* **deps:** update ghcr.io/griefed/baseimage-ubuntu-jdk-8 docker tag to v2.0.15 ([69cdc7b](https://git.griefed.de/Griefed/VersionChecker/commit/69cdc7b96ccee05ef1cb259a58318b75246544de))
* **deps:** update griefed/baseimage-ubuntu-jdk-8 docker tag to v2.0.14 ([325e8cf](https://git.griefed.de/Griefed/VersionChecker/commit/325e8cf186744609e2442112625a27c0ae84e52f))
* **deps:** update griefed/baseimage-ubuntu-jdk-8 docker tag to v2.0.15 ([d0f4783](https://git.griefed.de/Griefed/VersionChecker/commit/d0f47831498a1e65cff5fbdeb1a43d8c903377c4))
* **deps:** update jamesives/github-pages-deploy-action action to v4.3.3 ([bcf16a5](https://git.griefed.de/Griefed/VersionChecker/commit/bcf16a5716779d3685d4a0fa66ee750574fdaf6f))
* **deps:** update jamesives/github-pages-deploy-action action to v4.3.4 ([2719fbf](https://git.griefed.de/Griefed/VersionChecker/commit/2719fbf2c557f1ea291acd678d0fbb85cab76ebd))
## [1.1.0](https://git.griefed.de/Griefed/VersionChecker/compare/1.0.8...1.1.0) (2022-04-17)
......
......@@ -7,6 +7,7 @@ plugins {
id 'java-library'
id 'signing'
id 'maven-publish'
id "io.github.gradle-nexus.publish-plugin" version "1.1.0"
id 'jacoco'
id 'idea'
......@@ -39,14 +40,14 @@ sourceSets {
}
dependencies {
implementation 'org.apache.logging.log4j:log4j-core:2.17.1'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.13.2.2'
implementation 'org.apache.logging.log4j:log4j-core:2.19.0'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.14.0'
implementation 'org.jetbrains:annotations:23.0.0'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2'
testImplementation 'org.junit.platform:junit-platform-commons:1.8.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.2'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.0'
testImplementation 'org.junit.platform:junit-platform-commons:1.9.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.0'
}
test {
......@@ -104,6 +105,17 @@ jar {
}
}
nexusPublishing {
repositories {
sonatype {
nexusUrl = uri("https://s01.oss.sonatype.org/service/local/")
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
username = System.getenv("OSSRH_USERNAME")
password = System.getenv("OSSRH_PASSWORD")
}
}
}
publishing {
publications {
mavenJava(MavenPublication) {
......@@ -142,7 +154,6 @@ publishing {
}
}
}
repositories {
maven {
name = "GitHubPackages"
......@@ -172,14 +183,6 @@ publishing {
header(HttpHeaderAuthentication)
}
}
maven {
name = "OSSRH"
url = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
credentials {
username = System.getenv("OSSRH_USERNAME")
password = System.getenv("OSSRH_PASSWORD")
}
}
}
}
......
......@@ -13,12 +13,10 @@ public class UpdateCheckerTests {
private GitHubChecker GITHUB;
private GitLabChecker GITGRIEFED;
private GitLabChecker GITLAB;
public UpdateCheckerTests() throws IOException {
this.GITHUB = new GitHubChecker("Griefed/ServerPackCreator");
this.GITLAB = new GitLabChecker("https://gitlab.com/api/v4/projects/32677538/releases");
this.GITGRIEFED = new GitLabChecker("https://git.griefed.de/api/v4/projects/63/releases");
}
......@@ -30,12 +28,6 @@ public class UpdateCheckerTests {
LOG.error("Error refreshing GitHub.", ex);
this.GITHUB = null;
}
try {
Assertions.assertNotNull(this.GITLAB.refresh());
} catch (Exception ex) {
LOG.error("Error refreshing GitLab.", ex);
this.GITLAB = null;
}
try {
Assertions.assertNotNull(this.GITGRIEFED.refresh());
} catch (Exception ex) {
......@@ -60,23 +52,6 @@ public class UpdateCheckerTests {
} while (GITHUB == null);
}
if (GITLAB == null) {
do {
try {
Thread.sleep(300000);
} catch (InterruptedException e) {
e.printStackTrace();
}
try {
Assertions.assertNotNull(this.GITLAB.refresh());
} catch (Exception ex) {
LOG.error("Error refreshing GitLab.", ex);
this.GITLAB = null;
}
} while (GITLAB == null);
}
if (GITGRIEFED == null) {
do {
try {
......@@ -102,13 +77,6 @@ public class UpdateCheckerTests {
Assertions.assertNotNull(GITHUB.getDownloadUrl("2.1.1"));
Assertions.assertNotNull(GITHUB.getAssetsDownloadUrls("2.1.1"));
Assertions.assertNotNull(GITLAB.latestVersion(false));
Assertions.assertNotNull(GITLAB.latestVersion(true));
Assertions.assertNotNull(GITLAB.latestAlpha());
Assertions.assertNotNull(GITLAB.latestBeta());
Assertions.assertNotNull(GITLAB.getDownloadUrl("2.1.1"));
Assertions.assertNotNull(GITLAB.getAssetsDownloadUrls("2.1.1"));
Assertions.assertNotNull(GITGRIEFED.latestVersion(false));
Assertions.assertNotNull(GITGRIEFED.latestVersion(true));
Assertions.assertNotNull(GITGRIEFED.latestAlpha());
......@@ -311,42 +279,9 @@ public class UpdateCheckerTests {
).split(";")[0]);
System.out.println("Update-instance from GitLab");
Assertions.assertTrue(GITLAB.check("2.0.0",false).isPresent());
Assertions.assertFalse(GITLAB.check(latest,false).isPresent());
Update gitLabUpdate = GITLAB.check("2.0.0",false).get();
Assertions.assertEquals(gitLabUpdate.version(), latest);
Assertions.assertNotNull(gitLabUpdate.description());
Assertions.assertNotNull(gitLabUpdate.url());
Assertions.assertNotNull(gitLabUpdate.releaseDate());
Assertions.assertNotEquals(0, gitLabUpdate.assets().get().size());
gitLabUpdate.assets().get().forEach(asset -> {
Assertions.assertNotNull(asset.name());
Assertions.assertNotNull(asset.url());
});
Assertions.assertTrue(gitLabUpdate.getReleaseAsset("ServerPackCreator-" + latest + ".exe").isPresent());
Assertions.assertTrue(gitLabUpdate.getReleaseAsset("ServerPackCreator-" + latest + ".jar").isPresent());
Assertions.assertNotEquals(0, gitLabUpdate.sources().size());
gitLabUpdate.sources().forEach(source -> {
Assertions.assertNotNull(source.type());
Assertions.assertNotNull(source.url());
});
Assertions.assertNotNull(gitLabUpdate.sourceZip());
Assertions.assertSame(gitLabUpdate.sourceZip().type(), ArchiveType.ZIP);
Assertions.assertNotNull(gitLabUpdate.sourceTarGz());
Assertions.assertSame(gitLabUpdate.sourceTarGz().type(), ArchiveType.TAR_GZ);
Assertions.assertTrue(gitLabUpdate.sourceTar().isPresent());
Assertions.assertSame(gitLabUpdate.sourceTar().get().type(), ArchiveType.TAR);
Assertions.assertTrue(gitLabUpdate.sourceTarBz2().isPresent());
Assertions.assertSame(gitLabUpdate.sourceTarBz2().get().type(), ArchiveType.TAR_BZ2);
System.out.println("Update-instance from GitHub");
Assertions.assertTrue(GITLAB.check("2.0.0",false).isPresent());
Assertions.assertFalse(GITLAB.check(latest,false).isPresent());
Assertions.assertTrue(GITHUB.check("2.0.0",false).isPresent());
Assertions.assertFalse(GITHUB.check(latest,false).isPresent());
Update gitHubUpdate = GITHUB.check("2.0.0",false).get();
Assertions.assertEquals(gitHubUpdate.version(), latest);
Assertions.assertNotNull(gitHubUpdate.description());
......@@ -401,22 +336,6 @@ public class UpdateCheckerTests {
}
}
if (GITLAB != null && updater != null) {
// After checking GitGriefed, and we did not get a version, check GitLab.
// Check GitLab for new versions which are not pre-releases. Run with true to check pre-releases as well.
// Only check if we did not already get a version from prior checks.
if (!updater.contains(";") && GITLAB.checkForUpdate(version, pre).contains(";")) {
updater = GITLAB.checkForUpdate(version, pre);
// Check GitLab for a newer version, with the version we received from GitGriefed, if we received a new version from GitGriefed.
// Don't check for pre-releases.
} else if (updater.contains(";") && GITLAB.checkForUpdate(updater.split(";")[0], pre).contains(";")) {
updater = GITLAB.checkForUpdate(updater.split(";")[0], pre);
}
}
// Output can be either "No updates available." if...well...no updates are available.
// or "2.1.1;https://github.com/Griefed/ServerPackCreator/releases/download/2.1.1/serverpackcreator-2.1.1.jar"
// if you ran this for ServerPackCreator, with version 2.1.1, without checking for pre-releases. (at the time of me writing this)
......