From dc54b77e0ffb1bde383c01a4fda732d7312ee8bc Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Wed, 10 Jul 2024 13:51:18 -0700 Subject: [PATCH 001/107] Create workflow that tests proxy client against proxy server --- .github/workflows/build-proxy.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index 47ee21021..eba3aaa9a 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -8,7 +8,7 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Checkout Java client uses: actions/checkout@v2 @@ -21,5 +21,14 @@ jobs: - name: Build Java client run: mvn install - - name: Upload to JFrog - run: mvn deploy + - name: Run Aerospike server + run: docker run -d --name aerospike-server -p 3000:3000 aerospike/aerospike-server + + - name: Run Aerospike Proxy + run: docker run -d --name aerospike-proxy-4000 -p 4000:4000 aerospike.jfrog.io/docker/aerospike/aerospike-proxy-private: + + - name: Run tests + run: mvn test -Dtest=com.aerospike.proxy.tests.ProxyTests + + # - name: Upload to JFrog + # run: mvn deploy From c584ece501c34aac4f09e2ddb2c3e00920f9383c Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Wed, 10 Jul 2024 13:52:11 -0700 Subject: [PATCH 002/107] Add pr trigger --- .github/workflows/build-proxy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index eba3aaa9a..df5397fd6 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -1,6 +1,7 @@ name: Build and upload proxy client to JFrog on: + pull_request: push: branches: - stage From d8126677c45c56b98d4b82a1621df8404e9dab6d Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Wed, 10 Jul 2024 13:53:51 -0700 Subject: [PATCH 003/107] Remove invalid tag --- .github/workflows/build-proxy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index df5397fd6..9e45fca5b 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -26,7 +26,7 @@ jobs: run: docker run -d --name aerospike-server -p 3000:3000 aerospike/aerospike-server - name: Run Aerospike Proxy - run: docker run -d --name aerospike-proxy-4000 -p 4000:4000 aerospike.jfrog.io/docker/aerospike/aerospike-proxy-private: + run: docker run -d --name aerospike-proxy-4000 -p 4000:4000 aerospike.jfrog.io/docker/aerospike/aerospike-proxy-private - name: Run tests run: mvn test -Dtest=com.aerospike.proxy.tests.ProxyTests From f38fe70cac452ce4e1bcda9a7d4fd4a2bd624282 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Wed, 10 Jul 2024 13:56:56 -0700 Subject: [PATCH 004/107] Update checkout action --- .github/workflows/build-proxy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index 9e45fca5b..31497842b 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Checkout Java client - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up settings.xml for Maven uses: s4u/maven-settings-action@v2.8.0 From 3288e0a34aa08c46f2bf27147ec14463cafdaee3 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Thu, 11 Jul 2024 08:59:23 -0700 Subject: [PATCH 005/107] Authenticate with JFrog --- .github/workflows/build-proxy.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index 31497842b..29a6f5656 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -25,6 +25,8 @@ jobs: - name: Run Aerospike server run: docker run -d --name aerospike-server -p 3000:3000 aerospike/aerospike-server + - run: docker login aerospike.jfrog.io --username ${{ secrets.JFROG_USERNAME }} --password ${{ secrets.JFROG_DOCKER_TOKEN }} + - name: Run Aerospike Proxy run: docker run -d --name aerospike-proxy-4000 -p 4000:4000 aerospike.jfrog.io/docker/aerospike/aerospike-proxy-private From 4cb8aee041c30d9d7d94704c6be65a84762776cb Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Thu, 11 Jul 2024 09:03:04 -0700 Subject: [PATCH 006/107] Use the correct link --- .github/workflows/build-proxy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index 29a6f5656..e39abf795 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -28,7 +28,7 @@ jobs: - run: docker login aerospike.jfrog.io --username ${{ secrets.JFROG_USERNAME }} --password ${{ secrets.JFROG_DOCKER_TOKEN }} - name: Run Aerospike Proxy - run: docker run -d --name aerospike-proxy-4000 -p 4000:4000 aerospike.jfrog.io/docker/aerospike/aerospike-proxy-private + run: docker run -d --name aerospike-proxy-4000 -p 4000:4000 aerospike.jfrog.io/docker/aerospike-proxy-private - name: Run tests run: mvn test -Dtest=com.aerospike.proxy.tests.ProxyTests From ea97cafb19253261e7cd2cce93df0c7b3b027dfc Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Thu, 11 Jul 2024 13:56:16 -0700 Subject: [PATCH 007/107] Get latest tag without latest --- .github/workflows/build-proxy.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index e39abf795..0b3e973e2 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -27,8 +27,18 @@ jobs: - run: docker login aerospike.jfrog.io --username ${{ secrets.JFROG_USERNAME }} --password ${{ secrets.JFROG_DOCKER_TOKEN }} - - name: Run Aerospike Proxy - run: docker run -d --name aerospike-proxy-4000 -p 4000:4000 aerospike.jfrog.io/docker/aerospike-proxy-private + # TODO: change to use "latest" tag + + - name: Get all tags for proxy server Docker image + run: docker pull --all-tags aerospike.jfrog.io/docker/aerospike-proxy-private + + - name: Get the latest tag for proxy server + run: echo LATEST_TAG=$(docker images aerospike.jfrog.io/docker/aerospike/aerospike-proxy-private --format json | jq -r '.Tag' | head -n 1) >> $GITHUB_ENV + # Enables pipefail + shell: bash + + - name: Run Aerospike Proxy on latest tag + run: docker run -d --name aerospike-proxy -p 4000:4000 aerospike.jfrog.io/docker/aerospike-proxy-private:${{ env.LATEST_TAG }} - name: Run tests run: mvn test -Dtest=com.aerospike.proxy.tests.ProxyTests From 9f0cc8e01c2a57060dc942d3ce8e2642bc9a71a7 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Thu, 11 Jul 2024 13:59:57 -0700 Subject: [PATCH 008/107] Fix repo name --- .github/workflows/build-proxy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index 0b3e973e2..8effd53d9 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -33,7 +33,7 @@ jobs: run: docker pull --all-tags aerospike.jfrog.io/docker/aerospike-proxy-private - name: Get the latest tag for proxy server - run: echo LATEST_TAG=$(docker images aerospike.jfrog.io/docker/aerospike/aerospike-proxy-private --format json | jq -r '.Tag' | head -n 1) >> $GITHUB_ENV + run: echo LATEST_TAG=$(docker images aerospike.jfrog.io/docker/aerospike-proxy-private --format json | jq -r '.Tag' | head -n 1) >> $GITHUB_ENV # Enables pipefail shell: bash From 501fcc0956fcd3bd548df87fd6c836cf336a0004 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Thu, 11 Jul 2024 14:08:26 -0700 Subject: [PATCH 009/107] Try a different repo name --- .github/workflows/build-proxy.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index 8effd53d9..2ec70ab5a 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -30,15 +30,15 @@ jobs: # TODO: change to use "latest" tag - name: Get all tags for proxy server Docker image - run: docker pull --all-tags aerospike.jfrog.io/docker/aerospike-proxy-private + run: docker pull --all-tags aerospike.jfrog.io/docker/aerospike/aerospike-proxy-private - name: Get the latest tag for proxy server - run: echo LATEST_TAG=$(docker images aerospike.jfrog.io/docker/aerospike-proxy-private --format json | jq -r '.Tag' | head -n 1) >> $GITHUB_ENV + run: echo LATEST_TAG=$(docker images aerospike.jfrog.io/docker/aerospike/aerospike-proxy-private --format json | jq -r '.Tag' | head -n 1) >> $GITHUB_ENV # Enables pipefail shell: bash - name: Run Aerospike Proxy on latest tag - run: docker run -d --name aerospike-proxy -p 4000:4000 aerospike.jfrog.io/docker/aerospike-proxy-private:${{ env.LATEST_TAG }} + run: docker run -d --name aerospike-proxy -p 4000:4000 aerospike.jfrog.io/docker/aerospike/aerospike-proxy-private:${{ env.LATEST_TAG }} - name: Run tests run: mvn test -Dtest=com.aerospike.proxy.tests.ProxyTests From d3ee9de7526ae71bf118db493e60ab9bc9676ce2 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Thu, 11 Jul 2024 14:16:41 -0700 Subject: [PATCH 010/107] Print logs to debug containers, wait for servers to initialize --- .github/workflows/build-proxy.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index 2ec70ab5a..30c79c5a9 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -23,7 +23,7 @@ jobs: run: mvn install - name: Run Aerospike server - run: docker run -d --name aerospike-server -p 3000:3000 aerospike/aerospike-server + run: docker run -d --name aerospike -p 3000:3000 aerospike/aerospike-server - run: docker login aerospike.jfrog.io --username ${{ secrets.JFROG_USERNAME }} --password ${{ secrets.JFROG_DOCKER_TOKEN }} @@ -40,8 +40,14 @@ jobs: - name: Run Aerospike Proxy on latest tag run: docker run -d --name aerospike-proxy -p 4000:4000 aerospike.jfrog.io/docker/aerospike/aerospike-proxy-private:${{ env.LATEST_TAG }} + - name: Wait for native and proxy server to start + run: sleep 3 + - name: Run tests run: mvn test -Dtest=com.aerospike.proxy.tests.ProxyTests + - run: docker logs aerospike + - run: docker logs aerospike-proxy + # - name: Upload to JFrog # run: mvn deploy From 5c389c4abc2ea334272efd2b17c0b7677a99e874 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Thu, 11 Jul 2024 14:19:09 -0700 Subject: [PATCH 011/107] Always print container logs so we can see them when job fails --- .github/workflows/build-proxy.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index 30c79c5a9..4d5a3ae85 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -46,8 +46,11 @@ jobs: - name: Run tests run: mvn test -Dtest=com.aerospike.proxy.tests.ProxyTests - - run: docker logs aerospike - - run: docker logs aerospike-proxy + # TODO: For debugging. Remove later + - if: ${{ always() }} + run: docker logs aerospike + - if: ${{ always() }} + run: docker logs aerospike-proxy # - name: Upload to JFrog # run: mvn deploy From 77689306ff7cb408dfd0341649f78c2cb2fa8df5 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Thu, 11 Jul 2024 14:22:18 -0700 Subject: [PATCH 012/107] Show all containers' statuses --- .github/workflows/build-proxy.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index 4d5a3ae85..91da3fe0b 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -47,6 +47,8 @@ jobs: run: mvn test -Dtest=com.aerospike.proxy.tests.ProxyTests # TODO: For debugging. Remove later + - if: ${{ always() }} + run: docker container ps -a - if: ${{ always() }} run: docker logs aerospike - if: ${{ always() }} From 44ac1afe9df9b4230f0aef54fd2fb33469f70aea Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Thu, 11 Jul 2024 14:37:35 -0700 Subject: [PATCH 013/107] Run QEMU if image is based on arm --- .github/workflows/build-proxy.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index 91da3fe0b..02edeb230 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -37,6 +37,14 @@ jobs: # Enables pipefail shell: bash + - name: Get CPU architecture for Docker image + run: echo IMAGE_ARCH=$(docker image inspect --format json aerospike.jfrog.io/docker/aerospike/aerospike-proxy-private:${{ env.LATEST_TAG }} | | jq -r ".[0].Architecture") >> $GITHUB_ENV + shell: bash + + - name: If needed, use QEMU to emulate ARM + if: ${{ env.IMAGE_ARCH == 'arm64' }} + uses: docker/setup-qemu-action@v3 + - name: Run Aerospike Proxy on latest tag run: docker run -d --name aerospike-proxy -p 4000:4000 aerospike.jfrog.io/docker/aerospike/aerospike-proxy-private:${{ env.LATEST_TAG }} From 322f16cd10cf3cb4fe608cb88cb9fbe967fb2d66 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Thu, 11 Jul 2024 14:38:33 -0700 Subject: [PATCH 014/107] Only need to emulate arm64 --- .github/workflows/build-proxy.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index 02edeb230..f410c9011 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -44,6 +44,8 @@ jobs: - name: If needed, use QEMU to emulate ARM if: ${{ env.IMAGE_ARCH == 'arm64' }} uses: docker/setup-qemu-action@v3 + with: + platforms: arm64 - name: Run Aerospike Proxy on latest tag run: docker run -d --name aerospike-proxy -p 4000:4000 aerospike.jfrog.io/docker/aerospike/aerospike-proxy-private:${{ env.LATEST_TAG }} From 2c58b70bc63720955c3e5a44dd42f4cb7d1f55d7 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Thu, 11 Jul 2024 14:39:26 -0700 Subject: [PATCH 015/107] Fix syntax --- .github/workflows/build-proxy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index f410c9011..7e69045f4 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -38,7 +38,7 @@ jobs: shell: bash - name: Get CPU architecture for Docker image - run: echo IMAGE_ARCH=$(docker image inspect --format json aerospike.jfrog.io/docker/aerospike/aerospike-proxy-private:${{ env.LATEST_TAG }} | | jq -r ".[0].Architecture") >> $GITHUB_ENV + run: echo IMAGE_ARCH=$(docker image inspect --format json aerospike.jfrog.io/docker/aerospike/aerospike-proxy-private:${{ env.LATEST_TAG }} | jq -r ".[0].Architecture") >> $GITHUB_ENV shell: bash - name: If needed, use QEMU to emulate ARM From 6a029b4652b48022cfca403044891643388da0e5 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Thu, 11 Jul 2024 14:55:38 -0700 Subject: [PATCH 016/107] Run native server after proxy server --- .github/workflows/build-proxy.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index 7e69045f4..db3f26caf 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -22,9 +22,6 @@ jobs: - name: Build Java client run: mvn install - - name: Run Aerospike server - run: docker run -d --name aerospike -p 3000:3000 aerospike/aerospike-server - - run: docker login aerospike.jfrog.io --username ${{ secrets.JFROG_USERNAME }} --password ${{ secrets.JFROG_DOCKER_TOKEN }} # TODO: change to use "latest" tag @@ -50,6 +47,9 @@ jobs: - name: Run Aerospike Proxy on latest tag run: docker run -d --name aerospike-proxy -p 4000:4000 aerospike.jfrog.io/docker/aerospike/aerospike-proxy-private:${{ env.LATEST_TAG }} + - name: Run Aerospike server + run: docker run -d --name aerospike -p 3000:3000 aerospike/aerospike-server + - name: Wait for native and proxy server to start run: sleep 3 From 58540b533add5e25d016dcc81f2ee3d4fcfa1b84 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Thu, 11 Jul 2024 14:58:31 -0700 Subject: [PATCH 017/107] Skip if no tests were run --- .github/workflows/build-proxy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index db3f26caf..914ce4406 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -54,7 +54,7 @@ jobs: run: sleep 3 - name: Run tests - run: mvn test -Dtest=com.aerospike.proxy.tests.ProxyTests + run: mvn test -Dtest=com.aerospike.proxy.tests.ProxyTests -DfailIfNoTests=false # TODO: For debugging. Remove later - if: ${{ always() }} From 9cb492cf8d4e9b90d0a656b71753cae486f78095 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Fri, 12 Jul 2024 06:52:39 -0700 Subject: [PATCH 018/107] Use Github variable for JFrog repo name --- .github/workflows/build-proxy.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index 914ce4406..9c1dde60f 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -27,15 +27,15 @@ jobs: # TODO: change to use "latest" tag - name: Get all tags for proxy server Docker image - run: docker pull --all-tags aerospike.jfrog.io/docker/aerospike/aerospike-proxy-private + run: docker pull --all-tags ${{ vars.JFROG_PROXY_SERVER_DOCKER_REPO }} - name: Get the latest tag for proxy server - run: echo LATEST_TAG=$(docker images aerospike.jfrog.io/docker/aerospike/aerospike-proxy-private --format json | jq -r '.Tag' | head -n 1) >> $GITHUB_ENV + run: echo LATEST_TAG=$(docker images ${{ vars.JFROG_PROXY_SERVER_DOCKER_REPO }} --format json | jq -r '.Tag' | head -n 1) >> $GITHUB_ENV # Enables pipefail shell: bash - name: Get CPU architecture for Docker image - run: echo IMAGE_ARCH=$(docker image inspect --format json aerospike.jfrog.io/docker/aerospike/aerospike-proxy-private:${{ env.LATEST_TAG }} | jq -r ".[0].Architecture") >> $GITHUB_ENV + run: echo IMAGE_ARCH=$(docker image inspect --format json ${{ vars.JFROG_PROXY_SERVER_DOCKER_REPO }}:${{ env.LATEST_TAG }} | jq -r ".[0].Architecture") >> $GITHUB_ENV shell: bash - name: If needed, use QEMU to emulate ARM @@ -45,7 +45,7 @@ jobs: platforms: arm64 - name: Run Aerospike Proxy on latest tag - run: docker run -d --name aerospike-proxy -p 4000:4000 aerospike.jfrog.io/docker/aerospike/aerospike-proxy-private:${{ env.LATEST_TAG }} + run: docker run -d --name aerospike-proxy -p 4000:4000 ${{ vars.JFROG_PROXY_SERVER_DOCKER_REPO }}:${{ env.LATEST_TAG }} - name: Run Aerospike server run: docker run -d --name aerospike -p 3000:3000 aerospike/aerospike-server From dc9dcb7c9d632fc4acb80eb68a37c121161e317d Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Fri, 12 Jul 2024 09:43:19 -0700 Subject: [PATCH 019/107] Use aerospike-proxy.yml config file --- .github/workflows/build-proxy.yml | 4 +++- .github/workflows/test-configs/aerospike-proxy.yml | 0 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/test-configs/aerospike-proxy.yml diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index 9c1dde60f..7444bcaa8 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -45,7 +45,9 @@ jobs: platforms: arm64 - name: Run Aerospike Proxy on latest tag - run: docker run -d --name aerospike-proxy -p 4000:4000 ${{ vars.JFROG_PROXY_SERVER_DOCKER_REPO }}:${{ env.LATEST_TAG }} + # TODO: not sure why aerospike-proxy.yml couldn't be included in Docker image... + run: docker run -d --name aerospike-proxy -p 4000:4000 -v aerospike-proxy.yml:/etc/aerospike-proxy/aerospike-proxy.yml ${{ vars.JFROG_PROXY_SERVER_DOCKER_REPO }}:${{ env.LATEST_TAG }} + working-directory: .github/workflows/test-configs - name: Run Aerospike server run: docker run -d --name aerospike -p 3000:3000 aerospike/aerospike-server diff --git a/.github/workflows/test-configs/aerospike-proxy.yml b/.github/workflows/test-configs/aerospike-proxy.yml new file mode 100644 index 000000000..e69de29bb From 27d8cb9c5bb0af132b08e61fb023d0caf54e8100 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Fri, 12 Jul 2024 09:49:24 -0700 Subject: [PATCH 020/107] Forgot to add config file contents, use proper path for docker volume source --- .github/workflows/build-proxy.yml | 2 +- .../test-configs/aerospike-proxy.yml | 32 +++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index 7444bcaa8..02021820b 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -46,7 +46,7 @@ jobs: - name: Run Aerospike Proxy on latest tag # TODO: not sure why aerospike-proxy.yml couldn't be included in Docker image... - run: docker run -d --name aerospike-proxy -p 4000:4000 -v aerospike-proxy.yml:/etc/aerospike-proxy/aerospike-proxy.yml ${{ vars.JFROG_PROXY_SERVER_DOCKER_REPO }}:${{ env.LATEST_TAG }} + run: docker run -d --name aerospike-proxy -p 4000:4000 -v ./aerospike-proxy.yml:/etc/aerospike-proxy/aerospike-proxy.yml ${{ vars.JFROG_PROXY_SERVER_DOCKER_REPO }}:${{ env.LATEST_TAG }} working-directory: .github/workflows/test-configs - name: Run Aerospike server diff --git a/.github/workflows/test-configs/aerospike-proxy.yml b/.github/workflows/test-configs/aerospike-proxy.yml index e69de29bb..0ffa648c9 100644 --- a/.github/workflows/test-configs/aerospike-proxy.yml +++ b/.github/workflows/test-configs/aerospike-proxy.yml @@ -0,0 +1,32 @@ +# Change the configuration for your use case. +service: + # The proxy's listening ports, TLS and network interfaces. + ports: + 4000: { } + # The proxy's management API listening ports, TLS and network interfaces. + manage: + 4040: { } + # Target Aerospike cluster and embedded client configuration. + aerospike: + seeds: + - localhost: + port: 3000 + # Policy overrides for incoming transactions + policy-overrides: + batch-policy: + total-timeout: 30_000 + # + # Only if security should be enabled. + # + security: + credentials-store: + type: file + credentials-file: samples/credentials.yml + auth-token: + private-key: samples/tls/private_key.pem + public-key: samples/tls/public_key.pem + # The logging properties. + logging: + format: json + file: /var/log/aerospike-proxy/aerospike-proxy.log + enable-console-logging: true From 5bd5edfe9bf0e32fee7afd77a6afe0a8cf118926 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Fri, 12 Jul 2024 09:55:19 -0700 Subject: [PATCH 021/107] Fix spacing --- .../test-configs/aerospike-proxy.yml | 62 ++++++++++--------- 1 file changed, 32 insertions(+), 30 deletions(-) diff --git a/.github/workflows/test-configs/aerospike-proxy.yml b/.github/workflows/test-configs/aerospike-proxy.yml index 0ffa648c9..da067419e 100644 --- a/.github/workflows/test-configs/aerospike-proxy.yml +++ b/.github/workflows/test-configs/aerospike-proxy.yml @@ -1,32 +1,34 @@ # Change the configuration for your use case. service: - # The proxy's listening ports, TLS and network interfaces. - ports: - 4000: { } - # The proxy's management API listening ports, TLS and network interfaces. - manage: - 4040: { } - # Target Aerospike cluster and embedded client configuration. - aerospike: - seeds: - - localhost: - port: 3000 - # Policy overrides for incoming transactions - policy-overrides: - batch-policy: - total-timeout: 30_000 - # - # Only if security should be enabled. - # - security: - credentials-store: - type: file - credentials-file: samples/credentials.yml - auth-token: - private-key: samples/tls/private_key.pem - public-key: samples/tls/public_key.pem - # The logging properties. - logging: - format: json - file: /var/log/aerospike-proxy/aerospike-proxy.log - enable-console-logging: true + # The proxy's listening ports, TLS and network interfaces. + ports: + 4000: { } + # The proxy's management API listening ports, TLS and network interfaces. + manage: + 4040: { } + +# Target Aerospike cluster and embedded client configuration. +aerospike: + seeds: + - localhost: + port: 3000 + # Policy overrides for incoming transactions + policy-overrides: + batch-policy: + total-timeout: 30_000 +# +# Only if security should be enabled. +# +security: + credentials-store: + type: file + credentials-file: samples/credentials.yml + auth-token: + private-key: samples/tls/private_key.pem + public-key: samples/tls/public_key.pem + +# The logging properties. +logging: + format: json + file: /var/log/aerospike-proxy/aerospike-proxy.log + enable-console-logging: true From 203a719a22082b0b7f0cfeff1bb1be41a23a999a Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Fri, 12 Jul 2024 09:57:34 -0700 Subject: [PATCH 022/107] Disable security for now --- .github/workflows/build-proxy.yml | 15 +++++++++++++-- .../workflows/test-configs/aerospike-proxy.yml | 14 +++++++------- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index 02021820b..62d6c9498 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -66,5 +66,16 @@ jobs: - if: ${{ always() }} run: docker logs aerospike-proxy - # - name: Upload to JFrog - # run: mvn deploy + - name: Upload to JFrog + run: mvn deploy + + # TODO: create release bundle + # Based on https://github.com/citrusleaf/devops/blob/master/jfrog/vector/deploy-to-jfrog.sh + + - uses: jfrog/setup-jfrog-cli@v4 + with: + JF_URL: ${{ vars.JF_URL }} + JF_ACCESS_TOKEN: ${{ secrets.JF_ACCESS_TOKEN }} + + - name: Create release bundle from JFrog build + run: jf release-bundle-create aerospike-java-proxy-client diff --git a/.github/workflows/test-configs/aerospike-proxy.yml b/.github/workflows/test-configs/aerospike-proxy.yml index da067419e..981d467d1 100644 --- a/.github/workflows/test-configs/aerospike-proxy.yml +++ b/.github/workflows/test-configs/aerospike-proxy.yml @@ -19,13 +19,13 @@ aerospike: # # Only if security should be enabled. # -security: - credentials-store: - type: file - credentials-file: samples/credentials.yml - auth-token: - private-key: samples/tls/private_key.pem - public-key: samples/tls/public_key.pem +# security: +# credentials-store: +# type: file +# credentials-file: samples/credentials.yml +# auth-token: +# private-key: samples/tls/private_key.pem +# public-key: samples/tls/public_key.pem # The logging properties. logging: From f765054e459e4c612a145a0f8e9478e618c3106e Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Fri, 12 Jul 2024 10:08:45 -0700 Subject: [PATCH 023/107] Revert "Run native server after proxy server" This reverts commit 6a029b4652b48022cfca403044891643388da0e5. --- .github/workflows/build-proxy.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index 62d6c9498..78f1118a2 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -22,6 +22,9 @@ jobs: - name: Build Java client run: mvn install + - name: Run Aerospike server + run: docker run -d --name aerospike -p 3000:3000 aerospike/aerospike-server + - run: docker login aerospike.jfrog.io --username ${{ secrets.JFROG_USERNAME }} --password ${{ secrets.JFROG_DOCKER_TOKEN }} # TODO: change to use "latest" tag @@ -49,9 +52,6 @@ jobs: run: docker run -d --name aerospike-proxy -p 4000:4000 -v ./aerospike-proxy.yml:/etc/aerospike-proxy/aerospike-proxy.yml ${{ vars.JFROG_PROXY_SERVER_DOCKER_REPO }}:${{ env.LATEST_TAG }} working-directory: .github/workflows/test-configs - - name: Run Aerospike server - run: docker run -d --name aerospike -p 3000:3000 aerospike/aerospike-server - - name: Wait for native and proxy server to start run: sleep 3 From 357b1aecb47e0ed5974554e4be971cba975698f8 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Fri, 12 Jul 2024 10:13:55 -0700 Subject: [PATCH 024/107] Print proxy server logs a different way --- .github/workflows/build-proxy.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index 78f1118a2..777ddb7e3 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -63,8 +63,9 @@ jobs: run: docker container ps -a - if: ${{ always() }} run: docker logs aerospike + # TODO: docker logs prints nothing. Not sure why this happens - if: ${{ always() }} - run: docker logs aerospike-proxy + run: docker exec aerospike-proxy cat /var/log/aerospike-proxy/aerospike-proxy.log - name: Upload to JFrog run: mvn deploy From e3ab967b1844657531721011ba0e4d51556c37f8 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Fri, 12 Jul 2024 10:25:05 -0700 Subject: [PATCH 025/107] Don't run deploy code at the end, only use proxy server x86 build --- .github/workflows/build-proxy.yml | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index 777ddb7e3..2a876aa5e 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -32,8 +32,8 @@ jobs: - name: Get all tags for proxy server Docker image run: docker pull --all-tags ${{ vars.JFROG_PROXY_SERVER_DOCKER_REPO }} - - name: Get the latest tag for proxy server - run: echo LATEST_TAG=$(docker images ${{ vars.JFROG_PROXY_SERVER_DOCKER_REPO }} --format json | jq -r '.Tag' | head -n 1) >> $GITHUB_ENV + - name: Get the latest tag for proxy server for this CPU platform + run: echo LATEST_TAG=$(docker images --filter label="architecture=$(uname -m)" ${{ vars.JFROG_PROXY_SERVER_DOCKER_REPO }} --format json | jq -r '.Tag' | head -n 1) >> $GITHUB_ENV # Enables pipefail shell: bash @@ -41,12 +41,6 @@ jobs: run: echo IMAGE_ARCH=$(docker image inspect --format json ${{ vars.JFROG_PROXY_SERVER_DOCKER_REPO }}:${{ env.LATEST_TAG }} | jq -r ".[0].Architecture") >> $GITHUB_ENV shell: bash - - name: If needed, use QEMU to emulate ARM - if: ${{ env.IMAGE_ARCH == 'arm64' }} - uses: docker/setup-qemu-action@v3 - with: - platforms: arm64 - - name: Run Aerospike Proxy on latest tag # TODO: not sure why aerospike-proxy.yml couldn't be included in Docker image... run: docker run -d --name aerospike-proxy -p 4000:4000 -v ./aerospike-proxy.yml:/etc/aerospike-proxy/aerospike-proxy.yml ${{ vars.JFROG_PROXY_SERVER_DOCKER_REPO }}:${{ env.LATEST_TAG }} @@ -67,16 +61,16 @@ jobs: - if: ${{ always() }} run: docker exec aerospike-proxy cat /var/log/aerospike-proxy/aerospike-proxy.log - - name: Upload to JFrog - run: mvn deploy + # - name: Upload to JFrog + # run: mvn deploy # TODO: create release bundle # Based on https://github.com/citrusleaf/devops/blob/master/jfrog/vector/deploy-to-jfrog.sh - - uses: jfrog/setup-jfrog-cli@v4 - with: - JF_URL: ${{ vars.JF_URL }} - JF_ACCESS_TOKEN: ${{ secrets.JF_ACCESS_TOKEN }} + # - uses: jfrog/setup-jfrog-cli@v4 + # with: + # JF_URL: ${{ vars.JF_URL }} + # JF_ACCESS_TOKEN: ${{ secrets.JF_ACCESS_TOKEN }} - - name: Create release bundle from JFrog build - run: jf release-bundle-create aerospike-java-proxy-client + # - name: Create release bundle from JFrog build + # run: jf release-bundle-create aerospike-java-proxy-client From 216cff621884bf7e51dc8e3420c4d4daa59e0bf6 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Fri, 12 Jul 2024 10:32:47 -0700 Subject: [PATCH 026/107] Remove unnecessary step, comment --- .github/workflows/build-proxy.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index 2a876aa5e..75aa58008 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -32,15 +32,14 @@ jobs: - name: Get all tags for proxy server Docker image run: docker pull --all-tags ${{ vars.JFROG_PROXY_SERVER_DOCKER_REPO }} + # If we try to emulate aarch64 and run a proxy server Docker image designed for aarch64, the log file won't exist in the container + # i.e there won't be any output in `docker logs` for the proxy server. + # so we can't tell if the proxy server is running or not - name: Get the latest tag for proxy server for this CPU platform run: echo LATEST_TAG=$(docker images --filter label="architecture=$(uname -m)" ${{ vars.JFROG_PROXY_SERVER_DOCKER_REPO }} --format json | jq -r '.Tag' | head -n 1) >> $GITHUB_ENV # Enables pipefail shell: bash - - name: Get CPU architecture for Docker image - run: echo IMAGE_ARCH=$(docker image inspect --format json ${{ vars.JFROG_PROXY_SERVER_DOCKER_REPO }}:${{ env.LATEST_TAG }} | jq -r ".[0].Architecture") >> $GITHUB_ENV - shell: bash - - name: Run Aerospike Proxy on latest tag # TODO: not sure why aerospike-proxy.yml couldn't be included in Docker image... run: docker run -d --name aerospike-proxy -p 4000:4000 -v ./aerospike-proxy.yml:/etc/aerospike-proxy/aerospike-proxy.yml ${{ vars.JFROG_PROXY_SERVER_DOCKER_REPO }}:${{ env.LATEST_TAG }} From ee02c3a49dbd1fc9faf6d6554745859ff377c124 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Fri, 12 Jul 2024 10:37:56 -0700 Subject: [PATCH 027/107] Try a different test command --- .github/workflows/build-proxy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index 75aa58008..3dfa01edd 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -49,7 +49,7 @@ jobs: run: sleep 3 - name: Run tests - run: mvn test -Dtest=com.aerospike.proxy.tests.ProxyTests -DfailIfNoTests=false + run: mvn test -Dtest=com.aerospike.test.SuiteProxy -DfailIfNoTests=false # TODO: For debugging. Remove later - if: ${{ always() }} From f0f5e6ba6d736d4e2c9146e968e7a9734c6552dc Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Fri, 12 Jul 2024 10:44:47 -0700 Subject: [PATCH 028/107] Just run all suites since SuiteProxy isn't in a pom.xml --- .github/workflows/build-proxy.yml | 2 +- test/src/com/aerospike/test/SuiteAll.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index 3dfa01edd..118471bad 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -49,7 +49,7 @@ jobs: run: sleep 3 - name: Run tests - run: mvn test -Dtest=com.aerospike.test.SuiteProxy -DfailIfNoTests=false + run: mvn test -Dtest=com.aerospike.test.SuiteAll -DfailIfNoTests=false # TODO: For debugging. Remove later - if: ${{ always() }} diff --git a/test/src/com/aerospike/test/SuiteAll.java b/test/src/com/aerospike/test/SuiteAll.java index d3a3e6d40..8db02f3f5 100644 --- a/test/src/com/aerospike/test/SuiteAll.java +++ b/test/src/com/aerospike/test/SuiteAll.java @@ -23,6 +23,7 @@ @Suite.SuiteClasses({ SuiteSync.class, SuiteAsync.class + SuiteProxy.class }) public class SuiteAll { } From f37509637a76e62ce0f00576388c71b0e73cc198 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Fri, 12 Jul 2024 10:45:59 -0700 Subject: [PATCH 029/107] Fix syntax --- test/src/com/aerospike/test/SuiteAll.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/src/com/aerospike/test/SuiteAll.java b/test/src/com/aerospike/test/SuiteAll.java index 8db02f3f5..bb32dac49 100644 --- a/test/src/com/aerospike/test/SuiteAll.java +++ b/test/src/com/aerospike/test/SuiteAll.java @@ -22,7 +22,7 @@ @RunWith(Suite.class) @Suite.SuiteClasses({ SuiteSync.class, - SuiteAsync.class + SuiteAsync.class, SuiteProxy.class }) public class SuiteAll { From dd4160ea25bf6012405959d5820bc89892d85028 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Fri, 12 Jul 2024 10:48:20 -0700 Subject: [PATCH 030/107] Why are we skipping the tests? --- test/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/pom.xml b/test/pom.xml index 48de52c7b..f98e06ff4 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -14,7 +14,7 @@ aerospike-client-test - true + **/SuiteAll.class From 3668e9f48e7438ac147ee75cdb416d434d82bbfa Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Fri, 12 Jul 2024 10:49:43 -0700 Subject: [PATCH 031/107] Revert "Why are we skipping the tests?" This reverts commit dd4160ea25bf6012405959d5820bc89892d85028. --- test/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/pom.xml b/test/pom.xml index f98e06ff4..48de52c7b 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -14,7 +14,7 @@ aerospike-client-test - + true **/SuiteAll.class From 3fcaba0b5c5fee95f0a590ddfd92e81fc7599f9c Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Fri, 12 Jul 2024 10:57:47 -0700 Subject: [PATCH 032/107] Don't skip tests when running mvn test --- .github/workflows/build-proxy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index 118471bad..0987fe495 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -49,7 +49,7 @@ jobs: run: sleep 3 - name: Run tests - run: mvn test -Dtest=com.aerospike.test.SuiteAll -DfailIfNoTests=false + run: mvn test -Dtest=com.aerospike.test.SuiteAll -DfailIfNoTests=false -DskipTests=false # TODO: For debugging. Remove later - if: ${{ always() }} From ad0b74499a4e125506f6e985c68d7332e00737b2 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Fri, 12 Jul 2024 11:02:08 -0700 Subject: [PATCH 033/107] Only run proxy tests --- test/src/com/aerospike/test/SuiteAll.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/src/com/aerospike/test/SuiteAll.java b/test/src/com/aerospike/test/SuiteAll.java index bb32dac49..4d3797900 100644 --- a/test/src/com/aerospike/test/SuiteAll.java +++ b/test/src/com/aerospike/test/SuiteAll.java @@ -21,8 +21,8 @@ @RunWith(Suite.class) @Suite.SuiteClasses({ - SuiteSync.class, - SuiteAsync.class, + // SuiteSync.class, + // SuiteAsync.class, SuiteProxy.class }) public class SuiteAll { From 30e05d751503661ef3356249814c76e3ba2b7c6a Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Fri, 12 Jul 2024 12:48:26 -0700 Subject: [PATCH 034/107] Run proxy server on host so it can access native server through localhost --- .github/workflows/build-proxy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index 0987fe495..9a5ece35e 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -42,7 +42,7 @@ jobs: - name: Run Aerospike Proxy on latest tag # TODO: not sure why aerospike-proxy.yml couldn't be included in Docker image... - run: docker run -d --name aerospike-proxy -p 4000:4000 -v ./aerospike-proxy.yml:/etc/aerospike-proxy/aerospike-proxy.yml ${{ vars.JFROG_PROXY_SERVER_DOCKER_REPO }}:${{ env.LATEST_TAG }} + run: docker run -d --name aerospike-proxy -p 4000:4000 --network=host -v ./aerospike-proxy.yml:/etc/aerospike-proxy/aerospike-proxy.yml ${{ vars.JFROG_PROXY_SERVER_DOCKER_REPO }}:${{ env.LATEST_TAG }} working-directory: .github/workflows/test-configs - name: Wait for native and proxy server to start From 9deccaec97e9c9759ab44ff13ebb67b32db70cce Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Mon, 15 Jul 2024 10:46:33 -0700 Subject: [PATCH 035/107] See what happens --- .github/workflows/build-proxy.yml | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index 9a5ece35e..41d6ed82f 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -60,16 +60,26 @@ jobs: - if: ${{ always() }} run: docker exec aerospike-proxy cat /var/log/aerospike-proxy/aerospike-proxy.log - # - name: Upload to JFrog - # run: mvn deploy + - name: Upload to JFrog + run: mvn deploy # TODO: create release bundle # Based on https://github.com/citrusleaf/devops/blob/master/jfrog/vector/deploy-to-jfrog.sh - # - uses: jfrog/setup-jfrog-cli@v4 - # with: - # JF_URL: ${{ vars.JF_URL }} - # JF_ACCESS_TOKEN: ${{ secrets.JF_ACCESS_TOKEN }} + - uses: jfrog/setup-jfrog-cli@v4 + with: + JF_URL: ${{ vars.JF_URL }} + JF_ACCESS_TOKEN: ${{ secrets.JF_ACCESS_TOKEN }} + + - name: Get Java proxy client version + id: get-proxy-client-version + # TODO: find a way to do this via java ecosystem instead of using generic cli tools + run: echo version=$(xpath -q -e "//project/version/text()" pom.xml) >> $GITHUB_OUTPUT + + - name: Create release bundle from JFrog build + run: jf release-bundle-create --project=clients --signing-key=aerospike --sync --spec=./releasebundle-filespec.json aerospike-java-proxy-client ${{ steps.get-proxy-client-version.outputs.version }} + working-directory: .github/workflows - # - name: Create release bundle from JFrog build - # run: jf release-bundle-create aerospike-java-proxy-client + - name: Promote release bundle to DEV stage + run: jf release-bundle-promote --project=clients --signing-key=aerospike --sync aerospike-java-proxy-client ${{ steps.get-proxy-client-version.outputs.version }} DEV + working-directory: .github/workflows From 7b6fed12063fa68a703e0811e27c4b57f9f1d2a2 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Mon, 15 Jul 2024 10:46:52 -0700 Subject: [PATCH 036/107] Forgot --- .github/workflows/releasebundle-filespec.json | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .github/workflows/releasebundle-filespec.json diff --git a/.github/workflows/releasebundle-filespec.json b/.github/workflows/releasebundle-filespec.json new file mode 100644 index 000000000..1f1d4c3af --- /dev/null +++ b/.github/workflows/releasebundle-filespec.json @@ -0,0 +1,7 @@ +{ + "files": [ + { + "pattern": "~/.m2/repository/**/*.jar" + } + ] +} From fce3bff8fa4121f4eec8f83c044284bc7e97469d Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Mon, 15 Jul 2024 11:07:03 -0700 Subject: [PATCH 037/107] Configure pom.xml to upload to JFrog when deploying --- pom.xml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pom.xml b/pom.xml index 416961f65..e37ae39c1 100644 --- a/pom.xml +++ b/pom.xml @@ -170,4 +170,16 @@ --> + + + central + aerospike-artifactory-primary-0-releases + https://aerospike.jfrog.io/artifactory/clients-maven-dev-local + + + snapshots + aerospike-artifactory-primary-0-snapshots + https://aerospike.jfrog.io/artifactory/clients-maven-dev-local + + From 2d77728760e9d5dbdb6b4289c8f9f2715b2e28a0 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Mon, 15 Jul 2024 12:00:32 -0700 Subject: [PATCH 038/107] Fix --- .github/workflows/build-proxy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index 41d6ed82f..47d1d4dca 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -17,7 +17,7 @@ jobs: - name: Set up settings.xml for Maven uses: s4u/maven-settings-action@v2.8.0 with: - servers: '[{"id": "snapshots_private", "username": "${{ secrets.JFROG_USERNAME }}", "password": "${{ secrets.JFROG_MAVEN_TOKEN }}"}]' + servers: '[{"id": "snapshots", "username": "${{ secrets.JFROG_USERNAME }}", "password": "${{ secrets.JFROG_MAVEN_TOKEN }}"}]' - name: Build Java client run: mvn install From 296f978cb373d011dedfac14302fd88b7b5c9a88 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Mon, 15 Jul 2024 12:05:31 -0700 Subject: [PATCH 039/107] Use SNAPSHOT version to upload to snapshot repo --- benchmarks/pom.xml | 2 +- client/pom.xml | 2 +- examples/pom.xml | 2 +- pom.xml | 2 +- proxy/pom.xml | 2 +- test/pom.xml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/benchmarks/pom.xml b/benchmarks/pom.xml index 8a6be85fb..0bf58febb 100644 --- a/benchmarks/pom.xml +++ b/benchmarks/pom.xml @@ -6,7 +6,7 @@ com.aerospike aerospike-parent - 8.1.2 + 8.1.2-SNAPSHOT aerospike-benchmarks jar diff --git a/client/pom.xml b/client/pom.xml index cef2d4ecd..70a4711ae 100644 --- a/client/pom.xml +++ b/client/pom.xml @@ -6,7 +6,7 @@ com.aerospike aerospike-parent - 8.1.2 + 8.1.2-SNAPSHOT aerospike-client-jdk8 jar diff --git a/examples/pom.xml b/examples/pom.xml index b0ca631da..597babcca 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -6,7 +6,7 @@ com.aerospike aerospike-parent - 8.1.2 + 8.1.2-SNAPSHOT aerospike-examples jar diff --git a/pom.xml b/pom.xml index e37ae39c1..08897732e 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ com.aerospike aerospike-parent aerospike-parent - 8.1.2 + 8.1.2-SNAPSHOT pom https://github.com/aerospike/aerospike-client-java diff --git a/proxy/pom.xml b/proxy/pom.xml index 8d980ca2c..d8488ce33 100644 --- a/proxy/pom.xml +++ b/proxy/pom.xml @@ -6,7 +6,7 @@ com.aerospike aerospike-parent - 8.1.2 + 8.1.2-SNAPSHOT aerospike-proxy-client jar diff --git a/test/pom.xml b/test/pom.xml index 48de52c7b..5aca135dd 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -6,7 +6,7 @@ com.aerospike aerospike-parent - 8.1.2 + 8.1.2-SNAPSHOT aerospike-client-test jar From beeda4f5481885aaefad6a7513529f1969e2e793 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Mon, 15 Jul 2024 12:42:32 -0700 Subject: [PATCH 040/107] Install xpath --- .github/workflows/build-proxy.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index 47d1d4dca..def117d7f 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -71,6 +71,8 @@ jobs: JF_URL: ${{ vars.JF_URL }} JF_ACCESS_TOKEN: ${{ secrets.JF_ACCESS_TOKEN }} + - run: sudo apt install -y libxml-xpath-perl + - name: Get Java proxy client version id: get-proxy-client-version # TODO: find a way to do this via java ecosystem instead of using generic cli tools From 4834eb17605d0a02717113d8488f248dd88d1715 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Mon, 15 Jul 2024 12:48:20 -0700 Subject: [PATCH 041/107] release bundle cmds fail without url --- .github/workflows/build-proxy.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index def117d7f..eb34afe1c 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -79,9 +79,10 @@ jobs: run: echo version=$(xpath -q -e "//project/version/text()" pom.xml) >> $GITHUB_OUTPUT - name: Create release bundle from JFrog build - run: jf release-bundle-create --project=clients --signing-key=aerospike --sync --spec=./releasebundle-filespec.json aerospike-java-proxy-client ${{ steps.get-proxy-client-version.outputs.version }} + # Platform URL required for lifecycle commands (e.g release bundle management) + run: jf release-bundle-create --url ${{ vars.JF_URL }} --project=clients --signing-key=aerospike --sync --spec=./releasebundle-filespec.json aerospike-java-proxy-client ${{ steps.get-proxy-client-version.outputs.version }} working-directory: .github/workflows - name: Promote release bundle to DEV stage - run: jf release-bundle-promote --project=clients --signing-key=aerospike --sync aerospike-java-proxy-client ${{ steps.get-proxy-client-version.outputs.version }} DEV + run: jf release-bundle-promote --url ${{ vars.JF_URL }} --project=clients --signing-key=aerospike --sync aerospike-java-proxy-client ${{ steps.get-proxy-client-version.outputs.version }} DEV working-directory: .github/workflows From 36d7bb96a410b8f062150d9cbe65abe91e8c6f5f Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Mon, 15 Jul 2024 12:53:36 -0700 Subject: [PATCH 042/107] Try this fix --- .github/workflows/build-proxy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index eb34afe1c..841c659c9 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -80,9 +80,9 @@ jobs: - name: Create release bundle from JFrog build # Platform URL required for lifecycle commands (e.g release bundle management) - run: jf release-bundle-create --url ${{ vars.JF_URL }} --project=clients --signing-key=aerospike --sync --spec=./releasebundle-filespec.json aerospike-java-proxy-client ${{ steps.get-proxy-client-version.outputs.version }} + run: jf release-bundle-create --url "${{ vars.JF_URL }}" --project=clients --signing-key=aerospike --sync --spec=./releasebundle-filespec.json aerospike-java-proxy-client ${{ steps.get-proxy-client-version.outputs.version }} working-directory: .github/workflows - name: Promote release bundle to DEV stage - run: jf release-bundle-promote --url ${{ vars.JF_URL }} --project=clients --signing-key=aerospike --sync aerospike-java-proxy-client ${{ steps.get-proxy-client-version.outputs.version }} DEV + run: jf release-bundle-promote --url "${{ vars.JF_URL }}" --project=clients --signing-key=aerospike --sync aerospike-java-proxy-client ${{ steps.get-proxy-client-version.outputs.version }} DEV working-directory: .github/workflows From 04ca9d8ba04e1bd46dbb8c71b7c3e393aa760cbc Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Mon, 15 Jul 2024 12:57:38 -0700 Subject: [PATCH 043/107] Just embed JFrog url for now --- .github/workflows/build-proxy.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index 841c659c9..c8462a792 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -9,6 +9,8 @@ on: jobs: build: + env: + JFROG_URL: https://aerospike.jfrog.io runs-on: ubuntu-22.04 steps: - name: Checkout Java client @@ -68,7 +70,7 @@ jobs: - uses: jfrog/setup-jfrog-cli@v4 with: - JF_URL: ${{ vars.JF_URL }} + JF_URL: ${{ env.JFROG_URL }} JF_ACCESS_TOKEN: ${{ secrets.JF_ACCESS_TOKEN }} - run: sudo apt install -y libxml-xpath-perl @@ -80,9 +82,9 @@ jobs: - name: Create release bundle from JFrog build # Platform URL required for lifecycle commands (e.g release bundle management) - run: jf release-bundle-create --url "${{ vars.JF_URL }}" --project=clients --signing-key=aerospike --sync --spec=./releasebundle-filespec.json aerospike-java-proxy-client ${{ steps.get-proxy-client-version.outputs.version }} + run: jf release-bundle-create --url "${{ env.JFROG_URL }}" --project=clients --signing-key=aerospike --sync --spec=./releasebundle-filespec.json aerospike-java-proxy-client ${{ steps.get-proxy-client-version.outputs.version }} working-directory: .github/workflows - name: Promote release bundle to DEV stage - run: jf release-bundle-promote --url "${{ vars.JF_URL }}" --project=clients --signing-key=aerospike --sync aerospike-java-proxy-client ${{ steps.get-proxy-client-version.outputs.version }} DEV + run: jf release-bundle-promote --url "${{ env.JFROG_URL }}" --project=clients --signing-key=aerospike --sync aerospike-java-proxy-client ${{ steps.get-proxy-client-version.outputs.version }} DEV working-directory: .github/workflows From 9935899e453be0a3103b26258203ead6a689f718 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Mon, 15 Jul 2024 13:03:01 -0700 Subject: [PATCH 044/107] Fix --- .github/workflows/build-proxy.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index c8462a792..0bf040716 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -69,7 +69,7 @@ jobs: # Based on https://github.com/citrusleaf/devops/blob/master/jfrog/vector/deploy-to-jfrog.sh - uses: jfrog/setup-jfrog-cli@v4 - with: + env: JF_URL: ${{ env.JFROG_URL }} JF_ACCESS_TOKEN: ${{ secrets.JF_ACCESS_TOKEN }} @@ -82,9 +82,9 @@ jobs: - name: Create release bundle from JFrog build # Platform URL required for lifecycle commands (e.g release bundle management) - run: jf release-bundle-create --url "${{ env.JFROG_URL }}" --project=clients --signing-key=aerospike --sync --spec=./releasebundle-filespec.json aerospike-java-proxy-client ${{ steps.get-proxy-client-version.outputs.version }} + run: jf release-bundle-create --project=clients --signing-key=aerospike --sync --spec=./releasebundle-filespec.json aerospike-java-proxy-client ${{ steps.get-proxy-client-version.outputs.version }} working-directory: .github/workflows - name: Promote release bundle to DEV stage - run: jf release-bundle-promote --url "${{ env.JFROG_URL }}" --project=clients --signing-key=aerospike --sync aerospike-java-proxy-client ${{ steps.get-proxy-client-version.outputs.version }} DEV + run: jf release-bundle-promote --project=clients --signing-key=aerospike --sync aerospike-java-proxy-client ${{ steps.get-proxy-client-version.outputs.version }} DEV working-directory: .github/workflows From de9e498a1a606fec281769a9a0a55847b484d376 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Tue, 23 Jul 2024 17:04:22 -0700 Subject: [PATCH 045/107] Try using maven token and JFrog username --- .github/workflows/build-proxy.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index 0bf040716..6a95f034d 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -71,7 +71,8 @@ jobs: - uses: jfrog/setup-jfrog-cli@v4 env: JF_URL: ${{ env.JFROG_URL }} - JF_ACCESS_TOKEN: ${{ secrets.JF_ACCESS_TOKEN }} + JF_USER: ${{ secrets.JFROG_USERNAME }} + JF_PASSWORD: ${{ secrets.JFROG_MAVEN_TOKEN }} - run: sudo apt install -y libxml-xpath-perl From 1038b0c6f2be3b4abee953b81c74257518ab0db2 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Tue, 23 Jul 2024 17:19:07 -0700 Subject: [PATCH 046/107] Create JFrog build --- .github/workflows/build-proxy.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index 6a95f034d..bae2c7d21 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -81,6 +81,11 @@ jobs: # TODO: find a way to do this via java ecosystem instead of using generic cli tools run: echo version=$(xpath -q -e "//project/version/text()" pom.xml) >> $GITHUB_OUTPUT + # mvn deploy only uploads to JFrog but doesn't create a JFrog build + # TODO: run number doesn't increment when rerunning a workflow run + - name: Create JFrog build from uploaded artifacts + run: jf rt build-publish ${{ steps.get-proxy-client-version.outputs.version }} ${{ github.run_number }} + - name: Create release bundle from JFrog build # Platform URL required for lifecycle commands (e.g release bundle management) run: jf release-bundle-create --project=clients --signing-key=aerospike --sync --spec=./releasebundle-filespec.json aerospike-java-proxy-client ${{ steps.get-proxy-client-version.outputs.version }} From 74d7abc0952f2e5d6f7083d5dfe4da8f5947e7c6 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Wed, 24 Jul 2024 08:50:26 -0700 Subject: [PATCH 047/107] Use clients project for publishing build --- .github/workflows/build-proxy.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index bae2c7d21..32b870a02 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -73,6 +73,7 @@ jobs: JF_URL: ${{ env.JFROG_URL }} JF_USER: ${{ secrets.JFROG_USERNAME }} JF_PASSWORD: ${{ secrets.JFROG_MAVEN_TOKEN }} + JF_PROJECT: "clients" - run: sudo apt install -y libxml-xpath-perl @@ -88,9 +89,9 @@ jobs: - name: Create release bundle from JFrog build # Platform URL required for lifecycle commands (e.g release bundle management) - run: jf release-bundle-create --project=clients --signing-key=aerospike --sync --spec=./releasebundle-filespec.json aerospike-java-proxy-client ${{ steps.get-proxy-client-version.outputs.version }} + run: jf release-bundle-create --signing-key=aerospike --sync --spec=./releasebundle-filespec.json aerospike-java-proxy-client ${{ steps.get-proxy-client-version.outputs.version }} working-directory: .github/workflows - name: Promote release bundle to DEV stage - run: jf release-bundle-promote --project=clients --signing-key=aerospike --sync aerospike-java-proxy-client ${{ steps.get-proxy-client-version.outputs.version }} DEV + run: jf release-bundle-promote --signing-key=aerospike --sync aerospike-java-proxy-client ${{ steps.get-proxy-client-version.outputs.version }} DEV working-directory: .github/workflows From 14673c2254961d5f57ae77a2366528cf63ceff58 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Wed, 24 Jul 2024 09:05:41 -0700 Subject: [PATCH 048/107] Run whole maven workflow w/ one command --- .github/workflows/build-proxy.yml | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index 32b870a02..f04576111 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -21,9 +21,6 @@ jobs: with: servers: '[{"id": "snapshots", "username": "${{ secrets.JFROG_USERNAME }}", "password": "${{ secrets.JFROG_MAVEN_TOKEN }}"}]' - - name: Build Java client - run: mvn install - - name: Run Aerospike server run: docker run -d --name aerospike -p 3000:3000 aerospike/aerospike-server @@ -50,8 +47,15 @@ jobs: - name: Wait for native and proxy server to start run: sleep 3 - - name: Run tests - run: mvn test -Dtest=com.aerospike.test.SuiteAll -DfailIfNoTests=false -DskipTests=false + - uses: jfrog/setup-jfrog-cli@v4 + env: + JF_URL: ${{ env.JFROG_URL }} + JF_USER: ${{ secrets.JFROG_USERNAME }} + JF_PASSWORD: ${{ secrets.JFROG_MAVEN_TOKEN }} + JF_PROJECT: "clients" + + - name: Run Maven workflow + run: jf rt mvn install -Dtest=com.aerospike.test.SuiteAll -DfailIfNoTests=false -DskipTests=false # TODO: For debugging. Remove later - if: ${{ always() }} @@ -62,19 +66,9 @@ jobs: - if: ${{ always() }} run: docker exec aerospike-proxy cat /var/log/aerospike-proxy/aerospike-proxy.log - - name: Upload to JFrog - run: mvn deploy - # TODO: create release bundle # Based on https://github.com/citrusleaf/devops/blob/master/jfrog/vector/deploy-to-jfrog.sh - - uses: jfrog/setup-jfrog-cli@v4 - env: - JF_URL: ${{ env.JFROG_URL }} - JF_USER: ${{ secrets.JFROG_USERNAME }} - JF_PASSWORD: ${{ secrets.JFROG_MAVEN_TOKEN }} - JF_PROJECT: "clients" - - run: sudo apt install -y libxml-xpath-perl - name: Get Java proxy client version From 2d3b694696c10d355c768645ca20a2bef686e549 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Wed, 24 Jul 2024 09:38:50 -0700 Subject: [PATCH 049/107] Configure maven first --- .github/workflows/build-proxy.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index f04576111..cf0b9e8a3 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -54,8 +54,10 @@ jobs: JF_PASSWORD: ${{ secrets.JFROG_MAVEN_TOKEN }} JF_PROJECT: "clients" + - run: jf mvn-config + - name: Run Maven workflow - run: jf rt mvn install -Dtest=com.aerospike.test.SuiteAll -DfailIfNoTests=false -DskipTests=false + run: jf mvn install -Dtest=com.aerospike.test.SuiteAll -DfailIfNoTests=false -DskipTests=false # TODO: For debugging. Remove later - if: ${{ always() }} From 80a0e52b693d9535b1e9ca03ed240a690f567f77 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Wed, 24 Jul 2024 09:56:22 -0700 Subject: [PATCH 050/107] Run deploy to call previous steps in lifecycle --- .github/workflows/build-proxy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index cf0b9e8a3..31594ba36 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -54,10 +54,10 @@ jobs: JF_PASSWORD: ${{ secrets.JFROG_MAVEN_TOKEN }} JF_PROJECT: "clients" - - run: jf mvn-config + - run: jf mvn-config - name: Run Maven workflow - run: jf mvn install -Dtest=com.aerospike.test.SuiteAll -DfailIfNoTests=false -DskipTests=false + run: jf mvn deploy -Dtest=com.aerospike.test.SuiteAll -DfailIfNoTests=false -DskipTests=false # TODO: For debugging. Remove later - if: ${{ always() }} From 2691b996693132cc79eae11208982ecb6aec05ef Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Wed, 24 Jul 2024 10:06:57 -0700 Subject: [PATCH 051/107] try unsetting to use default build info json --- .github/workflows/build-proxy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index 31594ba36..094e3c92d 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -81,7 +81,7 @@ jobs: # mvn deploy only uploads to JFrog but doesn't create a JFrog build # TODO: run number doesn't increment when rerunning a workflow run - name: Create JFrog build from uploaded artifacts - run: jf rt build-publish ${{ steps.get-proxy-client-version.outputs.version }} ${{ github.run_number }} + run: jf rt build-publish - name: Create release bundle from JFrog build # Platform URL required for lifecycle commands (e.g release bundle management) From 7e0cd04678419bc8f09ba1f230ca1b6ba778df32 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Wed, 24 Jul 2024 10:23:24 -0700 Subject: [PATCH 052/107] Configure repos --- .github/workflows/build-proxy.yml | 3 +-- .github/workflows/releasebundle-filespec.json | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index 094e3c92d..78af967b1 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -54,7 +54,7 @@ jobs: JF_PASSWORD: ${{ secrets.JFROG_MAVEN_TOKEN }} JF_PROJECT: "clients" - - run: jf mvn-config + - run: jf mvn-config --repo-deploy-releases https://aerospike.jfrog.io/artifactory/clients-maven-dev-local --repo-deploy-snapshots https://aerospike.jfrog.io/artifactory/clients-maven-dev-local - name: Run Maven workflow run: jf mvn deploy -Dtest=com.aerospike.test.SuiteAll -DfailIfNoTests=false -DskipTests=false @@ -79,7 +79,6 @@ jobs: run: echo version=$(xpath -q -e "//project/version/text()" pom.xml) >> $GITHUB_OUTPUT # mvn deploy only uploads to JFrog but doesn't create a JFrog build - # TODO: run number doesn't increment when rerunning a workflow run - name: Create JFrog build from uploaded artifacts run: jf rt build-publish diff --git a/.github/workflows/releasebundle-filespec.json b/.github/workflows/releasebundle-filespec.json index 1f1d4c3af..01cf6aa23 100644 --- a/.github/workflows/releasebundle-filespec.json +++ b/.github/workflows/releasebundle-filespec.json @@ -1,7 +1,7 @@ { "files": [ { - "pattern": "~/.m2/repository/**/*.jar" + "pattern": "clients-maven-dev-local/" } ] } From b11d7fe73c972eedd7991e9b45e26c6bd6d21e52 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Wed, 24 Jul 2024 10:33:08 -0700 Subject: [PATCH 053/107] fix repo --- .github/workflows/build-proxy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index 78af967b1..eadb65103 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -54,7 +54,7 @@ jobs: JF_PASSWORD: ${{ secrets.JFROG_MAVEN_TOKEN }} JF_PROJECT: "clients" - - run: jf mvn-config --repo-deploy-releases https://aerospike.jfrog.io/artifactory/clients-maven-dev-local --repo-deploy-snapshots https://aerospike.jfrog.io/artifactory/clients-maven-dev-local + - run: jf mvn-config --repo-deploy-releases clients-maven-dev-local --repo-deploy-snapshots clients-maven-dev-local - name: Run Maven workflow run: jf mvn deploy -Dtest=com.aerospike.test.SuiteAll -DfailIfNoTests=false -DskipTests=false From b58a2549ca4d9d858d09c23b9eeaa54bc21726c1 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Wed, 24 Jul 2024 15:43:41 -0700 Subject: [PATCH 054/107] Set up file spec properly --- .github/workflows/build-proxy.yml | 3 +++ .github/workflows/releasebundle-filespec.json | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index eadb65103..b2433e8d0 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -82,6 +82,9 @@ jobs: - name: Create JFrog build from uploaded artifacts run: jf rt build-publish + - name: Create file spec for release bundle + run: cat releasebundle-filespec.json | jq '.files[0].pattern = "clients-maven-dev-local/com/aerospike/*/${{ steps.get-proxy-client-version.outputs.version }}"/*' | sponge releasebundle-filespec.json + - name: Create release bundle from JFrog build # Platform URL required for lifecycle commands (e.g release bundle management) run: jf release-bundle-create --signing-key=aerospike --sync --spec=./releasebundle-filespec.json aerospike-java-proxy-client ${{ steps.get-proxy-client-version.outputs.version }} diff --git a/.github/workflows/releasebundle-filespec.json b/.github/workflows/releasebundle-filespec.json index 01cf6aa23..37cea9cf3 100644 --- a/.github/workflows/releasebundle-filespec.json +++ b/.github/workflows/releasebundle-filespec.json @@ -1,7 +1,7 @@ { "files": [ { - "pattern": "clients-maven-dev-local/" + "pattern": "" } ] } From b54c7c7014e6b73fbe7eeb0fc6243e1cadcaed26 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Wed, 24 Jul 2024 15:47:11 -0700 Subject: [PATCH 055/107] fix --- .github/workflows/build-proxy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index b2433e8d0..b7e166cec 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -83,7 +83,7 @@ jobs: run: jf rt build-publish - name: Create file spec for release bundle - run: cat releasebundle-filespec.json | jq '.files[0].pattern = "clients-maven-dev-local/com/aerospike/*/${{ steps.get-proxy-client-version.outputs.version }}"/*' | sponge releasebundle-filespec.json + run: cat releasebundle-filespec.json | jq '.files[0].pattern = "clients-maven-dev-local/com/aerospike/*/${{ steps.get-proxy-client-version.outputs.version }}/*"' | sponge releasebundle-filespec.json - name: Create release bundle from JFrog build # Platform URL required for lifecycle commands (e.g release bundle management) From 2219a3517d68151e9d29911e7d0f344b0ce63731 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Wed, 24 Jul 2024 15:50:38 -0700 Subject: [PATCH 056/107] install --- .github/workflows/build-proxy.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index b7e166cec..87b5ca073 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -82,6 +82,8 @@ jobs: - name: Create JFrog build from uploaded artifacts run: jf rt build-publish + - run: sudo apt install -y moreutils + - name: Create file spec for release bundle run: cat releasebundle-filespec.json | jq '.files[0].pattern = "clients-maven-dev-local/com/aerospike/*/${{ steps.get-proxy-client-version.outputs.version }}/*"' | sponge releasebundle-filespec.json From 4b6a97693978a078cca8e9f58b446fdc6023cbc9 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Wed, 24 Jul 2024 15:54:33 -0700 Subject: [PATCH 057/107] fix --- .github/workflows/build-proxy.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index 87b5ca073..61ea98481 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -86,6 +86,8 @@ jobs: - name: Create file spec for release bundle run: cat releasebundle-filespec.json | jq '.files[0].pattern = "clients-maven-dev-local/com/aerospike/*/${{ steps.get-proxy-client-version.outputs.version }}/*"' | sponge releasebundle-filespec.json + working-directory: .github/workflows + shell: bash - name: Create release bundle from JFrog build # Platform URL required for lifecycle commands (e.g release bundle management) From 369cc60e3e7bd8a7ab5fc88d708114e0a977a236 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Thu, 25 Jul 2024 07:43:06 -0700 Subject: [PATCH 058/107] Print build info json --- .github/workflows/build-proxy.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index 61ea98481..4d7842921 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -59,6 +59,8 @@ jobs: - name: Run Maven workflow run: jf mvn deploy -Dtest=com.aerospike.test.SuiteAll -DfailIfNoTests=false -DskipTests=false + - run: cat target/build-info.json + # TODO: For debugging. Remove later - if: ${{ always() }} run: docker container ps -a From 978f3dcc9429a88cf26adc3d726f2254ca072a7c Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Thu, 25 Jul 2024 08:50:07 -0700 Subject: [PATCH 059/107] Use only the latest build in the release bundle --- .github/workflows/build-proxy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index 4d7842921..f1952015d 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -87,7 +87,7 @@ jobs: - run: sudo apt install -y moreutils - name: Create file spec for release bundle - run: cat releasebundle-filespec.json | jq '.files[0].pattern = "clients-maven-dev-local/com/aerospike/*/${{ steps.get-proxy-client-version.outputs.version }}/*"' | sponge releasebundle-filespec.json + run: cat releasebundle-filespec.json | jq '.files[0].build = "${{ steps.get-proxy-client-version.outputs.version }}/LATEST"' | sponge releasebundle-filespec.json working-directory: .github/workflows shell: bash From a087394e74c3a3c10a821d222ae18d2a5d37d774 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Thu, 25 Jul 2024 08:54:21 -0700 Subject: [PATCH 060/107] Fix build name --- .github/workflows/build-proxy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index f1952015d..01f44eac6 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -87,7 +87,7 @@ jobs: - run: sudo apt install -y moreutils - name: Create file spec for release bundle - run: cat releasebundle-filespec.json | jq '.files[0].build = "${{ steps.get-proxy-client-version.outputs.version }}/LATEST"' | sponge releasebundle-filespec.json + run: cat releasebundle-filespec.json | jq '.files[0].build = "${{ github.workflow }}/LATEST"' | sponge releasebundle-filespec.json working-directory: .github/workflows shell: bash From d6ea7f06a310a94d83f1c2dd8f2005e884cb5002 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Thu, 25 Jul 2024 09:11:09 -0700 Subject: [PATCH 061/107] omit latest --- .github/workflows/build-proxy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index 01f44eac6..4c27078ec 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -87,7 +87,7 @@ jobs: - run: sudo apt install -y moreutils - name: Create file spec for release bundle - run: cat releasebundle-filespec.json | jq '.files[0].build = "${{ github.workflow }}/LATEST"' | sponge releasebundle-filespec.json + run: cat releasebundle-filespec.json | jq '.files[0].build = "${{ github.workflow }}"' | sponge releasebundle-filespec.json working-directory: .github/workflows shell: bash From 8a29ff025b74b557d6a9dbe37ca3bc3c2b90d396 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Thu, 25 Jul 2024 09:25:58 -0700 Subject: [PATCH 062/107] Change the build name to something valid --- .github/workflows/build-proxy.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index 4c27078ec..e54413fdd 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -56,8 +56,15 @@ jobs: - run: jf mvn-config --repo-deploy-releases clients-maven-dev-local --repo-deploy-snapshots clients-maven-dev-local + - run: sudo apt install -y libxml-xpath-perl + + - name: Get Java proxy client version + id: get-proxy-client-version + # TODO: find a way to do this via java ecosystem instead of using generic cli tools + run: echo version=$(xpath -q -e "//project/version/text()" pom.xml) >> $GITHUB_OUTPUT + - name: Run Maven workflow - run: jf mvn deploy -Dtest=com.aerospike.test.SuiteAll -DfailIfNoTests=false -DskipTests=false + run: jf mvn deploy -Dtest=com.aerospike.test.SuiteAll -DfailIfNoTests=false -DskipTests=false --build-name=${{ steps.get-proxy-client-version.outputs.version }} - run: cat target/build-info.json @@ -73,13 +80,6 @@ jobs: # TODO: create release bundle # Based on https://github.com/citrusleaf/devops/blob/master/jfrog/vector/deploy-to-jfrog.sh - - run: sudo apt install -y libxml-xpath-perl - - - name: Get Java proxy client version - id: get-proxy-client-version - # TODO: find a way to do this via java ecosystem instead of using generic cli tools - run: echo version=$(xpath -q -e "//project/version/text()" pom.xml) >> $GITHUB_OUTPUT - # mvn deploy only uploads to JFrog but doesn't create a JFrog build - name: Create JFrog build from uploaded artifacts run: jf rt build-publish @@ -87,7 +87,7 @@ jobs: - run: sudo apt install -y moreutils - name: Create file spec for release bundle - run: cat releasebundle-filespec.json | jq '.files[0].build = "${{ github.workflow }}"' | sponge releasebundle-filespec.json + run: cat releasebundle-filespec.json | jq '.files[0].build = "${{ steps.get-proxy-client-version.outputs.version }}/LATEST"' | sponge releasebundle-filespec.json working-directory: .github/workflows shell: bash From 4d36873c0f971d27075626358633bba09e0cabe1 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Thu, 25 Jul 2024 09:31:46 -0700 Subject: [PATCH 063/107] Build number is required --- .github/workflows/build-proxy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index e54413fdd..611de4ffc 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -64,7 +64,7 @@ jobs: run: echo version=$(xpath -q -e "//project/version/text()" pom.xml) >> $GITHUB_OUTPUT - name: Run Maven workflow - run: jf mvn deploy -Dtest=com.aerospike.test.SuiteAll -DfailIfNoTests=false -DskipTests=false --build-name=${{ steps.get-proxy-client-version.outputs.version }} + run: jf mvn deploy -Dtest=com.aerospike.test.SuiteAll -DfailIfNoTests=false -DskipTests=false --build-name=${{ steps.get-proxy-client-version.outputs.version }} --build-number=${{ github.run_number }} - run: cat target/build-info.json From 9884fdece4be975011ea463b06fdf0e0f2a0c577 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Thu, 25 Jul 2024 09:55:38 -0700 Subject: [PATCH 064/107] Be specific about build details --- .github/workflows/build-proxy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index 611de4ffc..f133b5952 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -82,7 +82,7 @@ jobs: # mvn deploy only uploads to JFrog but doesn't create a JFrog build - name: Create JFrog build from uploaded artifacts - run: jf rt build-publish + run: jf rt build-publish --build-name=${{ steps.get-proxy-client-version.outputs.version }} --build-number=${{ github.run_number }} - run: sudo apt install -y moreutils From 8cf5e64bd6626fa7afb8f555db74f53019894929 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Thu, 25 Jul 2024 09:59:25 -0700 Subject: [PATCH 065/107] fix --- .github/workflows/build-proxy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index f133b5952..caf9b6dcd 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -82,7 +82,7 @@ jobs: # mvn deploy only uploads to JFrog but doesn't create a JFrog build - name: Create JFrog build from uploaded artifacts - run: jf rt build-publish --build-name=${{ steps.get-proxy-client-version.outputs.version }} --build-number=${{ github.run_number }} + run: jf rt build-publish ${{ steps.get-proxy-client-version.outputs.version }} ${{ github.run_number }} - run: sudo apt install -y moreutils From 746a59c8555e95d780d7433034d5ecdd0bf432f6 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Thu, 25 Jul 2024 10:10:10 -0700 Subject: [PATCH 066/107] Try another build number --- .github/workflows/build-proxy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index caf9b6dcd..333089921 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -87,7 +87,7 @@ jobs: - run: sudo apt install -y moreutils - name: Create file spec for release bundle - run: cat releasebundle-filespec.json | jq '.files[0].build = "${{ steps.get-proxy-client-version.outputs.version }}/LATEST"' | sponge releasebundle-filespec.json + run: cat releasebundle-filespec.json | jq '.files[0].build = "${{ steps.get-proxy-client-version.outputs.version }}/${{ github.run_number }}"' | sponge releasebundle-filespec.json working-directory: .github/workflows shell: bash From 8b6ce8a9b1f6764b39142e184861734ddc9f6fbe Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Thu, 25 Jul 2024 10:17:58 -0700 Subject: [PATCH 067/107] Only look for artifacts in this repo --- .github/workflows/build-proxy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index 333089921..0187b6e96 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -87,7 +87,7 @@ jobs: - run: sudo apt install -y moreutils - name: Create file spec for release bundle - run: cat releasebundle-filespec.json | jq '.files[0].build = "${{ steps.get-proxy-client-version.outputs.version }}/${{ github.run_number }}"' | sponge releasebundle-filespec.json + run: cat releasebundle-filespec.json | jq '.files[0].build = "${{ steps.get-proxy-client-version.outputs.version }}/${{ github.run_number }}"' | jq '.files[0].pattern = "clients-maven-dev-local/**/*"' | sponge releasebundle-filespec.json working-directory: .github/workflows shell: bash From c53386ab722d76ffbc5efb39580d74cee59c8d04 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Thu, 25 Jul 2024 10:23:45 -0700 Subject: [PATCH 068/107] Insert pattern first --- .github/workflows/build-proxy.yml | 5 ++++- .github/workflows/releasebundle-filespec.json | 1 - 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index 0187b6e96..7ee3c5fe3 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -87,10 +87,13 @@ jobs: - run: sudo apt install -y moreutils - name: Create file spec for release bundle - run: cat releasebundle-filespec.json | jq '.files[0].build = "${{ steps.get-proxy-client-version.outputs.version }}/${{ github.run_number }}"' | jq '.files[0].pattern = "clients-maven-dev-local/**/*"' | sponge releasebundle-filespec.json + run: cat releasebundle-filespec.json | jq '.files[0].pattern = "clients-maven-dev-local/**/*"' | jq '.files[0].build = "${{ steps.get-proxy-client-version.outputs.version }}/${{ github.run_number }}"' | sponge releasebundle-filespec.json working-directory: .github/workflows shell: bash + - run: cat releasebundle-filespec.json + working-directory: .github/workflows + - name: Create release bundle from JFrog build # Platform URL required for lifecycle commands (e.g release bundle management) run: jf release-bundle-create --signing-key=aerospike --sync --spec=./releasebundle-filespec.json aerospike-java-proxy-client ${{ steps.get-proxy-client-version.outputs.version }} diff --git a/.github/workflows/releasebundle-filespec.json b/.github/workflows/releasebundle-filespec.json index 37cea9cf3..fa564aa16 100644 --- a/.github/workflows/releasebundle-filespec.json +++ b/.github/workflows/releasebundle-filespec.json @@ -1,7 +1,6 @@ { "files": [ { - "pattern": "" } ] } From 5ca16720659182f6f113b77b96e0cd9fa5564a84 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Thu, 25 Jul 2024 11:07:10 -0700 Subject: [PATCH 069/107] Revert "Insert pattern first" This reverts commit c53386ab722d76ffbc5efb39580d74cee59c8d04. --- .github/workflows/build-proxy.yml | 5 +---- .github/workflows/releasebundle-filespec.json | 1 + 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index 7ee3c5fe3..0187b6e96 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -87,13 +87,10 @@ jobs: - run: sudo apt install -y moreutils - name: Create file spec for release bundle - run: cat releasebundle-filespec.json | jq '.files[0].pattern = "clients-maven-dev-local/**/*"' | jq '.files[0].build = "${{ steps.get-proxy-client-version.outputs.version }}/${{ github.run_number }}"' | sponge releasebundle-filespec.json + run: cat releasebundle-filespec.json | jq '.files[0].build = "${{ steps.get-proxy-client-version.outputs.version }}/${{ github.run_number }}"' | jq '.files[0].pattern = "clients-maven-dev-local/**/*"' | sponge releasebundle-filespec.json working-directory: .github/workflows shell: bash - - run: cat releasebundle-filespec.json - working-directory: .github/workflows - - name: Create release bundle from JFrog build # Platform URL required for lifecycle commands (e.g release bundle management) run: jf release-bundle-create --signing-key=aerospike --sync --spec=./releasebundle-filespec.json aerospike-java-proxy-client ${{ steps.get-proxy-client-version.outputs.version }} diff --git a/.github/workflows/releasebundle-filespec.json b/.github/workflows/releasebundle-filespec.json index fa564aa16..37cea9cf3 100644 --- a/.github/workflows/releasebundle-filespec.json +++ b/.github/workflows/releasebundle-filespec.json @@ -1,6 +1,7 @@ { "files": [ { + "pattern": "" } ] } From 1ac7c3e2c965ba44ed0c3a10a83cd97d0f70b1cf Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Thu, 25 Jul 2024 11:07:14 -0700 Subject: [PATCH 070/107] Revert "Only look for artifacts in this repo" This reverts commit 8b6ce8a9b1f6764b39142e184861734ddc9f6fbe. --- .github/workflows/build-proxy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index 0187b6e96..333089921 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -87,7 +87,7 @@ jobs: - run: sudo apt install -y moreutils - name: Create file spec for release bundle - run: cat releasebundle-filespec.json | jq '.files[0].build = "${{ steps.get-proxy-client-version.outputs.version }}/${{ github.run_number }}"' | jq '.files[0].pattern = "clients-maven-dev-local/**/*"' | sponge releasebundle-filespec.json + run: cat releasebundle-filespec.json | jq '.files[0].build = "${{ steps.get-proxy-client-version.outputs.version }}/${{ github.run_number }}"' | sponge releasebundle-filespec.json working-directory: .github/workflows shell: bash From ac0869ece26479a4a069d23f23569e26691fa729 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Thu, 25 Jul 2024 11:07:35 -0700 Subject: [PATCH 071/107] Add project --- .github/workflows/build-proxy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index 333089921..88914584f 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -93,7 +93,7 @@ jobs: - name: Create release bundle from JFrog build # Platform URL required for lifecycle commands (e.g release bundle management) - run: jf release-bundle-create --signing-key=aerospike --sync --spec=./releasebundle-filespec.json aerospike-java-proxy-client ${{ steps.get-proxy-client-version.outputs.version }} + run: jf release-bundle-create --signing-key=aerospike --project clients --sync --spec=./releasebundle-filespec.json aerospike-java-proxy-client ${{ steps.get-proxy-client-version.outputs.version }} working-directory: .github/workflows - name: Promote release bundle to DEV stage From d6f5a2a9be4ba78bc8bf8ac149f5b9c8c2cece7d Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Tue, 30 Jul 2024 12:35:53 -0700 Subject: [PATCH 072/107] Specify project in filespec --- .github/workflows/build-proxy.yml | 2 +- .github/workflows/releasebundle-filespec.json | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index 88914584f..333089921 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -93,7 +93,7 @@ jobs: - name: Create release bundle from JFrog build # Platform URL required for lifecycle commands (e.g release bundle management) - run: jf release-bundle-create --signing-key=aerospike --project clients --sync --spec=./releasebundle-filespec.json aerospike-java-proxy-client ${{ steps.get-proxy-client-version.outputs.version }} + run: jf release-bundle-create --signing-key=aerospike --sync --spec=./releasebundle-filespec.json aerospike-java-proxy-client ${{ steps.get-proxy-client-version.outputs.version }} working-directory: .github/workflows - name: Promote release bundle to DEV stage diff --git a/.github/workflows/releasebundle-filespec.json b/.github/workflows/releasebundle-filespec.json index 37cea9cf3..262bf910e 100644 --- a/.github/workflows/releasebundle-filespec.json +++ b/.github/workflows/releasebundle-filespec.json @@ -1,7 +1,8 @@ { "files": [ { - "pattern": "" + "pattern": "", + "project": "clients" } ] } From 3cbb96f5e52222b2a82fe3077e12eb22812cba53 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Thu, 1 Aug 2024 11:34:45 -0700 Subject: [PATCH 073/107] Add WIP compose.yml --- .github/workflows/test-configs/compose.yml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .github/workflows/test-configs/compose.yml diff --git a/.github/workflows/test-configs/compose.yml b/.github/workflows/test-configs/compose.yml new file mode 100644 index 000000000..e8f3fdd32 --- /dev/null +++ b/.github/workflows/test-configs/compose.yml @@ -0,0 +1,9 @@ +services: + native-server: + image: aerospike/aerospike-server + ports: + - "3000:3000" + proxy-server: + image: aerospike-proxy + ports: + - "4000:4000" From d441d0d1a62f6a059043e54281c5de351c793d8c Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Fri, 2 Aug 2024 08:03:51 -0700 Subject: [PATCH 074/107] Remove useless env --- .github/workflows/build-proxy.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index 333089921..eced63420 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -9,8 +9,6 @@ on: jobs: build: - env: - JFROG_URL: https://aerospike.jfrog.io runs-on: ubuntu-22.04 steps: - name: Checkout Java client @@ -49,7 +47,7 @@ jobs: - uses: jfrog/setup-jfrog-cli@v4 env: - JF_URL: ${{ env.JFROG_URL }} + JF_URL: "https://aerospike.jfrog.io" JF_USER: ${{ secrets.JFROG_USERNAME }} JF_PASSWORD: ${{ secrets.JFROG_MAVEN_TOKEN }} JF_PROJECT: "clients" From 3629e9b57fb0464320ee02ec3272e8ad39d18aba Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Fri, 2 Aug 2024 08:03:58 -0700 Subject: [PATCH 075/107] Run native server first --- .github/workflows/test-configs/compose.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test-configs/compose.yml b/.github/workflows/test-configs/compose.yml index e8f3fdd32..0e0dfcba6 100644 --- a/.github/workflows/test-configs/compose.yml +++ b/.github/workflows/test-configs/compose.yml @@ -4,6 +4,8 @@ services: ports: - "3000:3000" proxy-server: + depends_on: + native-server image: aerospike-proxy ports: - "4000:4000" From b07f420d6f9627f4a88af933630dc99a5c8e33c1 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Mon, 5 Aug 2024 11:31:15 -0700 Subject: [PATCH 076/107] Use default config file. Disable security --- .github/workflows/build-proxy.yml | 2 +- .../test-configs/aerospike-proxy.yml | 34 ------------------- .github/workflows/test-configs/compose.yml | 4 ++- 3 files changed, 4 insertions(+), 36 deletions(-) delete mode 100644 .github/workflows/test-configs/aerospike-proxy.yml diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index eced63420..2fae60e89 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -39,7 +39,7 @@ jobs: - name: Run Aerospike Proxy on latest tag # TODO: not sure why aerospike-proxy.yml couldn't be included in Docker image... - run: docker run -d --name aerospike-proxy -p 4000:4000 --network=host -v ./aerospike-proxy.yml:/etc/aerospike-proxy/aerospike-proxy.yml ${{ vars.JFROG_PROXY_SERVER_DOCKER_REPO }}:${{ env.LATEST_TAG }} + run: docker run -d --name aerospike-proxy -p 4000:4000 --network=host ${{ vars.JFROG_PROXY_SERVER_DOCKER_REPO }}:${{ env.LATEST_TAG }} working-directory: .github/workflows/test-configs - name: Wait for native and proxy server to start diff --git a/.github/workflows/test-configs/aerospike-proxy.yml b/.github/workflows/test-configs/aerospike-proxy.yml deleted file mode 100644 index 981d467d1..000000000 --- a/.github/workflows/test-configs/aerospike-proxy.yml +++ /dev/null @@ -1,34 +0,0 @@ -# Change the configuration for your use case. -service: - # The proxy's listening ports, TLS and network interfaces. - ports: - 4000: { } - # The proxy's management API listening ports, TLS and network interfaces. - manage: - 4040: { } - -# Target Aerospike cluster and embedded client configuration. -aerospike: - seeds: - - localhost: - port: 3000 - # Policy overrides for incoming transactions - policy-overrides: - batch-policy: - total-timeout: 30_000 -# -# Only if security should be enabled. -# -# security: -# credentials-store: -# type: file -# credentials-file: samples/credentials.yml -# auth-token: -# private-key: samples/tls/private_key.pem -# public-key: samples/tls/public_key.pem - -# The logging properties. -logging: - format: json - file: /var/log/aerospike-proxy/aerospike-proxy.log - enable-console-logging: true diff --git a/.github/workflows/test-configs/compose.yml b/.github/workflows/test-configs/compose.yml index 0e0dfcba6..e694dbae6 100644 --- a/.github/workflows/test-configs/compose.yml +++ b/.github/workflows/test-configs/compose.yml @@ -6,6 +6,8 @@ services: proxy-server: depends_on: native-server - image: aerospike-proxy + dockerfile_inline: | + FROM aerospike-proxy + RUN yq -i e 'del(.security)' /etc/aerospike-proxy/aerospike-proxy.yml ports: - "4000:4000" From b4c8a7ff8fad2c6373d660b083ca656d569c38bc Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Mon, 5 Aug 2024 12:43:38 -0700 Subject: [PATCH 077/107] docker compose up --- .github/workflows/build-proxy.yml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index 2fae60e89..37816db4c 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -19,27 +19,27 @@ jobs: with: servers: '[{"id": "snapshots", "username": "${{ secrets.JFROG_USERNAME }}", "password": "${{ secrets.JFROG_MAVEN_TOKEN }}"}]' - - name: Run Aerospike server - run: docker run -d --name aerospike -p 3000:3000 aerospike/aerospike-server - - run: docker login aerospike.jfrog.io --username ${{ secrets.JFROG_USERNAME }} --password ${{ secrets.JFROG_DOCKER_TOKEN }} # TODO: change to use "latest" tag - - name: Get all tags for proxy server Docker image - run: docker pull --all-tags ${{ vars.JFROG_PROXY_SERVER_DOCKER_REPO }} + # - name: Get all tags for proxy server Docker image + # run: docker pull --all-tags ${{ vars.JFROG_PROXY_SERVER_DOCKER_REPO }} - # If we try to emulate aarch64 and run a proxy server Docker image designed for aarch64, the log file won't exist in the container - # i.e there won't be any output in `docker logs` for the proxy server. - # so we can't tell if the proxy server is running or not - - name: Get the latest tag for proxy server for this CPU platform - run: echo LATEST_TAG=$(docker images --filter label="architecture=$(uname -m)" ${{ vars.JFROG_PROXY_SERVER_DOCKER_REPO }} --format json | jq -r '.Tag' | head -n 1) >> $GITHUB_ENV - # Enables pipefail - shell: bash + # # If we try to emulate aarch64 and run a proxy server Docker image designed for aarch64, the log file won't exist in the container + # # i.e there won't be any output in `docker logs` for the proxy server. + # # so we can't tell if the proxy server is running or not + # - name: Get the latest tag for proxy server for this CPU platform + # run: echo LATEST_TAG=$(docker images --filter label="architecture=$(uname -m)" ${{ vars.JFROG_PROXY_SERVER_DOCKER_REPO }} --format json | jq -r '.Tag' | head -n 1) >> $GITHUB_ENV + # # Enables pipefail + # shell: bash + + # - name: Run Aerospike Proxy on latest tag + # # TODO: not sure why aerospike-proxy.yml couldn't be included in Docker image... + # run: docker run -d --name aerospike-proxy -p 4000:4000 --network=host ${{ vars.JFROG_PROXY_SERVER_DOCKER_REPO }}:${{ env.LATEST_TAG }} + # working-directory: .github/workflows/test-configs - - name: Run Aerospike Proxy on latest tag - # TODO: not sure why aerospike-proxy.yml couldn't be included in Docker image... - run: docker run -d --name aerospike-proxy -p 4000:4000 --network=host ${{ vars.JFROG_PROXY_SERVER_DOCKER_REPO }}:${{ env.LATEST_TAG }} + - run: docker compose up working-directory: .github/workflows/test-configs - name: Wait for native and proxy server to start From 64992af157ccc91cf7e1031c6c55cc2f39202e59 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Mon, 5 Aug 2024 12:44:23 -0700 Subject: [PATCH 078/107] fix --- .github/workflows/test-configs/compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-configs/compose.yml b/.github/workflows/test-configs/compose.yml index e694dbae6..26e464b4c 100644 --- a/.github/workflows/test-configs/compose.yml +++ b/.github/workflows/test-configs/compose.yml @@ -5,7 +5,7 @@ services: - "3000:3000" proxy-server: depends_on: - native-server + - native-server dockerfile_inline: | FROM aerospike-proxy RUN yq -i e 'del(.security)' /etc/aerospike-proxy/aerospike-proxy.yml From 6524ca7397a2a2320eecbd4ad83ae9730a518f6f Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Mon, 5 Aug 2024 12:47:01 -0700 Subject: [PATCH 079/107] debug --- .github/workflows/build-proxy.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index 37816db4c..81c184f9d 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -39,6 +39,8 @@ jobs: # run: docker run -d --name aerospike-proxy -p 4000:4000 --network=host ${{ vars.JFROG_PROXY_SERVER_DOCKER_REPO }}:${{ env.LATEST_TAG }} # working-directory: .github/workflows/test-configs + - run: docker compose --version + - run: docker compose up working-directory: .github/workflows/test-configs From 95e0dcfde752240530326aa361b8db14f4582511 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Mon, 5 Aug 2024 12:47:52 -0700 Subject: [PATCH 080/107] debug --- .github/workflows/build-proxy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index 81c184f9d..0f1edada0 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -39,7 +39,7 @@ jobs: # run: docker run -d --name aerospike-proxy -p 4000:4000 --network=host ${{ vars.JFROG_PROXY_SERVER_DOCKER_REPO }}:${{ env.LATEST_TAG }} # working-directory: .github/workflows/test-configs - - run: docker compose --version + - run: docker compose version - run: docker compose up working-directory: .github/workflows/test-configs From e2e1bc43d203bb9c315a7d5c0f9a7d633776013d Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Mon, 5 Aug 2024 13:37:46 -0700 Subject: [PATCH 081/107] works? --- .github/workflows/build-proxy.yml | 18 +++++++++--------- .github/workflows/test-configs/compose.yml | 4 +--- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index 0f1edada0..12bb36c7f 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -44,8 +44,8 @@ jobs: - run: docker compose up working-directory: .github/workflows/test-configs - - name: Wait for native and proxy server to start - run: sleep 3 + # - name: Wait for native and proxy server to start + # run: sleep 3 - uses: jfrog/setup-jfrog-cli@v4 env: @@ -69,13 +69,13 @@ jobs: - run: cat target/build-info.json # TODO: For debugging. Remove later - - if: ${{ always() }} - run: docker container ps -a - - if: ${{ always() }} - run: docker logs aerospike - # TODO: docker logs prints nothing. Not sure why this happens - - if: ${{ always() }} - run: docker exec aerospike-proxy cat /var/log/aerospike-proxy/aerospike-proxy.log + # - if: ${{ always() }} + # run: docker container ps -a + # - if: ${{ always() }} + # run: docker logs aerospike + # # TODO: docker logs prints nothing. Not sure why this happens + # - if: ${{ always() }} + # run: docker exec aerospike-proxy cat /var/log/aerospike-proxy/aerospike-proxy.log # TODO: create release bundle # Based on https://github.com/citrusleaf/devops/blob/master/jfrog/vector/deploy-to-jfrog.sh diff --git a/.github/workflows/test-configs/compose.yml b/.github/workflows/test-configs/compose.yml index 26e464b4c..417efa9f6 100644 --- a/.github/workflows/test-configs/compose.yml +++ b/.github/workflows/test-configs/compose.yml @@ -6,8 +6,6 @@ services: proxy-server: depends_on: - native-server - dockerfile_inline: | - FROM aerospike-proxy - RUN yq -i e 'del(.security)' /etc/aerospike-proxy/aerospike-proxy.yml + build: ./ ports: - "4000:4000" From 8dd358363ba68556bbc029b372e67204f440e62c Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Mon, 5 Aug 2024 13:38:48 -0700 Subject: [PATCH 082/107] whoop --- .github/workflows/test-configs/Dockerfile | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .github/workflows/test-configs/Dockerfile diff --git a/.github/workflows/test-configs/Dockerfile b/.github/workflows/test-configs/Dockerfile new file mode 100644 index 000000000..3e6a4a891 --- /dev/null +++ b/.github/workflows/test-configs/Dockerfile @@ -0,0 +1,6 @@ +FROM aerospike.jfrog.io/docker/aerospike/aerospike-proxy-private:1.1.0 +# Default user doesn't have root permissions +USER root +RUN curl "https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64" -o /usr/bin/yq +RUN chmod u+x /usr/bin/yq +RUN yq -i e 'del(.security)' /etc/aerospike-proxy/aerospike-proxy.yml From c369aade73dbd019293cf8e4d5a3d8fb949c5a37 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Mon, 5 Aug 2024 13:39:38 -0700 Subject: [PATCH 083/107] run detached --- .github/workflows/build-proxy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index 12bb36c7f..22691f9b8 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -41,7 +41,7 @@ jobs: - run: docker compose version - - run: docker compose up + - run: docker compose up -d working-directory: .github/workflows/test-configs # - name: Wait for native and proxy server to start From 6646ff508cef21e7ef03221d530f3d1073ae059b Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Mon, 5 Aug 2024 13:47:12 -0700 Subject: [PATCH 084/107] fix yq install --- .github/workflows/test-configs/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-configs/Dockerfile b/.github/workflows/test-configs/Dockerfile index 3e6a4a891..ff90dc615 100644 --- a/.github/workflows/test-configs/Dockerfile +++ b/.github/workflows/test-configs/Dockerfile @@ -1,6 +1,6 @@ FROM aerospike.jfrog.io/docker/aerospike/aerospike-proxy-private:1.1.0 # Default user doesn't have root permissions USER root -RUN curl "https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64" -o /usr/bin/yq -RUN chmod u+x /usr/bin/yq +RUN wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/bin/yq +RUN chmod +x /usr/bin/yq RUN yq -i e 'del(.security)' /etc/aerospike-proxy/aerospike-proxy.yml From bfe1fcaaa4729c36325b44376d54f113c64ade71 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Mon, 5 Aug 2024 13:50:55 -0700 Subject: [PATCH 085/107] check if containers are running --- .github/workflows/build-proxy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index 22691f9b8..d2c4b2ce3 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -69,8 +69,8 @@ jobs: - run: cat target/build-info.json # TODO: For debugging. Remove later - # - if: ${{ always() }} - # run: docker container ps -a + - if: ${{ always() }} + run: docker container ps -a # - if: ${{ always() }} # run: docker logs aerospike # # TODO: docker logs prints nothing. Not sure why this happens From 550bb6be700b9cc92a9bb426e005ec48809889a0 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Mon, 5 Aug 2024 13:55:09 -0700 Subject: [PATCH 086/107] comment --- .github/workflows/test-configs/Dockerfile | 2 +- .github/workflows/test-configs/compose.yml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-configs/Dockerfile b/.github/workflows/test-configs/Dockerfile index ff90dc615..0b1898e37 100644 --- a/.github/workflows/test-configs/Dockerfile +++ b/.github/workflows/test-configs/Dockerfile @@ -1,5 +1,5 @@ FROM aerospike.jfrog.io/docker/aerospike/aerospike-proxy-private:1.1.0 -# Default user doesn't have root permissions +# Default user "aerospike" doesn't have root permissions USER root RUN wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/bin/yq RUN chmod +x /usr/bin/yq diff --git a/.github/workflows/test-configs/compose.yml b/.github/workflows/test-configs/compose.yml index 417efa9f6..7aa49ebe4 100644 --- a/.github/workflows/test-configs/compose.yml +++ b/.github/workflows/test-configs/compose.yml @@ -2,6 +2,7 @@ services: native-server: image: aerospike/aerospike-server ports: + # TODO: maybe not necessary since we don't access it directly - "3000:3000" proxy-server: depends_on: From 8707206d6b931f61f0ed26b33f1b3064009e93d1 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Mon, 5 Aug 2024 13:55:46 -0700 Subject: [PATCH 087/107] comment --- .github/workflows/test-configs/compose.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test-configs/compose.yml b/.github/workflows/test-configs/compose.yml index 7aa49ebe4..557a35ce7 100644 --- a/.github/workflows/test-configs/compose.yml +++ b/.github/workflows/test-configs/compose.yml @@ -7,6 +7,7 @@ services: proxy-server: depends_on: - native-server + # dockerfile_inline doesn't work for some reason, even though it's documented. build: ./ ports: - "4000:4000" From 7349036994093c1bc4d747c3081c9cca94ee92c8 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Mon, 5 Aug 2024 14:06:59 -0700 Subject: [PATCH 088/107] Use container ip address instead of localhost --- .github/workflows/test-configs/Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test-configs/Dockerfile b/.github/workflows/test-configs/Dockerfile index 0b1898e37..63fb823f9 100644 --- a/.github/workflows/test-configs/Dockerfile +++ b/.github/workflows/test-configs/Dockerfile @@ -4,3 +4,5 @@ USER root RUN wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/bin/yq RUN chmod +x /usr/bin/yq RUN yq -i e 'del(.security)' /etc/aerospike-proxy/aerospike-proxy.yml +RUN yq -i e '.aerospike.seeds[0].native-server = .aerospike.seeds[0].localhost' /etc/aerospike-proxy/aerospike-proxy.yml +RUN yq -i e 'del(.aerospike.seeds[0].localhost)' /etc/aerospike-proxy/aerospike-proxy.yml From 3be5fe325978bf1a084f7123ab1fb1b947a9d9ec Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Fri, 9 Aug 2024 10:38:47 -0700 Subject: [PATCH 089/107] Clean up proxy client ci/cd code --- .github/workflows/build-proxy.yml | 77 ++++++++++++--------- test/src/com/aerospike/test/SuiteProxy.java | 1 + 2 files changed, 44 insertions(+), 34 deletions(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index d2c4b2ce3..f6fba13fe 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -9,43 +9,44 @@ on: jobs: build: + env: + JFROG_RELEASE_BUNDLE_NAME: aerospike-java-proxy-client runs-on: ubuntu-22.04 steps: - name: Checkout Java client uses: actions/checkout@v4 - - name: Set up settings.xml for Maven - uses: s4u/maven-settings-action@v2.8.0 - with: - servers: '[{"id": "snapshots", "username": "${{ secrets.JFROG_USERNAME }}", "password": "${{ secrets.JFROG_MAVEN_TOKEN }}"}]' + # mvn deploy + # - name: Set up settings.xml for Maven + # uses: s4u/maven-settings-action@v2.8.0 + # with: + # servers: '[{"id": "snapshots", "username": "${{ secrets.JFROG_USERNAME }}", "password": "${{ secrets.JFROG_MAVEN_TOKEN }}"}]' - run: docker login aerospike.jfrog.io --username ${{ secrets.JFROG_USERNAME }} --password ${{ secrets.JFROG_DOCKER_TOKEN }} # TODO: change to use "latest" tag - # - name: Get all tags for proxy server Docker image - # run: docker pull --all-tags ${{ vars.JFROG_PROXY_SERVER_DOCKER_REPO }} + - name: Get all tags for proxy server Docker image + run: docker pull --all-tags ${{ vars.JFROG_PROXY_SERVER_DOCKER_REPO }} - # # If we try to emulate aarch64 and run a proxy server Docker image designed for aarch64, the log file won't exist in the container - # # i.e there won't be any output in `docker logs` for the proxy server. - # # so we can't tell if the proxy server is running or not - # - name: Get the latest tag for proxy server for this CPU platform - # run: echo LATEST_TAG=$(docker images --filter label="architecture=$(uname -m)" ${{ vars.JFROG_PROXY_SERVER_DOCKER_REPO }} --format json | jq -r '.Tag' | head -n 1) >> $GITHUB_ENV - # # Enables pipefail - # shell: bash - - # - name: Run Aerospike Proxy on latest tag - # # TODO: not sure why aerospike-proxy.yml couldn't be included in Docker image... - # run: docker run -d --name aerospike-proxy -p 4000:4000 --network=host ${{ vars.JFROG_PROXY_SERVER_DOCKER_REPO }}:${{ env.LATEST_TAG }} - # working-directory: .github/workflows/test-configs + # If we try to emulate aarch64 and run a proxy server Docker image designed for aarch64, the log file won't exist in the container + # i.e there won't be any output in `docker logs` for the proxy server. + # so we can't tell if the proxy server is running or not + - name: Get the latest tag for proxy server for this CPU platform + run: echo LATEST_TAG=$(docker images --filter label="architecture=$(uname -m)" ${{ vars.JFROG_PROXY_SERVER_DOCKER_REPO }} --format json | jq -r '.Tag' | head -n 1) >> $GITHUB_ENV + # Enables pipefail + shell: bash - - run: docker compose version + - name: Run Aerospike Proxy on latest tag + # TODO: not sure why aerospike-proxy.yml couldn't be included in Docker image... + run: docker run -d --name aerospike-proxy -p 4000:4000 --network=host ${{ vars.JFROG_PROXY_SERVER_DOCKER_REPO }}:${{ env.LATEST_TAG }} + working-directory: .github/workflows/test-configs + # TODO: pass in fetched tag to compose.yml - run: docker compose up -d working-directory: .github/workflows/test-configs - # - name: Wait for native and proxy server to start - # run: sleep 3 + # We assume that the proxy server is ready once we run the tests - uses: jfrog/setup-jfrog-cli@v4 env: @@ -54,8 +55,11 @@ jobs: JF_PASSWORD: ${{ secrets.JFROG_MAVEN_TOKEN }} JF_PROJECT: "clients" + # This associates the Maven credentials with the repos in the Java client's pom.xml - run: jf mvn-config --repo-deploy-releases clients-maven-dev-local --repo-deploy-snapshots clients-maven-dev-local + # There can be a Maven plugin to get the proxy client version + # But this also works, too - run: sudo apt install -y libxml-xpath-perl - name: Get Java proxy client version @@ -66,36 +70,41 @@ jobs: - name: Run Maven workflow run: jf mvn deploy -Dtest=com.aerospike.test.SuiteAll -DfailIfNoTests=false -DskipTests=false --build-name=${{ steps.get-proxy-client-version.outputs.version }} --build-number=${{ github.run_number }} + # For debugging the build info that was just collected by jf + # Build info was not published to JFrog yet. This will be done in a later step - run: cat target/build-info.json - - # TODO: For debugging. Remove later + # For debugging why the proxy server failed to start - if: ${{ always() }} run: docker container ps -a - # - if: ${{ always() }} - # run: docker logs aerospike - # # TODO: docker logs prints nothing. Not sure why this happens - # - if: ${{ always() }} - # run: docker exec aerospike-proxy cat /var/log/aerospike-proxy/aerospike-proxy.log + # Prints logs for native server + - if: ${{ always() }} + run: docker logs aerospike + # TODO: Sometimes, docker logs for the proxy server prints nothing. Not sure why this happens + - if: ${{ always() }} + run: docker exec aerospike-proxy cat /var/log/aerospike-proxy/aerospike-proxy.log - # TODO: create release bundle # Based on https://github.com/citrusleaf/devops/blob/master/jfrog/vector/deploy-to-jfrog.sh - # mvn deploy only uploads to JFrog but doesn't create a JFrog build - - name: Create JFrog build from uploaded artifacts + - name: Publish JFrog build info from uploaded artifacts run: jf rt build-publish ${{ steps.get-proxy-client-version.outputs.version }} ${{ github.run_number }} + # Required to run sponge - run: sudo apt install -y moreutils + # .files.project is not documented in JFrog but it's used to specify the JFrog project to upload this release bundle to - name: Create file spec for release bundle run: cat releasebundle-filespec.json | jq '.files[0].build = "${{ steps.get-proxy-client-version.outputs.version }}/${{ github.run_number }}"' | sponge releasebundle-filespec.json working-directory: .github/workflows shell: bash - name: Create release bundle from JFrog build - # Platform URL required for lifecycle commands (e.g release bundle management) - run: jf release-bundle-create --signing-key=aerospike --sync --spec=./releasebundle-filespec.json aerospike-java-proxy-client ${{ steps.get-proxy-client-version.outputs.version }} + # Not the same name as in proxy/pom.xml + # But that name doesn't specify the language, + # and there can be multiple languages that implement the proxy client in the future that need to be uploaded to JFrog + # Signing key only signs release bundle and not the artifacts associated with it + run: jf release-bundle-create --signing-key=aerospike --sync --spec=./releasebundle-filespec.json ${{ env.JFROG_RELEASE_BUNDLE_NAME }} ${{ steps.get-proxy-client-version.outputs.version }} working-directory: .github/workflows - name: Promote release bundle to DEV stage - run: jf release-bundle-promote --signing-key=aerospike --sync aerospike-java-proxy-client ${{ steps.get-proxy-client-version.outputs.version }} DEV + run: jf release-bundle-promote --signing-key=aerospike --sync ${{ env.JFROG_RELEASE_BUNDLE_NAME }} ${{ steps.get-proxy-client-version.outputs.version }} DEV working-directory: .github/workflows diff --git a/test/src/com/aerospike/test/SuiteProxy.java b/test/src/com/aerospike/test/SuiteProxy.java index 2e5657ea0..62c8ada93 100644 --- a/test/src/com/aerospike/test/SuiteProxy.java +++ b/test/src/com/aerospike/test/SuiteProxy.java @@ -51,6 +51,7 @@ @RunWith(Suite.class) @Suite.SuiteClasses({ + // TODO: add test for username and password with proxy client TestAsyncPutGet.class, TestAsyncBatch.class, TestAsyncOperate.class, From 29eec58bf88b10c7599f3d5df4afcb980a77e686 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Fri, 9 Aug 2024 10:39:20 -0700 Subject: [PATCH 090/107] add missing todo --- .github/workflows/build-proxy.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index f6fba13fe..15e8f75e1 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -97,6 +97,8 @@ jobs: working-directory: .github/workflows shell: bash + # TODO: sign the JFrog artifacts + - name: Create release bundle from JFrog build # Not the same name as in proxy/pom.xml # But that name doesn't specify the language, From 9b8bff62be8690de813270a0b5da1798ea08b744 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Fri, 9 Aug 2024 13:29:19 -0700 Subject: [PATCH 091/107] Use latest tag in compose file --- .github/workflows/build-proxy.yml | 7 ++----- .github/workflows/test-configs/Dockerfile | 3 ++- .github/workflows/test-configs/compose.yml | 2 ++ 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index 15e8f75e1..2f70a5819 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -37,14 +37,11 @@ jobs: # Enables pipefail shell: bash - - name: Run Aerospike Proxy on latest tag - # TODO: not sure why aerospike-proxy.yml couldn't be included in Docker image... - run: docker run -d --name aerospike-proxy -p 4000:4000 --network=host ${{ vars.JFROG_PROXY_SERVER_DOCKER_REPO }}:${{ env.LATEST_TAG }} - working-directory: .github/workflows/test-configs - # TODO: pass in fetched tag to compose.yml - run: docker compose up -d working-directory: .github/workflows/test-configs + env: + PROXY_SERVER_TAG: ${{ env.LATEST_TAG }} # We assume that the proxy server is ready once we run the tests diff --git a/.github/workflows/test-configs/Dockerfile b/.github/workflows/test-configs/Dockerfile index 63fb823f9..c40fdd8b6 100644 --- a/.github/workflows/test-configs/Dockerfile +++ b/.github/workflows/test-configs/Dockerfile @@ -1,4 +1,5 @@ -FROM aerospike.jfrog.io/docker/aerospike/aerospike-proxy-private:1.1.0 +ARG PROXY_SERVER_TAG +FROM "aerospike.jfrog.io/docker/aerospike/aerospike-proxy-private:$PROXY_SERVER_TAG" # Default user "aerospike" doesn't have root permissions USER root RUN wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/bin/yq diff --git a/.github/workflows/test-configs/compose.yml b/.github/workflows/test-configs/compose.yml index 557a35ce7..5b07e4222 100644 --- a/.github/workflows/test-configs/compose.yml +++ b/.github/workflows/test-configs/compose.yml @@ -9,5 +9,7 @@ services: - native-server # dockerfile_inline doesn't work for some reason, even though it's documented. build: ./ + args: + - PROXY_SERVER_TAG ports: - "4000:4000" From b7c915f8d26af040fe7465987efb77c80c43221a Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Fri, 9 Aug 2024 13:40:10 -0700 Subject: [PATCH 092/107] Fix syntax --- .github/workflows/test-configs/compose.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-configs/compose.yml b/.github/workflows/test-configs/compose.yml index 5b07e4222..3fb9dc208 100644 --- a/.github/workflows/test-configs/compose.yml +++ b/.github/workflows/test-configs/compose.yml @@ -8,7 +8,8 @@ services: depends_on: - native-server # dockerfile_inline doesn't work for some reason, even though it's documented. - build: ./ + # So we have to supply the Dockerfile as a separate file + build: args: - PROXY_SERVER_TAG ports: From 5d147ec1caafbc6849ad54db9cb91ba150e054bf Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Fri, 9 Aug 2024 14:52:51 -0700 Subject: [PATCH 093/107] Fix logs --- .github/workflows/build-proxy.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index 2f70a5819..79bbf641a 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -73,12 +73,11 @@ jobs: # For debugging why the proxy server failed to start - if: ${{ always() }} run: docker container ps -a - # Prints logs for native server + # Prints logs for native server and proxy server - if: ${{ always() }} - run: docker logs aerospike - # TODO: Sometimes, docker logs for the proxy server prints nothing. Not sure why this happens + run: docker logs test-configs-proxy-server-1 - if: ${{ always() }} - run: docker exec aerospike-proxy cat /var/log/aerospike-proxy/aerospike-proxy.log + run: docker logs test-configs-native-server-1 # Based on https://github.com/citrusleaf/devops/blob/master/jfrog/vector/deploy-to-jfrog.sh From efa51642c169942944707d6fe38d4b634e0ce469 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Tue, 13 Aug 2024 10:40:57 -0700 Subject: [PATCH 094/107] setup-gpg --- .github/workflows/build-proxy.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index 79bbf641a..985695aff 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -37,7 +37,6 @@ jobs: # Enables pipefail shell: bash - # TODO: pass in fetched tag to compose.yml - run: docker compose up -d working-directory: .github/workflows/test-configs env: @@ -67,6 +66,13 @@ jobs: - name: Run Maven workflow run: jf mvn deploy -Dtest=com.aerospike.test.SuiteAll -DfailIfNoTests=false -DskipTests=false --build-name=${{ steps.get-proxy-client-version.outputs.version }} --build-number=${{ github.run_number }} + - name: Setup GPG + uses: aerospike/shared-workflows/devops/setup-gpg@feat/setup-gpg-composite + with: + private-key: ${{ secrets.GPG_PRIVATE_KEY }} + key-pass: ${{ secrets.GPG_PASS }} + key-name: "aerospiketest" + # For debugging the build info that was just collected by jf # Build info was not published to JFrog yet. This will be done in a later step - run: cat target/build-info.json @@ -93,8 +99,6 @@ jobs: working-directory: .github/workflows shell: bash - # TODO: sign the JFrog artifacts - - name: Create release bundle from JFrog build # Not the same name as in proxy/pom.xml # But that name doesn't specify the language, From f28d70e123546c8e8d8611bd7e4cfebeb9637b77 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Thu, 5 Sep 2024 07:23:54 -0700 Subject: [PATCH 095/107] Setup gpg --- .github/workflows/build-proxy.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index 985695aff..644c149fc 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -63,16 +63,15 @@ jobs: # TODO: find a way to do this via java ecosystem instead of using generic cli tools run: echo version=$(xpath -q -e "//project/version/text()" pom.xml) >> $GITHUB_OUTPUT + - uses: aerospike/shared-workflows/devops/setup-gpg@0b6e88ca5dcf11002afcff0aa06759abf278c119 + with: + gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} + gpg-key-pass: ${{ secrets.GPG_PASS }} + gpg-key-name: "aerospike-inc" + - name: Run Maven workflow run: jf mvn deploy -Dtest=com.aerospike.test.SuiteAll -DfailIfNoTests=false -DskipTests=false --build-name=${{ steps.get-proxy-client-version.outputs.version }} --build-number=${{ github.run_number }} - - name: Setup GPG - uses: aerospike/shared-workflows/devops/setup-gpg@feat/setup-gpg-composite - with: - private-key: ${{ secrets.GPG_PRIVATE_KEY }} - key-pass: ${{ secrets.GPG_PASS }} - key-name: "aerospiketest" - # For debugging the build info that was just collected by jf # Build info was not published to JFrog yet. This will be done in a later step - run: cat target/build-info.json From 4086a15159d80153c4932c6488c93a96c2ee1a48 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Thu, 5 Sep 2024 07:50:36 -0700 Subject: [PATCH 096/107] fix --- .github/workflows/build-proxy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index 644c149fc..af955b7b4 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -65,7 +65,7 @@ jobs: - uses: aerospike/shared-workflows/devops/setup-gpg@0b6e88ca5dcf11002afcff0aa06759abf278c119 with: - gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} + gpg-private-key: ${{ secrets.GPG_SECRET_KEY }} gpg-key-pass: ${{ secrets.GPG_PASS }} gpg-key-name: "aerospike-inc" From 648c31c80ba08e75684714bc27ab56fb895b4db9 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Thu, 5 Sep 2024 07:58:01 -0700 Subject: [PATCH 097/107] sign --- pom.xml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pom.xml b/pom.xml index 649789796..6192992fb 100644 --- a/pom.xml +++ b/pom.xml @@ -138,6 +138,20 @@ + + org.apache.maven.plugins + maven-gpg-plugin + 3.2.5 + + + sign-artifacts + verify + + sign + + + + maven-compiler-plugin ${maven-compiler-plugin.version} From cf2e02832c56f72c76cd24168bfc1bc98368949d Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Thu, 5 Sep 2024 14:13:32 -0700 Subject: [PATCH 098/107] Just do the same as in asx --- proxy/pom.xml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/proxy/pom.xml b/proxy/pom.xml index ab07754ea..802b94393 100644 --- a/proxy/pom.xml +++ b/proxy/pom.xml @@ -68,6 +68,23 @@ jackson-databind 2.17.2 + + + io.grpc + grpc-protobuf + 1.65.1 + + + io.grpc + grpc-netty-shaded + 1.65.1 + runtime + + + io.grpc + grpc-stub + 1.65.1 + From bab9a5fdf554d38d710adda5fab402b2ca4c2ec6 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Thu, 5 Sep 2024 14:18:48 -0700 Subject: [PATCH 099/107] Revert "Just do the same as in asx" This reverts commit cf2e02832c56f72c76cd24168bfc1bc98368949d. --- proxy/pom.xml | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/proxy/pom.xml b/proxy/pom.xml index 802b94393..ab07754ea 100644 --- a/proxy/pom.xml +++ b/proxy/pom.xml @@ -68,23 +68,6 @@ jackson-databind 2.17.2 - - - io.grpc - grpc-protobuf - 1.65.1 - - - io.grpc - grpc-netty-shaded - 1.65.1 - runtime - - - io.grpc - grpc-stub - 1.65.1 - From fac45e751d5f88b92ab850f4c9848e4b4d6c937b Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Thu, 5 Sep 2024 14:19:53 -0700 Subject: [PATCH 100/107] idk --- proxy/pom.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/proxy/pom.xml b/proxy/pom.xml index ab07754ea..1432fb6c2 100644 --- a/proxy/pom.xml +++ b/proxy/pom.xml @@ -27,11 +27,13 @@ io.grpc + ${grpc.version} grpc-netty io.netty + ${netty.version} netty-transport From 47ef3e23a724ee06155c49563cfd89992881b203 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Mon, 16 Sep 2024 13:29:00 -0700 Subject: [PATCH 101/107] Fix --- .github/workflows/build-proxy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index af955b7b4..9979ef1ad 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -63,7 +63,7 @@ jobs: # TODO: find a way to do this via java ecosystem instead of using generic cli tools run: echo version=$(xpath -q -e "//project/version/text()" pom.xml) >> $GITHUB_OUTPUT - - uses: aerospike/shared-workflows/devops/setup-gpg@0b6e88ca5dcf11002afcff0aa06759abf278c119 + - uses: aerospike/shared-workflows/devops/setup-gpg@052d1b0a751414b0e03d12271bb7d09a4fe2dde0 with: gpg-private-key: ${{ secrets.GPG_SECRET_KEY }} gpg-key-pass: ${{ secrets.GPG_PASS }} From e6cc45b9a21e8c42fb9de4e3e1de55ce005a649e Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Mon, 16 Sep 2024 13:32:24 -0700 Subject: [PATCH 102/107] Skip tests for now --- .github/workflows/build-proxy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index 9979ef1ad..b5c43f2a9 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -70,7 +70,7 @@ jobs: gpg-key-name: "aerospike-inc" - name: Run Maven workflow - run: jf mvn deploy -Dtest=com.aerospike.test.SuiteAll -DfailIfNoTests=false -DskipTests=false --build-name=${{ steps.get-proxy-client-version.outputs.version }} --build-number=${{ github.run_number }} + run: jf mvn deploy -Dtest=com.aerospike.test.SuiteAll -DfailIfNoTests=false -DskipTests=true --build-name=${{ steps.get-proxy-client-version.outputs.version }} --build-number=${{ github.run_number }} # For debugging the build info that was just collected by jf # Build info was not published to JFrog yet. This will be done in a later step From 1f545992462ea1da7e4c22a362ee1e0167846db8 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Mon, 16 Sep 2024 13:50:57 -0700 Subject: [PATCH 103/107] Add? --- client/pom.xml | 4 ++++ proxy/pom.xml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/client/pom.xml b/client/pom.xml index 32e4d9e2f..cef515040 100644 --- a/client/pom.xml +++ b/client/pom.xml @@ -78,6 +78,10 @@ + + org.apache.maven.plugins + maven-gpg-plugin + org.apache.maven.plugins maven-compiler-plugin diff --git a/proxy/pom.xml b/proxy/pom.xml index 1432fb6c2..a84c1318d 100644 --- a/proxy/pom.xml +++ b/proxy/pom.xml @@ -82,6 +82,10 @@ + + org.apache.maven.plugins + maven-gpg-plugin + org.apache.maven.plugins maven-compiler-plugin From c24d00a1d0638de31ea66888bc4ea288592e624e Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Mon, 16 Sep 2024 13:57:13 -0700 Subject: [PATCH 104/107] fix --- .github/workflows/build-proxy.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index b5c43f2a9..38f4ff8f9 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -71,6 +71,8 @@ jobs: - name: Run Maven workflow run: jf mvn deploy -Dtest=com.aerospike.test.SuiteAll -DfailIfNoTests=false -DskipTests=true --build-name=${{ steps.get-proxy-client-version.outputs.version }} --build-number=${{ github.run_number }} + env: + GPG_TTY: no-tty # For debugging the build info that was just collected by jf # Build info was not published to JFrog yet. This will be done in a later step From ef27de9807abcd4d67e354e8f6581ecf947f901b Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Mon, 16 Sep 2024 14:10:59 -0700 Subject: [PATCH 105/107] Use passphrase from file --- .github/workflows/build-proxy.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index 38f4ff8f9..ebe7d278a 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -69,6 +69,8 @@ jobs: gpg-key-pass: ${{ secrets.GPG_PASS }} gpg-key-name: "aerospike-inc" + - run: echo -e "passphrase-file ~/pass" >> ~/.gnupg/gpg.conf + - name: Run Maven workflow run: jf mvn deploy -Dtest=com.aerospike.test.SuiteAll -DfailIfNoTests=false -DskipTests=true --build-name=${{ steps.get-proxy-client-version.outputs.version }} --build-number=${{ github.run_number }} env: From ba4b4ce259c203a930e6751c76ec900ee729f951 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Mon, 16 Sep 2024 14:18:52 -0700 Subject: [PATCH 106/107] Use abs path --- .github/workflows/build-proxy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index ebe7d278a..6755c83ce 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -69,7 +69,7 @@ jobs: gpg-key-pass: ${{ secrets.GPG_PASS }} gpg-key-name: "aerospike-inc" - - run: echo -e "passphrase-file ~/pass" >> ~/.gnupg/gpg.conf + - run: echo -e "passphrase-file $HOME/pass" >> ~/.gnupg/gpg.conf - name: Run Maven workflow run: jf mvn deploy -Dtest=com.aerospike.test.SuiteAll -DfailIfNoTests=false -DskipTests=true --build-name=${{ steps.get-proxy-client-version.outputs.version }} --build-number=${{ github.run_number }} From 27af9ea17864973b4deb42eab3ce3ffddcb3f3d1 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Tue, 17 Sep 2024 08:58:29 -0700 Subject: [PATCH 107/107] rm --- .github/workflows/build-proxy.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/build-proxy.yml b/.github/workflows/build-proxy.yml index 6755c83ce..0ecb07522 100644 --- a/.github/workflows/build-proxy.yml +++ b/.github/workflows/build-proxy.yml @@ -73,8 +73,6 @@ jobs: - name: Run Maven workflow run: jf mvn deploy -Dtest=com.aerospike.test.SuiteAll -DfailIfNoTests=false -DskipTests=true --build-name=${{ steps.get-proxy-client-version.outputs.version }} --build-number=${{ github.run_number }} - env: - GPG_TTY: no-tty # For debugging the build info that was just collected by jf # Build info was not published to JFrog yet. This will be done in a later step