Skip to content

Commit

Permalink
Merge pull request #664 from aerospike/dev-CICD
Browse files Browse the repository at this point in the history
Nodejs Client Release 6.1.0
  • Loading branch information
DomPeliniAerospike authored Mar 3, 2025
2 parents 97eef76 + fefd24b commit 87d402e
Show file tree
Hide file tree
Showing 69 changed files with 6,035 additions and 3,096 deletions.
85 changes: 85 additions & 0 deletions .github/actions/run-ce-server/run-ce-server.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: 'Run EE Server'
description: 'Run EE server. Returns once server is ready. Only tested on Linux and macOS'
# NOTE: do not share this server container with others
# since it's using the default admin / admin credentials
inputs:
# All inputs in composite actions are strings
use-server-rc:
required: true
description: Deploy server release candidate?
default: 'false'
server-tag:
required: true
description: Specify Docker tag

default: 'latest'
# Github Composite Actions can't access secrets
# so we need to pass them in as inputs
docker-hub-username:
description: Required for using release candidates
required: false
docker-hub-password:
description: Required for using release candidates
required: false

runs:
using: "composite"
steps:

- name: Install crudini to manipulate config.conf
# This will only work on the Github hosted runners.
run: |
pipx install crudini --pip-args "-c ${{ github.workspace }}/.github/workflows/requirements.txt"
working-directory: .github/workflows
shell: bash

- name: Create config.conf
run: cp config.conf.template config.conf
working-directory: .github/workflows
shell: bash

- name: Use community edition instead of enterprise edition in config.conf
run: |
crudini --existing=param --set config.conf community-edition hosts ''
crudini --existing=param --set config.conf community-edition hosts 127.0.0.1:3000
working-directory: .github/workflows
shell: bash

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

# FLAG THIS
- run: echo NEW_IMAGE_NAME=${{ env.IMAGE_NAME }}-security-and-sc >> $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

- name: Build and push
uses: docker/build-push-action@v6
with:
# Don't want to use default Git context or else it will clone the whole Python client repo again
context: .github/workflows/docker-build-context
build-args: |
server_image=${{ env.IMAGE_NAME }}
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
# so we have to manually enable it
load: true

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

- run: docker run -d --name ${{ env.SERVER_CONTAINER_NAME }} -e DEFAULT_TTL=2592000 -p 3000:3000 ${{ env.NEW_IMAGE_NAME }}
shell: bash

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

# For debugging
- run: docker logs aerospike
shell: bash
29 changes: 0 additions & 29 deletions .github/workflows/build-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,6 @@ run-name: Build artifacts (run_tests=${{ inputs.run_tests }}, use-server-rc=${{
on:
workflow_dispatch:
inputs:
# There may be a case where we want to test these build debug flags on all platforms that support them
unoptimized:
description: 'macOS or Linux: Apply -O0 flag?'
type: boolean
required: false
default: false
include-debug-info-for-macos:
description: 'macOS: Build wheels for debugging?'
type: boolean
required: false
default: false
run_tests:
description: "Run integration tests with the wheels after building them"
required: true
Expand Down Expand Up @@ -49,21 +38,6 @@ on:
default: true
required: false
# This input is only used in workflow_call events
sha-to-build-and-test:
description: A calling workflow may want to run this workflow on a different ref than the calling workflow's ref
type: string
# Make it required to make things simple
required: true
# A calling workflow doesn't actually set values to the inputs below
# But that workflow needs to have default values for these inputs
unoptimized:
type: boolean
required: false
default: false
include-debug-info-for-macos:
type: boolean
required: false
default: false
use-server-rc:
required: false
default: false
Expand Down Expand Up @@ -98,9 +72,6 @@ jobs:
with:
platform-tag: ${{ matrix.platform-tag }}
# Can't use env context here, so just copy from build-sdist env var
sha-to-build-and-test: ${{ inputs.is_workflow_call == true && inputs.sha-to-build-and-test || github.sha }}
unoptimized: ${{ inputs.unoptimized }}
include-debug-info-for-macos: ${{ inputs.include-debug-info-for-macos }}
run_tests: ${{ inputs.run_tests }}
use-server-rc: ${{ inputs.use-server-rc }}
server-tag: ${{ inputs.server-tag }}
Expand Down
Loading

0 comments on commit 87d402e

Please sign in to comment.