-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit adc813d
Showing
167 changed files
with
47,224 additions
and
0 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,12 @@ | ||
version: 2 | ||
updates: | ||
|
||
# For Maven (Java) dependencies | ||
- package-ecosystem: "maven" | ||
directory: "/" # Location of pom.xml | ||
schedule: | ||
interval: "daily" # Frequency of update checks | ||
groups: | ||
all-dependencies: | ||
patterns: | ||
- "*" |
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,103 @@ | ||
# For most projects, this workflow file will not need changing; you simply need | ||
# to commit it to your repository. | ||
# | ||
# You may wish to alter this file to override the set of languages analyzed, | ||
# or to provide custom queries or build logic. | ||
# | ||
# ******** NOTE ******** | ||
# We have attempted to detect the languages in your repository. Please check | ||
# the `language` matrix defined below to confirm you have the correct set of | ||
# supported CodeQL languages. | ||
# | ||
name: "CodeQL Advanced" | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
schedule: | ||
- cron: '31 19 * * 4' | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze (${{ matrix.language }}) | ||
# Runner size impacts CodeQL analysis time. To learn more, please see: | ||
# - https://gh.io/recommended-hardware-resources-for-running-codeql | ||
# - https://gh.io/supported-runners-and-hardware-resources | ||
# - https://gh.io/using-larger-runners (GitHub.com only) | ||
# Consider using larger runners or machines with greater resources for possible analysis time improvements. | ||
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} | ||
permissions: | ||
# required for all workflows | ||
security-events: write | ||
|
||
# required to fetch internal or private CodeQL packs | ||
packages: read | ||
|
||
# only required for workflows in private repositories | ||
actions: read | ||
contents: read | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- language: java-kotlin | ||
build-mode: none # This mode only analyzes Java. Set this to 'autobuild' or 'manual' to analyze Kotlin too. | ||
# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' | ||
# Use `c-cpp` to analyze code written in C, C++ or both | ||
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both | ||
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both | ||
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis, | ||
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning. | ||
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how | ||
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Java | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '21' | ||
|
||
# Initializes the CodeQL tools for scanning. | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v3 | ||
with: | ||
languages: ${{ matrix.language }} | ||
build-mode: ${{ matrix.build-mode }} | ||
# If you wish to specify custom queries, you can do so here or in a config file. | ||
# By default, queries listed here will override any specified in a config file. | ||
# Prefix the list here with "+" to use these queries and those in the config file. | ||
|
||
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs | ||
queries: security-extended,security-and-quality | ||
|
||
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java). | ||
# If this step fails, then you should remove it and run the build manually (see below) | ||
- name: Autobuild | ||
uses: github/codeql-action/autobuild@v2 | ||
|
||
# If the analyze step fails for one of the languages you are analyzing with | ||
# "We were unable to automatically build your code", modify the matrix above | ||
# to set the build mode to "manual" for that language. Then modify this step | ||
# to build your code. | ||
# ℹ️ Command-line programs to run using the OS shell. | ||
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun | ||
#- if: matrix.build-mode == 'manual' | ||
# shell: bash | ||
# run: | | ||
# echo 'If you are using a "manual" build mode for one or more of the' \ | ||
# 'languages you are analyzing, replace this with the commands to build' \ | ||
# 'your code, for example:' | ||
# echo ' make bootstrap' | ||
# echo ' make release' | ||
# exit 1 | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v3 | ||
with: | ||
category: "/language:${{matrix.language}}" |
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,33 @@ | ||
name: fossa | ||
|
||
# Controls when the workflow will run | ||
on: | ||
# Triggers the workflow on push or pull request events but only for the master branch | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ "master" ] | ||
schedule: | ||
- cron: '31 19 * * 4' | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "build" | ||
fossa-scan: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
if: github.actor != 'dependabot[bot]' # Skip FOSSA for Dependabot PRs | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
- name: "Checkout Code" | ||
uses: actions/checkout@v2 | ||
|
||
- name: "Run FOSSA Scan" | ||
uses: fossa-contrib/[email protected] | ||
with: | ||
fossa-api-key: ${{ secrets.FOSSA_API_KEY }} | ||
project: domain-control-validation |
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,133 @@ | ||
name: release | ||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
deploy: | ||
runs-on: self-hosted | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up JDK 21 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '21' | ||
distribution: 'temurin' | ||
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml | ||
settings-path: ${{ github.workspace }} # location for the settings.xml file | ||
|
||
- name: maven-settings-xml-action | ||
uses: whelk-io/maven-settings-xml-action@v20 | ||
with: | ||
servers: > | ||
[ | ||
{ | ||
"id": "nexus", | ||
"username": "${{ secrets.DEV_REPO_USERNAME }}", | ||
"password": "${{ secrets.DEV_REPO_PASSWORD }}" | ||
} | ||
] | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Install Docker Compose | ||
run: | | ||
sudo curl -L "https://github.com/docker/compose/releases/download/$(curl -s https://api.github.com/repos/docker/compose/releases/latest | jq -r .tag_name)/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose | ||
sudo chmod +x /usr/local/bin/docker-compose | ||
docker-compose --version | ||
- name: Determine New Version | ||
id: new_version | ||
run: | | ||
# Fetch all tags to ensure they are available | ||
git fetch --tags | ||
# Get the latest tag | ||
latest_tag=$(git describe --tags `git rev-list --tags --max-count=1` || echo "v0.0.0") | ||
echo "Latest tag: $latest_tag" | ||
# Remove 'v' prefix and split into components | ||
latest_version=${latest_tag#"v"} | ||
IFS='.' read -r major minor patch_prerelease <<< "${latest_version}" | ||
# Separate patch and prerelease if any | ||
if [[ "$patch_prerelease" == *"-"* ]]; then | ||
IFS='-' read -r patch prerelease <<< "$patch_prerelease" | ||
else | ||
patch="$patch_prerelease" | ||
prerelease="" | ||
fi | ||
echo "Current version: $latest_version" | ||
echo "Major: $major, Minor: $minor, Patch: $patch, Prerelease: $prerelease" | ||
# Determine the new version | ||
if [[ "$prerelease" == beta.* ]]; then | ||
# Latest tag is a beta tag, increment beta version | ||
beta_version=${prerelease#beta.} | ||
beta_version=$((beta_version + 1)) | ||
new_version="${major}.${minor}.${patch}-beta.${beta_version}" | ||
else | ||
# Latest tag is not a beta tag, start beta.1 | ||
beta_version=1 | ||
new_version="${major}.${minor}.${patch}-beta.${beta_version}" | ||
fi | ||
echo "New version: $new_version" | ||
# Set outputs | ||
echo "new_version=$new_version" >> $GITHUB_OUTPUT | ||
echo "tag_name=v$new_version" >> $GITHUB_OUTPUT | ||
- name: Configure Git | ||
run: | | ||
git config --global user.email "${{ secrets.GIT_USERNAME }}@digicert.com" | ||
git config --global user.name "${{ secrets.GIT_USERNAME }}" | ||
- name: Update Version in pom.xml | ||
run: | | ||
./mvnw versions:set -DnewVersion=${{ steps.new_version.outputs.new_version }} -DgenerateBackupPoms=false | ||
- name: Build with Maven | ||
run: ./mvnw clean install | ||
|
||
- name: Generate Javadocs | ||
run: ./mvnw javadoc:javadoc | ||
|
||
- name: Create Tag | ||
run: | | ||
git tag -a v${{ steps.new_version.outputs.new_version }} -m "Tagging v${{ steps.new_version.outputs.new_version }}" | ||
git push origin v${{ steps.new_version.outputs.new_version }} | ||
- name: Publish to Nexus | ||
run: | | ||
./mvnw -pl library javadoc:jar | ||
./mvnw --batch-mode clean deploy -P deploy-to-internal-nexus | ||
slack_notification: | ||
needs: [deploy] | ||
if: always() | ||
runs-on: self-hosted | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Run Slack Notification | ||
uses: rohammosalli/slack-action@master | ||
env: | ||
SLACK_BOT_TOKEN: ${{ secrets.PKI_SLACK_TOKEN }} | ||
SLACK_CHANNEL: "dvm-alerts" | ||
GITHUB_TOKEN: ${{ secrets.GIT_ACCESS_TOKEN }} | ||
GITHUB_RUN_ID: ${{ github.run_id }} | ||
REPO_OWNER: ${{ github.repository_owner }} | ||
REPO_NAME: ${{ github.event.repository.name }} | ||
RUN_ID: ${{ github.run_id }} | ||
SEND_SUCCESS_MESSAGE: "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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# 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://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven | ||
|
||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
name: Java Build and Test with Maven | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: self-hosted | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up JDK 21 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '21' | ||
distribution: 'temurin' | ||
cache: maven | ||
|
||
- name: Set up Docker Build | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Install Docker Compose | ||
run: | | ||
sudo curl -L "https://github.com/docker/compose/releases/download/$(curl -s https://api.github.com/repos/docker/compose/releases/latest | jq -r .tag_name)/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose | ||
sudo chmod +x /usr/local/bin/docker-compose | ||
docker-compose --version | ||
- name: Run MVN Verify | ||
run: | | ||
./mvnw -P coverage -B verify --file pom.xml | ||
- name: Run Sonar | ||
run: | | ||
./mvnw --file library/pom.xml sonar:sonar -Dsonar.host.url=${{secrets.SONAR_HOST_URL}} -Dsonar.login=${{secrets.SONAR_TOKEN}} -DSonar.branch.name=${{github.head_ref}} -Dsonar.projectKey=domain-control-validation | ||
if: github.actor != 'dependabot[bot]' # Skip FOSSA for Dependabot PRs |
Oops, something went wrong.