mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-17 20:50:44 +00:00
Real-development-mode ready versions of pom and CI scripts
This commit is contained in:
@ -4,33 +4,74 @@ executors:
|
||||
java17:
|
||||
docker:
|
||||
- image: 'cimg/openjdk:17.0'
|
||||
resource_class: small
|
||||
|
||||
orbs:
|
||||
maven: circleci/maven@1.3.0
|
||||
slack: circleci/slack@4.10.1
|
||||
|
||||
commands:
|
||||
run_maven:
|
||||
parameters:
|
||||
maven_subcommand:
|
||||
default: test
|
||||
type: string
|
||||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
keys:
|
||||
- v1-dependencies-{{ checksum "pom.xml" }}
|
||||
- run:
|
||||
name: Run Maven
|
||||
command: |
|
||||
mvn -s .circleci/mvn-settings.xml << parameters.maven_subcommand >>
|
||||
- run:
|
||||
name: Save test results
|
||||
command: |
|
||||
mkdir -p ~/test-results/junit/
|
||||
find . -type f -regex ".*/target/surefire-reports/.*xml" -exec cp {} ~/test-results/junit/ \;
|
||||
when: always
|
||||
- store_test_results:
|
||||
path: ~/test-results
|
||||
- save_cache:
|
||||
paths:
|
||||
- ~/.m2
|
||||
key: v1-dependencies-{{ checksum "pom.xml" }}
|
||||
|
||||
jobs:
|
||||
mvn_test:
|
||||
executor: java17
|
||||
steps:
|
||||
- run_maven:
|
||||
maven_subcommand: test
|
||||
- slack/notify:
|
||||
event: fail
|
||||
|
||||
mvn_deploy:
|
||||
executor: java17
|
||||
steps:
|
||||
- run_maven:
|
||||
maven_subcommand: deploy
|
||||
- slack/notify:
|
||||
event: always
|
||||
|
||||
workflows:
|
||||
main:
|
||||
test_only:
|
||||
jobs:
|
||||
##############################################################################
|
||||
## Job (from maven orb) to test the codebase. Should run for all branches. ##
|
||||
##############################################################################
|
||||
- maven/test:
|
||||
name: run_tests
|
||||
executor: java17
|
||||
- mvn_test:
|
||||
context: [ qqq-maven-registry-credentials, kingsrook-slack ]
|
||||
filters:
|
||||
branches:
|
||||
ignore: circleci-project-setup ## todo - change to main
|
||||
ignore: /dev/
|
||||
tags:
|
||||
ignore: /version-.*/
|
||||
|
||||
#############################################################################################
|
||||
## Job (from maven orb) to do a mvn deploy to publish jar to github qqq-maven-registry. ##
|
||||
## Note: despite "/test" in the name, we specify the mvn sub-command w/ the command param. ##
|
||||
#############################################################################################
|
||||
- maven/test:
|
||||
name: deploy_to_github
|
||||
executor: java17
|
||||
command: deploy
|
||||
settings_file: .circleci/mvn-settings.xml
|
||||
context: qqq-maven-registry-credentials
|
||||
deploy:
|
||||
jobs:
|
||||
- mvn_deploy:
|
||||
context: [ qqq-maven-registry-credentials, kingsrook-slack ]
|
||||
filters:
|
||||
branches:
|
||||
only: circleci-project-setup ## todo - change to main
|
||||
only: /dev/
|
||||
tags:
|
||||
only: /version-.*/
|
||||
|
||||
|
35
.github/workflows/maven.yml
vendored
35
.github/workflows/maven.yml
vendored
@ -1,35 +0,0 @@
|
||||
# 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: Java CI with Maven
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
java-version: '17'
|
||||
distribution: 'adopt'
|
||||
cache: maven
|
||||
- name: maven-settings-xml-action
|
||||
uses: whelk-io/maven-settings-xml-action@v20
|
||||
with:
|
||||
servers: '[{ "id": "github-qqq-maven-registry", "username": "${{ secrets.QQQ_MAVEN_REGISTRY_USERNAME }}", "password": "${{ secrets.QQQ_MAVEN_REGISTRY_PASSWORD }}" }]'
|
||||
repositories: '[{ "id": "github-qqq-maven-registry", "url": "https://maven.pkg.github.com/Kingsrook/qqq-maven-registry", "snapshots": { "enabled": "true" }}]'
|
||||
- name: Build with Maven
|
||||
run: mvn -B package --file pom.xml
|
||||
- name: Publish to GitHub Packages Apache Maven
|
||||
run: mvn deploy
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
@ -1,10 +1,8 @@
|
||||
# qqq-backend-core
|
||||
|
||||
[](https://github.com/Kingsrook/qqq-backend-core/actions/workflows/maven.yml)
|
||||
This is the Core backend module of qqq.
|
||||
|
||||
This is the Core backend module of qqq.
|
||||
|
||||
It defines the standard models (including how meta-data are modeled) and actions of the framework, along with interfaces for backend-modules to implement.
|
||||
It defines the standard models (including how meta-data are modeled) and actions of the framework, along with interfaces for backend-modules to implement.
|
||||
|
||||
## License
|
||||
QQQ - Low-code Application Framework for Engineers. \
|
||||
|
26
pom.xml
26
pom.xml
@ -20,15 +20,19 @@
|
||||
~ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>com.kingsrook.qqq</groupId>
|
||||
<artifactId>qqq-backend-core</artifactId>
|
||||
<version>0.0-SNAPSHOT</version>
|
||||
|
||||
<scm>
|
||||
<connection>scm:git:git@github.com:Kingsrook/qqq-backend-core.git</connection>
|
||||
<developerConnection>scm:git:git@github.com:Kingsrook/qqq-backend-core.git</developerConnection>
|
||||
<tag>HEAD</tag>
|
||||
</scm>
|
||||
|
||||
<properties>
|
||||
<!-- props specifically to this module -->
|
||||
<!-- none at this time -->
|
||||
@ -144,6 +148,22 @@
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.amashchenko.maven.plugin</groupId>
|
||||
<artifactId>gitflow-maven-plugin</artifactId>
|
||||
<version>1.18.0</version>
|
||||
<configuration>
|
||||
<gitFlowConfig>
|
||||
<productionBranch>main</productionBranch>
|
||||
<developmentBranch>dev</developmentBranch>
|
||||
<versionTagPrefix>version-</versionTagPrefix>
|
||||
</gitFlowConfig>
|
||||
<skipFeatureVersion>true</skipFeatureVersion> <!-- Keep feature names out of versions -->
|
||||
<postReleaseGoals>install</postReleaseGoals> <!-- Let CI run deploys -->
|
||||
<commitDevelopmentVersionAtStart>true</commitDevelopmentVersionAtStart>
|
||||
<versionDigitToIncrement>1</versionDigitToIncrement> <!-- In general, we update the minor -->
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
Reference in New Issue
Block a user