Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
ffe5e25
Remove java-library plugin
timyates Jun 28, 2024
5fd6fd5
Update the google cloud postgres socket factory lib
timyates Jun 28, 2024
18cf35a
Add reflect-config to allow custom deserializer and fix flyway
timyates Jun 28, 2024
a47b4b0
Name the generated executable and fix migrations for local dev
timyates Jun 28, 2024
29bf75e
Add section to ignore dev migration on CI
timyates Jun 28, 2024
163c20d
Add Github action for nativeCompile on CI
timyates Jun 28, 2024
fad6eeb
Rename action
timyates Jun 28, 2024
5e33838
Merge branch 'develop' into feature-2532/graal
timyates Jul 1, 2024
2150f8c
Better comments in build
timyates Jul 1, 2024
2b40be6
Add reflect info for docker runtime info when testing
timyates Jul 1, 2024
8f0cd0c
add deserializer and jsonerror
timyates Jul 1, 2024
f7dbe56
This needs to be public when mocking with the GraalVM
timyates Jul 1, 2024
d8916fb
Add missing introspection (for Graal)
timyates Jul 2, 2024
d6a6187
CoreMatchers.hasItems doesn't play well with native compilation
timyates Jul 2, 2024
cce3cbf
Disable tests that use Mockito and fail when run natively
timyates Jul 2, 2024
52a4bfb
Add nativeTest stage to action
timyates Jul 2, 2024
c29bd99
Merge branch 'develop' into feature-2532/graal
timyates Jul 2, 2024
e3e1a34
Merge branch 'develop' into feature-2532/graal
timyates Jul 4, 2024
2828a99
Enable (and test) dockerBuildNative
timyates Jul 4, 2024
c047b0a
Merge branch 'develop' into feature-2532/graal
Jul 11, 2024
6faebf8
Merge branch 'develop' into feature-2532/graal
Jul 11, 2024
cfe267a
Merge branch 'develop' into feature-2532/graal
Jul 12, 2024
165fff1
Merge branch 'develop' into feature-2532/graal
mkimberlin Jul 24, 2024
6490f67
Attemt to deploy to develop
mkimberlin Jul 25, 2024
cd22d89
Attempt to deploy to develop
mkimberlin Jul 25, 2024
57e8f3f
adjust image tagging
mkimberlin Jul 25, 2024
98077d1
image name fix
mkimberlin Jul 25, 2024
efac159
Merge branch 'develop' into feature-2532/graal
mkimberlin Aug 15, 2024
ddf55e4
Attempt to add LocalDateTimeSerializer constructors
mkimberlin Aug 16, 2024
bfcac1a
fixed the godforsaken serialization test
mkimberlin Aug 21, 2024
61a5ec9
Attempted to adjust native build to use new gcloud actions
mkimberlin Aug 22, 2024
ed15269
Added token permissions to the workflow and temporarily disabled tests
mkimberlin Aug 22, 2024
4ddb8d0
Skip to auth and add project id
mkimberlin Aug 22, 2024
f755a09
Adjusted workload pool
mkimberlin Aug 22, 2024
4bef442
Attempted to adjust docker push call
mkimberlin Aug 22, 2024
47446c9
Use regular docker
mkimberlin Aug 22, 2024
d5b8415
Merge branch 'develop' into feature-2532/graal
mkimberlin Sep 5, 2024
f163d14
Fix test merge
mkimberlin Sep 6, 2024
276ace5
Merge branch 'develop' into feature-2532/graal
Sep 16, 2024
7111c47
I suspect it's an origin issue... fix the URL
timyates Sep 16, 2024
f583b89
Test AOT to see if it speeds things up
timyates Sep 17, 2024
7c898bc
Revert "Test AOT to see if it speeds things up"
timyates Sep 17, 2024
5785bec
Merge branch 'develop' into feature-2532/graal
Sep 17, 2024
51094e5
Try again with AOT to see if it speeds things up
timyates Sep 17, 2024
097ffca
Revert "Try again with AOT to see if it speeds things up"
timyates Sep 17, 2024
e22f66e
Merge branch 'develop' into feature-2532/graal
Sep 17, 2024
102ce7b
Merge branch 'develop' into feature-2532/graal
timyates Sep 18, 2024
469c0be
Fix order of tables in teardown
timyates Sep 18, 2024
0f92217
Align action scripts
timyates Sep 18, 2024
ba4620f
Add the missing action 🙄
timyates Sep 18, 2024
b6a6d0f
Assemble before creating the docker image
timyates Sep 18, 2024
6c78d4d
Merge branch 'develop' into feature-2532/graal
Sep 18, 2024
18fb560
Patch Vite URL
timyates Sep 18, 2024
a6808b1
Extract URL
timyates Sep 19, 2024
9653690
Merge branch 'develop' into feature-2532/graal
timyates Sep 19, 2024
2b72a1a
Mark serialized classes as Introspected for Graal
timyates Sep 19, 2024
0f4eb64
Reduce amount of work in feature actions
timyates Sep 19, 2024
b45519d
Remove Graal branch from develop actions
timyates Sep 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions .github/workflows/gradle-build-feature.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,6 @@ jobs:
with:
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: 21
- name: Cache SonarQube packages
uses: actions/cache@v4
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Cache Gradle packages
uses: actions/cache@v4
with:
Expand All @@ -39,19 +33,7 @@ jobs:
restore-keys: ${{ runner.os }}-gradle
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b
- name: Build with Gradle
uses: gradle/gradle-build-action@4137be6a8bf7d7133955359dbd952c0ca73b1021
with:
arguments: assemble
- name: Gradle runs tests
uses: gradle/gradle-build-action@4137be6a8bf7d7133955359dbd952c0ca73b1021
with:
arguments: check
# - name: Do SonarQube checks
# uses: gradle/gradle-build-action@4137be6a8bf7d7133955359dbd952c0ca73b1021
# with:
# arguments: sonarqube --info
# env:
# GITHUB_TOKEN: ${{ secrets.GIT_HUB_TOKEN }}
# SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
39 changes: 39 additions & 0 deletions .github/workflows/gradle-build-native-feature.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Gradle Build - Native - Feature / Bug
on:
push:
branches:
- 'feature-**/*'
- 'bugfix-**/*'
- 'chore-**/*'
- 'doc-**/*'
- 'hotfix-**/*'
- 'dependabot/**/*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Node LTS
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Set up GraalVM 21
uses: graalvm/setup-graalvm@v1.1.8
with:
distribution: 'graalvm'
java-version: '21'
- name: Cache Gradle packages
uses: actions/cache@v4
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b
- name: Gradle runs tests
uses: gradle/gradle-build-action@4137be6a8bf7d7133955359dbd952c0ca73b1021
with:
arguments: nativeTest
22 changes: 22 additions & 0 deletions .github/workflows/gradle-dependency-submission.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Gradle Dependency Submission

