Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
0babbbf
cache server image
juliannguyen4 Mar 20, 2025
f5bc2a3
set docker-container driver for all platforms
juliannguyen4 Mar 20, 2025
25cd0ac
WORKDIR fix
juliannguyen4 Mar 25, 2025
a8ef129
fix
juliannguyen4 Mar 25, 2025
2a07733
fix
juliannguyen4 Mar 25, 2025
cf3c194
Merge remote-tracking branch 'origin/dev' into cicd-cache-server-dock…
juliannguyen4 Apr 18, 2025
3929681
Merge remote-tracking branch 'origin/dev' into cicd-cache-server-dock…
juliannguyen4 Apr 23, 2025
e7570de
Merge remote-tracking branch 'origin/dev' into cicd-cache-server-dock…
juliannguyen4 Apr 29, 2025
9c581cc
Merge remote-tracking branch 'origin/dev' into cicd-cache-server-dock…
juliannguyen4 May 27, 2025
fdb39b4
use ghcr as a cache
juliannguyen4 May 27, 2025
1daa83d
login twice
juliannguyen4 May 27, 2025
dbe2bd1
GITHUB_TOKEN
juliannguyen4 May 27, 2025
83518d3
just revert
juliannguyen4 May 27, 2025
76ea216
finish
juliannguyen4 May 28, 2025
ef86a95
fix syntax
juliannguyen4 May 28, 2025
5960763
we already use our own tag
juliannguyen4 May 28, 2025
1bb309f
fix
juliannguyen4 May 28, 2025
e78db06
set to blank
juliannguyen4 May 28, 2025
d153124
just use same tag as base image
juliannguyen4 May 28, 2025
08fdc83
use code example
juliannguyen4 May 28, 2025
f2f6137
use registry cache instead?
juliannguyen4 May 28, 2025
855684d
add a diff tag for cache so it doesn't conflict with actual img
juliannguyen4 May 28, 2025
c03ed29
dont double tag
juliannguyen4 May 28, 2025
e41840e
dont run latest by default
juliannguyen4 May 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 26 additions & 9 deletions .github/actions/run-ee-server/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ inputs:
server-tag:
required: true
description: Specify Docker tag
default: 'latest'
default: latest
# Github Composite Actions can't access secrets
# so we need to pass them in as inputs
docker-hub-username:
Expand All @@ -24,6 +24,9 @@ inputs:
required: false
description: 'docker-host, separate-docker-container, "remote-connection" via DOCKER_HOST'
default: 'docker-host'
GITHUB_TOKEN:
required: true
description: GITHUB_TOKEN

runs:
using: "composite"
Expand All @@ -38,19 +41,31 @@ runs:
- run: echo IMAGE_NAME=aerospike/aerospike-server-enterprise${{ inputs.use-server-rc == 'true' && '-rc' || '' }}:${{ inputs.server-tag }} >> $GITHUB_ENV
shell: bash

- run: echo NEW_IMAGE_NAME=${{ env.IMAGE_NAME }}-python-client-testing >> $GITHUB_ENV
- run: docker pull $IMAGE_NAME
shell: bash

- run: echo REGISTRY=ghcr.io >> $GITHUB_ENV
shell: bash

- run: echo NEW_IMAGE_NAME=${{ env.REGISTRY }}/aerospike/aerospike-server-enterprise-python-client-testing >> $GITHUB_ENV
shell: bash

# macOS Github runners and Windows self-hosted runners don't have buildx installed by default
- if: ${{ runner.os == 'Windows' || runner.os == 'macOS' }}
uses: docker/setup-buildx-action@v3
# Also we want to use the docker-container driver so we can cache our custom server image
- uses: docker/setup-buildx-action@v3

- run: echo CA_CERT_FILE_NAME="ca.cer" >> $GITHUB_ENV
shell: bash

- run: echo TLS_PORT="4333" >> $GITHUB_ENV
shell: bash

- uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ inputs.GITHUB_TOKEN }}

- name: Build Aerospike server Docker image for testing
# We enable TLS standard authentication to verify that the OpenSSL library bundled with the wheel works
# You can manually verify this by enabling debug logging in the client and checking that the server certificate was verified
Expand All @@ -61,16 +76,18 @@ runs:
build-args: |
SERVER_IMAGE=${{ env.IMAGE_NAME }}
TLS_PORT=${{ env.TLS_PORT }}
tags: ${{ env.NEW_IMAGE_NAME }}
# setup-buildx-action configures Docker to use the docker-container build driver
# This driver doesn't publish an image locally by default
tags: ${{ env.NEW_IMAGE_NAME }}:${{ inputs.server-tag }}
# the docker-container driver doesn't publish an image locally by default
# so we have to manually enable it
load: true
push: true
# Also cache image so we don't have to rebuild it every time we use this action
cache-from: type=registry,ref=${{ env.NEW_IMAGE_NAME }}:buildcache
cache-to: type=registry,ref=${{ env.NEW_IMAGE_NAME }}:buildcache,mode=max

