Skip to content

Commit

Permalink
Added configuration to RC tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mirzakaracic committed Dec 31, 2024
1 parent 9ba4e7e commit 712502e
Show file tree
Hide file tree
Showing 11 changed files with 33 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .github/actions/build-and-test/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ inputs:
description: ""
run-tests:
required: true
default: "false"
default: "true"
description: Spin up aerospike enterprise server and run tests

runs:
Expand Down
24 changes: 20 additions & 4 deletions .github/actions/run-ee-server/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ inputs:
description: ""
required: false
default: aerospike/clients
container-name:
default: aerospike
required: false
description: Name for test container

runs:
using: "composite"
Expand All @@ -35,18 +39,30 @@ runs:
oidc-provider-name: ${{ inputs.oidc-provider }}
oidc-audience: ${{ inputs.oidc-audience }}

- name: Log into Docker Hub to get server RC
if: ${{ inputs.use-server-rc == 'true' }}
- if: ${{ inputs.use-server-rc == 'true' }}
run: docker login ${{ inputs.container-repo-url }} --username ${{ inputs.docker-hub-username }} --password ${{ inputs.docker-hub-password }}
shell: bash

- run: echo IMAGE_NAME=${{ inputs.use-server-rc == 'true' && inputs.container-repo-url || '' }}aerospike/aerospike-server-enterprise${{ inputs.use-server-rc == 'true' && '-rc' || '' }}:${{ inputs.server-tag }} >> $GITHUB_ENV
shell: bash

- run: docker run -d --name aerospike -p 3000:3000 ${{ env.IMAGE_NAME }}
- run: docker run -d --name ${{ inputs.container-name }} -p 3000:3000 ${{ env.IMAGE_NAME }}
shell: bash

- uses: ./.github/actions/wait-for-as-server-to-start
with:
container-name: aerospike
container-name: ${{ inputs.container-name }}
is-security-enabled: true
is-strong-consistency-enabled: true

- run: docker exec ${{ inputs.container-name }} asadm --enable -e 'asinfo -v "roster-set:namespace=test;nodes=A1"'
shell: bash

- run: docker exec ${{ inputs.container-name }} asadm --enable -e 'asinfo -v revive:'
shell: bash

- run: docker exec ${{ inputs.container-name }} asadm --enable -e 'asinfo -v recluster:'
shell: bash

- run: docker logs ${{ inputs.container-name }}
shell: bash
6 changes: 5 additions & 1 deletion .github/actions/wait-for-as-server-to-start/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ inputs:
description: Flag to toggle docker hub creds use. With this flag enabled before attempting to pull image we will attempt to log in do docker hub.
required: false
default: "false"
is-strong-consistency-enabled:
description: Flag to enable strong consistency
required: false
default: "false"

runs:
using: "composite"
Expand All @@ -18,5 +22,5 @@ runs:
# Also, we don't want to fail if we timeout in case the server *did* finish starting up but the script couldn't detect it due to a bug
# Effectively, this composite action is like calling "sleep" that is optimized to exit early when it detects an ok from the server
- name: Wait for EE server to start
run: timeout 30 bash ./.github/workflows/scripts/wait-for-as-server-to-start.sh ${{ inputs.container-name }} ${{ inputs.is-security-enabled }} || true
run: timeout 30 bash ./.github/workflows/scripts/wait-for-as-server-to-start.sh ${{ inputs.container-name }} ${{ inputs.is-security-enabled }} ${{ inputs.is-strong-consistency-enabled }} || true
shell: bash
18 changes: 1 addition & 17 deletions .github/workflows/build-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,9 @@ on:
description: Spin up aerospike enterprise server and run tests

jobs:
debug-job:
runs-on: ubuntu-latest
steps:
- name: debug
run: |
echo "${{ inputs.branch }}"
echo "${{ github.base_ref }}"
java-version:
needs: debug-job
runs-on: ubuntu-latest
runs-on: ${{ vars.BUILD_CONTAINER_DISTRO_VERSION }}
outputs:
java-version: ${{ steps.get-java-version.outputs.java-version }}
steps:
Expand All @@ -62,14 +54,6 @@ jobs:
run: |
echo ${{ steps.get-java-version.outputs.java-version }}
debug-java-version-job:
runs-on: ubuntu-latest
needs: java-version
steps:
- name: debug
run: |
echo "${{ needs.java-version.outputs.java-version }}"
build:
uses: ./.github/workflows/build.yaml
needs: java-version
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ on:

jobs:
build:
runs-on: ubuntu-latest
runs-on: ${{ vars.BUILD_CONTAINER_DISTRO_VERSION }}
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/promote.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ on:

jobs:
validate-build:
runs-on: ubuntu-latest
runs-on: ${{ vars.BUILD_CONTAINER_DISTRO_VERSION }}
steps:
- name: Setup jfrog shell
uses: jfrog/setup-jfrog-cli@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-stage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
debug-job:
runs-on: ubuntu-latest
runs-on: ${{ vars.BUILD_CONTAINER_DISTRO_VERSION }}
steps:
- name: debug
run: |
Expand All @@ -16,7 +16,7 @@ jobs:
java-version:
needs: debug-job
runs-on: ubuntu-latest
runs-on: ${{ vars.BUILD_CONTAINER_DISTRO_VERSION }}
outputs:
java-version: ${{ steps.get-java-version.outputs.java-version }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ on:

jobs:
build:
runs-on: ubuntu-latest
runs-on: ${{ vars.BUILD_CONTAINER_DISTRO_VERSION }}
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down
1 change: 0 additions & 1 deletion client/deploy-resources/bouncycastle_pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.aerospike</groupId>
<artifactId>aerospike-client-bc-jdk21</artifactId>
<version>9.0.2</version>
<packaging>jar</packaging>
<name>Aerospike Java Client BC</name>
<description>Aerospike Java client interface to Aerospike database server. Uses Bouncy Castle crypto library for RIPEMD-160 hashing.</description>
Expand Down
1 change: 0 additions & 1 deletion client/deploy-resources/gnu_pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.aerospike</groupId>
<artifactId>aerospike-client-jdk21</artifactId>
<version>9.0.2</version>
<packaging>jar</packaging>
<name>Aerospike Java Client</name>
<description>Aerospike Java client interface to Aerospike database server</description>
Expand Down
1 change: 1 addition & 0 deletions client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@
<file>target/${project.build.finalName}.jar</file>
<groupId>com.aerospike</groupId>
<artifactId>aerospike-client${crypto.type}-jdk21</artifactId>
<version>${revision}</version>
<generatePom>true</generatePom>
</configuration>
</execution>
Expand Down

0 comments on commit 712502e

Please sign in to comment.