on:
push:
branches: [ 'develop', 'master', 'feature-2532/graal' ]

permissions:
contents: write

jobs:
dependency-submission:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
- name: Generate and submit dependency graph
uses: gradle/actions/dependency-submission@v4
Original file line number Diff line number Diff line change
Expand Up @@ -3,84 +3,87 @@ on:
push:
branches:
- 'develop'

env:
PROJECT_ID: ${{ secrets.RUN_PROJECT }}
RUN_REGION: us-central1
SERVICE_NAME: checkins-develop
TARGET_URL: https://checkins-develop-tuvcfzotpq-uc.a.run.app
jobs:
build:
test:
runs-on: ubuntu-latest
environment:
name: Development
url: https://checkins-develop-tuvcfzotpq-uc.a.run.app/
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
fetch-depth: 0
- name: Set up Node LTS
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Set up JDK 21
- name: Set up Temurin 21
uses: actions/setup-java@v4
with:
distribution: 'temurin' # See 'Supported distributions' for available options
distribution: 'temurin'
java-version: 21
- name: Cache SonarQube packages
- name: Cache Gradle packages
uses: actions/cache@v4
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Run tests with Gradle
run: ./gradlew check
deploy:
permissions:
contents: 'read'
id-token: 'write'
runs-on: ubuntu-latest
environment:
name: Development
url: ${{ env.TARGET_URL }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Node LTS
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Set up Temurin 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
- name: Cache Gradle packages
uses: actions/cache@v4
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b
- name: Build with Gradle
uses: gradle/gradle-build-action@4137be6a8bf7d7133955359dbd952c0ca73b1021
with:
arguments: assemble
env:
VITE_APP_API_URL: https://checkins-develop-tuvcfzotpq-uc.a.run.app
- name: Gradle runs tests
uses: gradle/gradle-build-action@4137be6a8bf7d7133955359dbd952c0ca73b1021
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- id: 'auth'
uses: 'google-github-actions/auth@v2'
with:
arguments: check
# - name: Do SonarQube checks
# uses: gradle/gradle-build-action@4137be6a8bf7d7133955359dbd952c0ca73b1021
# with:
# arguments: sonarqube --info
# env:
# GITHUB_TOKEN: ${{ secrets.GIT_HUB_TOKEN }}
# SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- name: Setup python
run: |
sudo apt-get install python2.7
- name: Export gcloud related env variable
run: export CLOUDSDK_PYTHON="/usr/bin/python2"
# Setup gcloud CLI
- uses: google-github-actions/setup-gcloud@v0
project_id: 'oci-intern-2019'
workload_identity_provider: 'projects/832140020593/locations/global/workloadIdentityPools/github/providers/my-repo'
- name: 'Set up Cloud SDK'
uses: google-github-actions/setup-gcloud@v2
with:
version: "290.0.1"
service_account_key: ${{ secrets.RUN_SA_KEY }}
project_id: ${{ secrets.RUN_PROJECT }}
- name: Auth Configure Docker
version: '>= 363.0.0'
- name: 'Auth Configure Docker'
run: |-
gcloud --quiet auth configure-docker
- name: Build the Docker image
run: |-
./gradlew assemble
cd server
docker build --tag "gcr.io/$PROJECT_ID/$SERVICE_NAME:$GITHUB_SHA" .
env:
VITE_APP_API_URL: ${{ env.TARGET_URL }}
- name: Push the Docker image to Google Container Registry
run: |-
cd server
docker push "gcr.io/$PROJECT_ID/$SERVICE_NAME:$GITHUB_SHA"
run: docker push "gcr.io/$PROJECT_ID/$SERVICE_NAME:$GITHUB_SHA"
- name: Deploy image to Cloud Run
run: |-
gcloud run deploy "$SERVICE_NAME" \
Expand All @@ -103,7 +106,7 @@ jobs:
--set-env-vars "MJ_APIKEY_PUBLIC=${{ secrets.MJ_APIKEY_PUBLIC }}" \
--set-env-vars "MJ_APIKEY_PRIVATE=${{ secrets.MJ_APIKEY_PRIVATE }}" \
--set-env-vars "GIT_HUB_TOKEN=${{ secrets.GIT_HUB_TOKEN }}" \
--set-env-vars "WEB_ADDRESS=https://checkins-develop-tuvcfzotpq-uc.a.run.app" \
--set-env-vars "WEB_ADDRESS=${{ env.TARGET_URL }}" \
--set-env-vars "FROM_ADDRESS=kimberlinm@objectcomputing.com" \
--set-env-vars "FROM_NAME=Check-Ins - DEVELOP" \
--set-env-vars "^@^MICRONAUT_ENVIRONMENTS=dev,cloud,google,gcp" \
Expand Down
114 changes: 114 additions & 0 deletions .github/workflows/gradle-deploy-native-develop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
name: Gradle Build & Deploy - Native - Develop
on:
push:
branches:
- 'develop'
env:
PROJECT_ID: ${{ secrets.RUN_PROJECT }}
RUN_REGION: us-central1
SERVICE_NAME: checkins-develop-native
TARGET_URL: https://checkins-develop-native-832140020593.us-central1.run.app
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Node LTS
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Set up GraalVM 21
uses: graalvm/setup-graalvm@v1.1.8
with:
distribution: 'graalvm'
java-version: '21'
- name: Cache Gradle packages
uses: actions/cache@v4
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Run tests with Gradle
run: ./gradlew nativeTest
deploy:
permissions:
contents: 'read'
id-token: 'write'
runs-on: ubuntu-latest
environment:
name: Development - Native
url: ${{ env.TARGET_URL }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Node LTS
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Set up GraalVM 21
uses: graalvm/setup-graalvm@v1.1.8
with:
distribution: 'graalvm'
java-version: '21'
- name: Cache Gradle packages
uses: actions/cache@v4
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- id: 'auth'
uses: 'google-github-actions/auth@v2'
with:
project_id: 'oci-intern-2019'
workload_identity_provider: 'projects/832140020593/locations/global/workloadIdentityPools/github/providers/my-repo'
- name: 'Set up Cloud SDK'
uses: google-github-actions/setup-gcloud@v2
with:
version: '>= 363.0.0'
- name: 'Auth Configure Docker'
run: |-
gcloud --quiet auth configure-docker
- name: Build a native docker image
run: ./gradlew dockerBuildNative
env:
VITE_APP_API_URL: ${{ env.TARGET_URL }}
- name: Push the Docker image to Google Container Registry
run: |-
cd server
docker push "gcr.io/$PROJECT_ID/$SERVICE_NAME:$GITHUB_SHA"
- name: Deploy image to Cloud Run
run: |-
gcloud run deploy "$SERVICE_NAME" \
--quiet \
--region "$RUN_REGION" \
--image "gcr.io/$PROJECT_ID/$SERVICE_NAME:$GITHUB_SHA" \
--memory 1Gi \
--add-cloudsql-instances ${{ secrets.DB_CONNECTION_NAME }} \
--set-env-vars "CLOUD_DB_CONNECTION_NAME=${{ secrets.DB_CONNECTION_NAME }}" \
--set-env-vars "DB_NAME=${{ secrets.DB_NAME }}" \
--set-env-vars "DATASOURCES_DEFAULT_PASSWORD=${{ secrets.DB_PASSWORD }}" \
--set-env-vars "DATASOURCES_DEFAULT_USERNAME=${{ secrets.DB_USERNAME }}" \
--set-env-vars "AES_KEY=${{ secrets.AES_KEY }}" \
--set-env-vars "OAUTH_CLIENT_ID=${{ secrets.OAUTH_CLIENT_ID }}" \
--set-env-vars "OAUTH_CLIENT_SECRET=${{ secrets.OAUTH_CLIENT_SECRET }}" \
--set-env-vars "OAUTH_CALLBACK_URI"=${{ secrets.OAUTH_CALLBACK_URI }} \
--set-env-vars "DIRECTORY_ID=${{ secrets.DIRECTORY_ID }}" \
--set-env-vars "SERVICE_ACCOUNT_CREDENTIALS=${{ secrets.SERVICE_ACCOUNT_CREDENTIALS }}" \
--set-env-vars "GSUITE_SUPER_ADMIN=${{ secrets.GSUITE_SUPER_ADMIN }}" \
--set-env-vars "MJ_APIKEY_PUBLIC=${{ secrets.MJ_APIKEY_PUBLIC }}" \
--set-env-vars "MJ_APIKEY_PRIVATE=${{ secrets.MJ_APIKEY_PRIVATE }}" \
--set-env-vars "GIT_HUB_TOKEN=${{ secrets.GIT_HUB_TOKEN }}" \
--set-env-vars "WEB_ADDRESS=${{ env.TARGET_URL }}" \
--set-env-vars "FROM_ADDRESS=kimberlinm@objectcomputing.com" \
--set-env-vars "FROM_NAME=Check-Ins - DEVELOP" \
--set-env-vars "^@^MICRONAUT_ENVIRONMENTS=dev,cloud,google,gcp" \
--platform "managed" \
--max-instances 2 \
--allow-unauthenticated
Loading