- run: echo SERVER_CONTAINER_NAME="aerospike" >> $GITHUB_ENV
shell: bash

- run: docker run -d --name ${{ env.SERVER_CONTAINER_NAME }} -p 3000:3000 -p ${{ env.TLS_PORT }}:${{ env.TLS_PORT }} ${{ env.NEW_IMAGE_NAME }}
- run: docker run -d --name ${{ env.SERVER_CONTAINER_NAME }} -p 3000:3000 -p ${{ env.TLS_PORT }}:${{ env.TLS_PORT }} ${{ env.NEW_IMAGE_NAME }}:${{ inputs.server-tag }}
shell: bash

- name: 'macOS: install timeout command'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ jobs:
docker-hub-username: ${{ secrets.DOCKER_HUB_BOT_USERNAME }}
docker-hub-password: ${{ secrets.DOCKER_HUB_BOT_PW }}
where-is-client-connecting-from: ${{ inputs.platform-tag == 'macosx_x86_64' && 'docker-host' || 'separate-docker-container' }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: If not running tests against server, only run basic import test
if: ${{ env.RUN_INTEGRATION_TESTS_IN_CIBW == 'false' }}
Expand Down Expand Up @@ -377,6 +378,7 @@ jobs:
docker-hub-username: ${{ secrets.DOCKER_HUB_BOT_USERNAME }}
docker-hub-password: ${{ secrets.DOCKER_HUB_BOT_PW }}
where-is-client-connecting-from: ${{ inputs.platform-tag == 'win_amd64' && 'remote-connection' || 'docker-host' }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Download wheel
uses: actions/download-artifact@v4
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/docker-build-context/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ EXPOSE $TLS_PORT
FROM ubuntu:24.04 AS dos2unix

# Run our own set up steps after server finishes starting up
# Running WORKDIR on an existing directory causes WORKDIR instruction to not be cached
RUN mkdir /my-scripts
WORKDIR /my-scripts
COPY entrypoint-finalize-setup.bash wait-for-as-server-to-start.bash .
# Both Github Actions and the entrypoint script can reuse this wait script
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/stage-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ jobs:
docker-hub-username: ${{ secrets.DOCKER_HUB_BOT_USERNAME }}
docker-hub-password: ${{ secrets.DOCKER_HUB_BOT_PW }}
where-is-client-connecting-from: 'separate-docker-container'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Run distro container
# Run distro container on host network to access the Aerospike server using localhost (without having to change config.conf)
Expand Down Expand Up @@ -211,6 +212,7 @@ jobs:
docker-hub-username: ${{ secrets.DOCKER_HUB_BOT_USERNAME }}
docker-hub-password: ${{ secrets.DOCKER_HUB_BOT_PW }}
where-is-client-connecting-from: 'docker-host'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Install wheel
run: python3 -m pip install *.whl
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ jobs:
use-server-rc: ${{ contains(github.event.pull_request.labels.*.name, 'new-server-features') }}
docker-hub-username: ${{ secrets.DOCKER_HUB_BOT_USERNAME }}
docker-hub-password: ${{ secrets.DOCKER_HUB_BOT_PW }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- run: python3 -m pytest --cov=aerospike_helpers --cov-report xml:coverage.xml ./new_tests
working-directory: test
Expand Down Expand Up @@ -298,6 +299,7 @@ jobs:
use-server-rc: ${{ contains(github.event.pull_request.labels.*.name, 'new-server-features') }}
docker-hub-username: ${{ secrets.DOCKER_HUB_BOT_USERNAME }}
docker-hub-password: ${{ secrets.DOCKER_HUB_BOT_PW }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Run tests
# We need to disable capturing output or else we cannot see memory errors reported by
Expand Down Expand Up @@ -433,6 +435,7 @@ jobs:
use-server-rc: ${{ contains(github.event.pull_request.labels.*.name, 'new-server-features') }}
docker-hub-username: ${{ secrets.DOCKER_HUB_BOT_USERNAME }}
docker-hub-password: ${{ secrets.DOCKER_HUB_BOT_PW }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Run tests
run: python -m pytest ./new_tests/test_{mrt_functionality,admin_*,compress}.py -W error::pytest.PytestUnraisableExceptionWarning
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/valgrind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ jobs:
server-tag: ${{ inputs.server-tag }}
docker-hub-username: ${{ secrets.DOCKER_HUB_BOT_USERNAME }}
docker-hub-password: ${{ secrets.DOCKER_HUB_BOT_PW }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- run: sudo apt update
- run: sudo apt install valgrind -y
Expand Down
Loading