From eb851f927c9b639e2876f5bd1f923265be6f8740 Mon Sep 17 00:00:00 2001 From: Adam Lerman Date: Mon, 4 Nov 2024 23:28:14 +0000 Subject: [PATCH 1/6] add target to gitignore --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 7288a0b..d4b003e 100644 --- a/.gitignore +++ b/.gitignore @@ -12,4 +12,4 @@ chart/Chart.lock chart/charts/*.tgz chart/Chart.lock target/ -**/target` +**/target From 8bfae18282d08a8ac00f9cce4f9f886c7c0e1ed5 Mon Sep 17 00:00:00 2001 From: Adam Lerman Date: Fri, 1 Nov 2024 18:09:36 +0000 Subject: [PATCH 2/6] Rebase and only update actions and xml --- .github/workflows/build-images.yml | 17 +++++++++++ .github/workflows/settings.xml | 10 ++----- .github/workflows/tests.yml | 47 ++++-------------------------- bundler/pom.xml | 38 +++++------------------- feeder/pom.xml | 38 +++++------------------- ingest/pom.xml | 38 +++++------------------- 6 files changed, 48 insertions(+), 140 deletions(-) create mode 100644 .github/workflows/build-images.yml diff --git a/.github/workflows/build-images.yml b/.github/workflows/build-images.yml new file mode 100644 index 0000000..3d1f2f4 --- /dev/null +++ b/.github/workflows/build-images.yml @@ -0,0 +1,17 @@ +name: Build and Push Image + +on: + push: + paths-ignore: ['*.md', 'CODEOWNERS', 'LICENSE'] + tags: + - "**" + branches: + - 'main' + - 'release/version*' + workflow_dispatch: +jobs: + call-reusable-workflow: + uses: nationalsecurityagency/datawave/.github/workflows/microservice-build-image.yaml@integration + secrets: + USER_NAME: ${{ secrets.USER_NAME }} + ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/settings.xml b/.github/workflows/settings.xml index f4e0590..5f762d1 100644 --- a/.github/workflows/settings.xml +++ b/.github/workflows/settings.xml @@ -5,14 +5,8 @@ github-datawave - - - - Authorization - Bearer ${env.GITHUB_TOKEN} - - - + ${env.USER_NAME} + ${env.ACCESS_TOKEN} \ No newline at end of file diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5182d3a..d714b4d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -9,46 +9,9 @@ on: pull_request: paths-ignore: ['*.md', 'CODEOWNERS', 'LICENSE'] -env: - JAVA_VERSION: '11' - JAVA_DISTRIBUTION: 'zulu' #This is the default on v1 of the action - MAVEN_OPTS: "-Djansi.force=true -Dhttps.protocols=TLSv1.2 -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Djava.awt.headless=true -XX:ThreadStackSize=1m" - jobs: - # Runs the pom sorter and code formatter to ensure that the code - # is formatted and poms are sorted according to project rules. This - # will fail if the formatter makes any changes. - check-code-formatting: - runs-on: ubuntu-latest - steps: - - name: Checkout Code - uses: actions/checkout@v4 - - name: Set up JDK ${{ env.JAVA_VERSION }} - uses: actions/setup-java@v4 - with: - java-version: ${{ env.JAVA_VERSION }} - distribution: ${{ env.JAVA_DISTRIBUTION }} - cache: 'maven' - - name: Format code - run: | - mvn -s $GITHUB_WORKSPACE/.github/workflows/settings.xml -V -B -e clean formatter:format sortpom:sort -Pautoformat - git status - git diff-index --quiet HEAD || (echo "Error! There are modified files after formatting." && false) - env: - GITHUB_TOKEN: ${{ github.token }} - # Build the code and run the unit/integration tests. - build-and-test: - runs-on: ubuntu-latest - steps: - - name: Checkout Code - uses: actions/checkout@v4 - - name: Set up JDK ${{ env.JAVA_VERSION }} - uses: actions/setup-java@v4 - with: - java-version: ${{ env.JAVA_VERSION }} - distribution: ${{ env.JAVA_DISTRIBUTION }} - cache: 'maven' - - name: Build and Run Unit Tests - run: mvn -s $GITHUB_WORKSPACE/.github/workflows/settings.xml -V -B -e -Ddist clean verify - env: - GITHUB_TOKEN: ${{ github.token }} + call-reusable-workflow: + uses: nationalsecurityagency/datawave/.github/workflows/microservice-maven-tests.yaml@integration + secrets: + USER_NAME: ${{ secrets.USER_NAME }} + ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} \ No newline at end of file diff --git a/bundler/pom.xml b/bundler/pom.xml index b1f57fe..b75a444 100644 --- a/bundler/pom.xml +++ b/bundler/pom.xml @@ -57,41 +57,19 @@ docker + + + microservice-docker + + com.spotify docker-maven-plugin - - - build-image - - build - - package - - - tag-image - - tag - - install - - datawave/${project.artifactId}:${project.version} - ${docker.registry}datawave/${project.artifactId}:${project.version} - - - - push-image - - push - - deploy - - ${docker.registry}datawave/${project.artifactId}:${project.version} - - - + + ${docker.registry}nationalsecurityagency/datawave-bundler-service + diff --git a/feeder/pom.xml b/feeder/pom.xml index 5ee4989..bf13b46 100644 --- a/feeder/pom.xml +++ b/feeder/pom.xml @@ -53,41 +53,19 @@ docker + + + microservice-docker + + com.spotify docker-maven-plugin - - - build-image - - build - - package - - - tag-image - - tag - - install - - datawave/${project.artifactId}:${project.version} - ${docker.registry}datawave/${project.artifactId}:${project.version} - - - - push-image - - push - - deploy - - ${docker.registry}datawave/${project.artifactId}:${project.version} - - - + + ${docker.registry}nationalsecurityagency/datawave-feeder-service + diff --git a/ingest/pom.xml b/ingest/pom.xml index fe757e5..5c4c7c9 100644 --- a/ingest/pom.xml +++ b/ingest/pom.xml @@ -61,41 +61,19 @@ docker + + + microservice-docker + + com.spotify docker-maven-plugin - - - build-image - - build - - package - - - tag-image - - tag - - install - - datawave/${project.artifactId}:${project.version} - ${docker.registry}datawave/${project.artifactId}:${project.version} - - - - push-image - - push - - deploy - - ${docker.registry}datawave/${project.artifactId}:${project.version} - - - + + ${docker.registry}nationalsecurityagency/datawave-ingest-service + From 7b0434426dbd6a5b47fb85ad8d3194100ad8a302 Mon Sep 17 00:00:00 2001 From: Adam Lerman Date: Fri, 8 Nov 2024 12:55:13 +0000 Subject: [PATCH 3/6] Fix image names for using localhost --- bundler/pom.xml | 14 +++++++++++++- feeder/pom.xml | 14 +++++++++++++- ingest/pom.xml | 14 +++++++++++++- 3 files changed, 39 insertions(+), 3 deletions(-) diff --git a/bundler/pom.xml b/bundler/pom.xml index b75a444..5eef876 100644 --- a/bundler/pom.xml +++ b/bundler/pom.xml @@ -68,8 +68,20 @@ com.spotify docker-maven-plugin - ${docker.registry}nationalsecurityagency/datawave-bundler-service + ${docker.registry}nationalsecurityagency/datawave-bundler-service:${project.version} + + + push-image + + push + + deploy + + ${docker.registry}nationalsecurityagency/datawave-ingest-service:${project.version} + + + diff --git a/feeder/pom.xml b/feeder/pom.xml index bf13b46..ddfab65 100644 --- a/feeder/pom.xml +++ b/feeder/pom.xml @@ -64,8 +64,20 @@ com.spotify docker-maven-plugin - ${docker.registry}nationalsecurityagency/datawave-feeder-service + ${docker.registry}nationalsecurityagency/datawave-feeder-service:${project.version} + + + push-image + + push + + deploy + + ${docker.registry}nationalsecurityagency/datawave-ingest-service:${project.version} + + + diff --git a/ingest/pom.xml b/ingest/pom.xml index 5c4c7c9..c29e512 100644 --- a/ingest/pom.xml +++ b/ingest/pom.xml @@ -72,8 +72,20 @@ com.spotify docker-maven-plugin - ${docker.registry}nationalsecurityagency/datawave-ingest-service + ${docker.registry}nationalsecurityagency/datawave-ingest-service:${project.version} + + + push-image + + push + + deploy + + ${docker.registry}nationalsecurityagency/datawave-ingest-service:${project.version} + + + From 93b1ee4f3e47ca6028deb388bbaca57be6087d8d Mon Sep 17 00:00:00 2001 From: Adam Lerman Date: Fri, 8 Nov 2024 13:24:13 +0000 Subject: [PATCH 4/6] fix copy/pasta mistakes --- bundler/pom.xml | 2 +- feeder/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bundler/pom.xml b/bundler/pom.xml index 5eef876..b418800 100644 --- a/bundler/pom.xml +++ b/bundler/pom.xml @@ -78,7 +78,7 @@ deploy - ${docker.registry}nationalsecurityagency/datawave-ingest-service:${project.version} + ${docker.registry}nationalsecurityagency/datawave-bundler-service:${project.version} diff --git a/feeder/pom.xml b/feeder/pom.xml index ddfab65..7609aec 100644 --- a/feeder/pom.xml +++ b/feeder/pom.xml @@ -74,7 +74,7 @@ deploy - ${docker.registry}nationalsecurityagency/datawave-ingest-service:${project.version} + ${docker.registry}nationalsecurityagency/datawave-feeder-service:${project.version} From 1b9125dc8749482558d0678853dbf6bb2a297a3b Mon Sep 17 00:00:00 2001 From: Adam Lerman Date: Fri, 8 Nov 2024 13:29:52 +0000 Subject: [PATCH 5/6] move to install phase to match README --- bundler/pom.xml | 2 +- feeder/pom.xml | 2 +- ingest/pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bundler/pom.xml b/bundler/pom.xml index b418800..d859168 100644 --- a/bundler/pom.xml +++ b/bundler/pom.xml @@ -76,7 +76,7 @@ push - deploy + install ${docker.registry}nationalsecurityagency/datawave-bundler-service:${project.version} diff --git a/feeder/pom.xml b/feeder/pom.xml index 7609aec..47e2ccb 100644 --- a/feeder/pom.xml +++ b/feeder/pom.xml @@ -72,7 +72,7 @@ push - deploy + install ${docker.registry}nationalsecurityagency/datawave-feeder-service:${project.version} diff --git a/ingest/pom.xml b/ingest/pom.xml index c29e512..e49a90c 100644 --- a/ingest/pom.xml +++ b/ingest/pom.xml @@ -80,7 +80,7 @@ push - deploy + install ${docker.registry}nationalsecurityagency/datawave-ingest-service:${project.version} From c03f8159e6ecb6354d2aa0665884dbce93d0004a Mon Sep 17 00:00:00 2001 From: Adam Lerman Date: Fri, 8 Nov 2024 13:53:07 +0000 Subject: [PATCH 6/6] Update helm charts for new image paths --- feeder/src/main/chart/values.yaml | 2 +- ingest/src/main/chart/values.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/feeder/src/main/chart/values.yaml b/feeder/src/main/chart/values.yaml index a281717..6a75ec7 100644 --- a/feeder/src/main/chart/values.yaml +++ b/feeder/src/main/chart/values.yaml @@ -34,7 +34,7 @@ feeds: [] workingDir: / image: - repository: "datawave/feeder-service" + repository: "nationalsecurityagency/datawave-bundler-service" pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. tag: "" diff --git a/ingest/src/main/chart/values.yaml b/ingest/src/main/chart/values.yaml index a4ed2b1..0aedf1a 100644 --- a/ingest/src/main/chart/values.yaml +++ b/ingest/src/main/chart/values.yaml @@ -73,7 +73,7 @@ pools: [] # truststore: "" image: - repository: "datawave/ingest-service" + repository: "nationalsecurityagency/datawave-ingest-service" pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. tag: ""