Skip to content

Commit

Permalink
Merge branch 'develop' into dependabot/maven/org.springframework-spri…
Browse files Browse the repository at this point in the history
…ng-webmvc-6.1.13
  • Loading branch information
ajnelson-nist authored Oct 3, 2024
2 parents da504a5 + ae7a510 commit c2d49bf
Show file tree
Hide file tree
Showing 16 changed files with 217 additions and 204 deletions.
158 changes: 0 additions & 158 deletions .circleci/config.yml

This file was deleted.

25 changes: 0 additions & 25 deletions .circleci/maven-release-settings.xml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

### All Submissions:

- [ ] Have you followed the guidelines in our [Contributing](https://github.com/usnistgov/oss-maven/blob/master/CONTRIBUTING.md) document?
- [ ] Have you checked to ensure there aren't other open [Pull Requests](https://github.com/usnistgov/oss-maven/pulls) for the same update/change?
- [ ] Have you followed the guidelines in our [Contributing](https://github.com/usnistgov/swid-tools/blob/main/CONTRIBUTING.md) document?
- [ ] Have you checked to ensure there aren't other open [Pull Requests](https://github.com/usnistgov/swid-tools/pulls) for the same update/change?
- [ ] Have you squashed any non-relevant commits and commit messages? \[[instructions](https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History)\]
- [ ] Do all automated CI/CD checks pass?

Expand Down
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every weekday
interval: "daily"
target-branch: "develop"
# Maintain dependencies for Maven
- package-ecosystem: "maven"
directory: "/"
schedule:
interval: "daily"
target-branch: "develop"
87 changes: 87 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
on:
push:
branches:
- main
- develop
- release-*
pull_request:
types: [opened, synchronize, reopened]
branches:
- main
- develop
- release-*
workflow_dispatch:
name: Build and Test Code
jobs:
build-artifacts:
name: Build Java Artifacts
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
env:
BUILD_SNAPSHOT: ${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch') &&
(github.ref_name == 'develop' || startsWith(github.ref_name, 'release-')) }}
steps:
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
with:
submodules: recursive
filter: tree:0
# -------------------------
# Java Environment Setup
# -------------------------
- name: Set up Maven
uses: stCarolas/setup-maven@d6af6abeda15e98926a57b5aa970a96bb37f97d1
with:
maven-version: 3.9.3
- id: setup-java-deploy
name: Set up JDK 11 (deploy)
if: ${{ env.BUILD_SNAPSHOT == 'true' }}
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9
with:
java-version: 11
distribution: 'temurin'
cache: 'maven'
server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml
server-username: MAVEN_USERNAME # env variable for username in deploy
server-password: MAVEN_CENTRAL_TOKEN # env variable for token in deploy
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} # Value of the GPG private key to import
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
- name: Set up JDK 11 (build only)
if: ${{ steps.setup-java-deploy.outcome == 'skipped' }}
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9
with:
java-version: 11
distribution: 'temurin'
cache: 'maven'
- name: Initialize CodeQL
if: github.event_name == 'push'
uses: github/codeql-action/init@05963f47d870e2cb19a537396c1f668a348c7d8f
with:
languages: java
# -------------------------
# Maven Build
# -------------------------
- id: build-test-deploy
name: Build, Test and DEPLOY SNAPSHOT Code
if: ${{ env.BUILD_SNAPSHOT == 'true' }}
run: |
mvn -B -e -Pgpg -Prelease -Preporting deploy -Dmaven.deploy.skip=releases
env:
MAVEN_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.SONATYPE_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
- name: Build and Test Code
if: ${{ steps.build-test-deploy.outcome == 'skipped' }}
run: |
mvn -B -e -Prelease -Preporting install
- name: Perform CodeQL Analysis
if: github.event_name == 'push'
uses: github/codeql-action/analyze@05963f47d870e2cb19a537396c1f668a348c7d8f
with:
upload: ${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.ref_name == 'develop' && 'always' || 'never' }}
- name: Test Website
run: |
# this needs to be run as a second build to ensure source is fully generated by the previous step
mvn -B -e -Prelease -Preporting install site site:stage
4 changes: 2 additions & 2 deletions .circleci/deploy.sh → .github/workflows/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Options:
commit's message.
--source-only Only build but not push
--push-only Only push but not build
-b, --deploy-branch BRANCH Delpoy to specified branch
-b, --deploy-branch BRANCH Deploy to specified branch
"


Expand Down Expand Up @@ -156,7 +156,7 @@ incremental_deploy() {
0) echo No changes to files in $deploy_directory. Skipping commit.;;
1) commit+push;;
*)
echo git diff exited with code $diff. Aborting. Staying on branch $deploy_branch so you can debug. To switch back to master, use: git symbolic-ref HEAD refs/heads/master && git reset --mixed >&2
echo git diff exited with code $diff. Aborting. Staying on branch $deploy_branch so you can debug. To switch back to main, use: git symbolic-ref HEAD refs/heads/main && git reset --mixed >&2
return $diff
;;
esac
Expand Down
Loading

0 comments on commit c2d49bf

Please sign in to comment.