From 2cf14e543cb089ce2ff5ba9bce68d6d47d75313c Mon Sep 17 00:00:00 2001 From: James Maes Date: Sat, 6 Jul 2024 08:00:35 -0500 Subject: [PATCH 1/9] Add workflow Kingsrook/qqq/test_only --- .github/workflows/test_only.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/test_only.yml diff --git a/.github/workflows/test_only.yml b/.github/workflows/test_only.yml new file mode 100644 index 00000000..dd033a78 --- /dev/null +++ b/.github/workflows/test_only.yml @@ -0,0 +1,33 @@ +name: Kingsrook/qqq/test_only +on: + push: + branches: + - dev +env: + ACTIVATE_PRO: xxxx + AUTH0_AUDIENCE: xxxx000/ + AUTH0_BASE_URL: xxxxcom/ + AUTH0_CLIENT_ID: xxxxYfcq + AUTH0_CLIENT_SECRET: xxxxA8P6 + CUSTOM_PROPERTY: xxxx9876 + EASYPOST_API_KEY: xxxxEt0Q + RDBMS_DATABASE_NAME: xxxxq + RDBMS_HOSTNAME: xxxx.0.1 + RDBMS_PASSWORD: xxxxua6L + RDBMS_PORT: xxxx06 + RDBMS_USERNAME: xxxxot + RDBMS_VENDOR: xxxxql +jobs: + mvn_test: + if: # GitHub does not currently support regular expressions inside if conditions +# github.ref != 'refs/heads//(dev|integration.*)/' && github.ref != 'refs/tags//(version|snapshot)-.*/' + runs-on: ubuntu-latest + env: + NPM_TOKEN: + QQQ_MAVEN_REGISTRY_PASSWORD: + QQQ_MAVEN_REGISTRY_USERNAME: + RDBMS_PASSWORD: + steps: + - uses: actions/checkout@v4.1.0 + - uses: "./.github/actions/install_java17" + - uses: "./.github/actions/mvn_verify" From f380d44dd25bb4f1e58c468ea4fa7c9a3b957d8c Mon Sep 17 00:00:00 2001 From: James Maes Date: Sat, 6 Jul 2024 08:00:36 -0500 Subject: [PATCH 2/9] Add composite action install_java17 --- .github/actions/install_java17/action.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/actions/install_java17/action.yml diff --git a/.github/actions/install_java17/action.yml b/.github/actions/install_java17/action.yml new file mode 100644 index 00000000..7131a96d --- /dev/null +++ b/.github/actions/install_java17/action.yml @@ -0,0 +1,16 @@ +name: install_java17 +runs: + using: composite + steps: + - name: Install Java 17 + run: |- + sudo apt-get update + sudo apt install -y openjdk-17-jdk + sudo rm /etc/alternatives/java + sudo ln -s /usr/lib/jvm/java-17-openjdk-amd64/bin/java /etc/alternatives/java + shell: bash + - name: Install html2text + run: |- + sudo apt-get update + sudo apt-get install -y html2text + shell: bash \ No newline at end of file From 6ee8dad45fdf1cf1c0ed49ea9519a1523cf634c7 Mon Sep 17 00:00:00 2001 From: James Maes Date: Sat, 6 Jul 2024 08:00:36 -0500 Subject: [PATCH 3/9] Add composite action mvn_verify --- .github/actions/mvn_verify/action.yml | 61 +++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 .github/actions/mvn_verify/action.yml diff --git a/.github/actions/mvn_verify/action.yml b/.github/actions/mvn_verify/action.yml new file mode 100644 index 00000000..a5f2e435 --- /dev/null +++ b/.github/actions/mvn_verify/action.yml @@ -0,0 +1,61 @@ +name: mvn_verify +runs: + using: composite + steps: + - uses: actions/checkout@v4.1.0 + - name: restore_cache + uses: actions/cache@v3.3.2 + with: + key: v1-dependencies-{{ checksum "pom.xml" }} + path: UPDATE_ME + restore-keys: v1-dependencies-{{ checksum "pom.xml" }} + - name: Write .env + run: echo "RDBMS_PASSWORD=$RDBMS_PASSWORD" >> qqq-sample-project/.env + shell: bash + - name: Run Maven Verify + run: mvn -s .circleci/mvn-settings.xml -T4 verify + shell: bash + - uses: "./.github/actions/store_jacoco_site" + with: + module: qqq-backend-core + - uses: "./.github/actions/store_jacoco_site" + with: + module: qqq-backend-module-filesystem + - uses: "./.github/actions/store_jacoco_site" + with: + module: qqq-backend-module-rdbms + - uses: "./.github/actions/store_jacoco_site" + with: + module: qqq-backend-module-api + - uses: "./.github/actions/store_jacoco_site" + with: + module: qqq-middleware-api + - uses: "./.github/actions/store_jacoco_site" + with: + module: qqq-middleware-javalin + - uses: "./.github/actions/store_jacoco_site" + with: + module: qqq-middleware-picocli + - uses: "./.github/actions/store_jacoco_site" + with: + module: qqq-middleware-slack + - uses: "./.github/actions/store_jacoco_site" + with: + module: qqq-language-support-javascript + - uses: "./.github/actions/store_jacoco_site" + with: + module: qqq-sample-project + - name: Save test results + run: |- + mkdir -p ~/test-results/junit/ + find . -type f -regex ".*/target/surefire-reports/.*xml" -exec cp {} ~/test-results/junit/ \; + if: always() + shell: bash + - uses: actions/upload-artifact@v4.1.0 + with: + path: "~/test-results" + - name: save_cache + uses: actions/cache@v3.3.2 + with: + path: "~/.m2" + key: v1-dependencies-{{ checksum "pom.xml" }} \ No newline at end of file From 429513f337d008c23182e6ab7b52525ea036b8a0 Mon Sep 17 00:00:00 2001 From: James Maes Date: Sat, 6 Jul 2024 08:00:37 -0500 Subject: [PATCH 4/9] Add composite action store_jacoco_site --- .github/actions/store_jacoco_site/action.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .github/actions/store_jacoco_site/action.yml diff --git a/.github/actions/store_jacoco_site/action.yml b/.github/actions/store_jacoco_site/action.yml new file mode 100644 index 00000000..3dbe2345 --- /dev/null +++ b/.github/actions/store_jacoco_site/action.yml @@ -0,0 +1,13 @@ +name: store_jacoco_site +inputs: + module: + required: false +runs: + using: composite + steps: + - uses: actions/upload-artifact@v4.1.0 + with: + path: "${{ inputs.module }}/target/site/jacoco/index.html" + - uses: actions/upload-artifact@v4.1.0 + with: + path: "${{ inputs.module }}/target/site/jacoco/jacoco-resources" \ No newline at end of file From 9b1786dc0111f532bf68f4cfaa35094d77a1dfc7 Mon Sep 17 00:00:00 2001 From: James Maes Date: Sat, 6 Jul 2024 08:00:38 -0500 Subject: [PATCH 5/9] Add workflow Kingsrook/qqq/deploy --- .github/workflows/deploy.yml | 43 ++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 00000000..b3da8f11 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,43 @@ +name: Kingsrook/qqq/deploy +on: + push: + branches: + - dev +env: + ACTIVATE_PRO: xxxx + AUTH0_AUDIENCE: xxxx000/ + AUTH0_BASE_URL: xxxxcom/ + AUTH0_CLIENT_ID: xxxxYfcq + AUTH0_CLIENT_SECRET: xxxxA8P6 + CUSTOM_PROPERTY: xxxx9876 + EASYPOST_API_KEY: xxxxEt0Q + RDBMS_DATABASE_NAME: xxxxq + RDBMS_HOSTNAME: xxxx.0.1 + RDBMS_PASSWORD: xxxxua6L + RDBMS_PORT: xxxx06 + RDBMS_USERNAME: xxxxot + RDBMS_VENDOR: xxxxql +jobs: + mvn_deploy: + if: # GitHub does not currently support regular expressions inside if conditions +# github.ref == 'refs/heads//(dev|integration.*)/' || github.ref == 'refs/tags//(version|snapshot)-.*/' + runs-on: ubuntu-latest + env: + NPM_TOKEN: + QQQ_MAVEN_REGISTRY_PASSWORD: + QQQ_MAVEN_REGISTRY_USERNAME: + RDBMS_PASSWORD: + steps: + - uses: actions/checkout@v4.1.0 + - uses: "./.github/actions/install_java17" + - uses: "./.github/actions/mvn_verify" + - uses: "./.github/actions/mvn_jar_deploy" + publish_asciidoc: + if: # GitHub does not currently support regular expressions inside if conditions +# github.ref == 'refs/heads//dev/' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4.1.0 + - uses: "./.github/actions/install_asciidoctor" + - uses: "./.github/actions/run_asciidoctor" + - uses: "./.github/actions/upload_docs_site" From 3273e56b179ca796128ef5d21f5b62d80acecc64 Mon Sep 17 00:00:00 2001 From: James Maes Date: Sat, 6 Jul 2024 08:00:39 -0500 Subject: [PATCH 6/9] Add composite action mvn_jar_deploy --- .github/actions/mvn_jar_deploy/action.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/actions/mvn_jar_deploy/action.yml diff --git a/.github/actions/mvn_jar_deploy/action.yml b/.github/actions/mvn_jar_deploy/action.yml new file mode 100644 index 00000000..1d46384b --- /dev/null +++ b/.github/actions/mvn_jar_deploy/action.yml @@ -0,0 +1,22 @@ +name: mvn_jar_deploy +runs: + using: composite + steps: + - uses: actions/checkout@v4.1.0 + - name: Adjust pom version + run: ".circleci/adjust-pom-version.sh" + shell: bash + - name: restore_cache + uses: actions/cache@v3.3.2 + with: + key: v1-dependencies-{{ checksum "pom.xml" }} + path: UPDATE_ME + restore-keys: v1-dependencies-{{ checksum "pom.xml" }} + - name: Run Maven Jar Deploy + run: mvn -s .circleci/mvn-settings.xml -T4 flatten:flatten jar:jar deploy:deploy + shell: bash + - name: save_cache + uses: actions/cache@v3.3.2 + with: + path: "~/.m2" + key: v1-dependencies-{{ checksum "pom.xml" }} \ No newline at end of file From 8395dfaa52fbfd21c7d28733b526f78540bec715 Mon Sep 17 00:00:00 2001 From: James Maes Date: Sat, 6 Jul 2024 08:00:39 -0500 Subject: [PATCH 7/9] Add composite action install_asciidoctor --- .github/actions/install_asciidoctor/action.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .github/actions/install_asciidoctor/action.yml diff --git a/.github/actions/install_asciidoctor/action.yml b/.github/actions/install_asciidoctor/action.yml new file mode 100644 index 00000000..1dae4ede --- /dev/null +++ b/.github/actions/install_asciidoctor/action.yml @@ -0,0 +1,10 @@ +name: install_asciidoctor +runs: + using: composite + steps: + - uses: actions/checkout@v4.1.0 + - name: Install asciidoctor + run: |- + sudo apt-get update + sudo apt install -y asciidoctor + shell: bash \ No newline at end of file From d11ae90ad6b81697d0063f5cea544d160ee876ef Mon Sep 17 00:00:00 2001 From: James Maes Date: Sat, 6 Jul 2024 08:00:40 -0500 Subject: [PATCH 8/9] Add composite action run_asciidoctor --- .github/actions/run_asciidoctor/action.yml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .github/actions/run_asciidoctor/action.yml diff --git a/.github/actions/run_asciidoctor/action.yml b/.github/actions/run_asciidoctor/action.yml new file mode 100644 index 00000000..4a13752f --- /dev/null +++ b/.github/actions/run_asciidoctor/action.yml @@ -0,0 +1,9 @@ +name: run_asciidoctor +runs: + using: composite + steps: + - name: Run asciidoctor + run: |- + cd docs + asciidoctor -a docinfo=shared index.adoc + shell: bash \ No newline at end of file From 8648c67a985ecfeec3b4780a97b6dc3a3bfd3505 Mon Sep 17 00:00:00 2001 From: James Maes Date: Sat, 6 Jul 2024 08:00:41 -0500 Subject: [PATCH 9/9] Add composite action upload_docs_site --- .github/actions/upload_docs_site/action.yml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .github/actions/upload_docs_site/action.yml diff --git a/.github/actions/upload_docs_site/action.yml b/.github/actions/upload_docs_site/action.yml new file mode 100644 index 00000000..19043bfe --- /dev/null +++ b/.github/actions/upload_docs_site/action.yml @@ -0,0 +1,9 @@ +name: upload_docs_site +runs: + using: composite + steps: + - name: scp html to justinsgotskinnylegs.com + run: |- + cd docs + scp index.html dkelkhoff@45.79.44.221:/mnt/first-volume/dkelkhoff/nginx/html/justinsgotskinnylegs.com/qqq-docs.html + shell: bash \ No newline at end of file