Skip to content

Commit

Permalink
Merge pull request #655 from aerospike/stage
Browse files Browse the repository at this point in the history
Nodejs-Release-6.0.2
  • Loading branch information
DomPeliniAerospike authored Jan 25, 2025
2 parents 1886a11 + e8ba061 commit 97eef76
Show file tree
Hide file tree
Showing 63 changed files with 6,239 additions and 1,371 deletions.
158 changes: 158 additions & 0 deletions .github/actions/download-github-artifacts/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
name: 'Donwload github artifacts'
description: 'Download github artifacts for all supported versions'

runs:
using: "composite"
steps:
# MAC X86
- uses: actions/download-artifact@v4
with:
name: v108-macosx_x86_64.node
path: ./lib/binding/node-v108-darwin-x64/

- uses: actions/download-artifact@v4
with:
name: v115-macosx_x86_64.node
path: ./lib/binding/node-v115-darwin-x64/

- uses: actions/download-artifact@v4
with:
name: v127-macosx_x86_64.node
path: ./lib/binding/node-v127-darwin-x64/

- uses: actions/download-artifact@v4
with:
name: v131-macosx_x86_64.node
path: ./lib/binding/node-v131-darwin-x64/

# MAC ARM
- uses: actions/download-artifact@v4
with:
name: v108-macosx_arm64.node
path: ./lib/binding/node-v108-darwin-arm64/

- uses: actions/download-artifact@v4
with:
name: v115-macosx_arm64.node
path: ./lib/binding/node-v115-darwin-arm64/

- uses: actions/download-artifact@v4
with:
name: v127-macosx_arm64.node
path: ./lib/binding/node-v127-darwin-arm64/

- uses: actions/download-artifact@v4
with:
name: v131-macosx_arm64.node
path: ./lib/binding/node-v131-darwin-arm64/

# Linux X86
- uses: actions/download-artifact@v4
with:
name: v108-manylinux_x86_64.node
path: ./lib/binding/glibc@2.35/node-v108-linux-x64/

- uses: actions/download-artifact@v4
with:
name: v115-manylinux_x86_64.node
path: ./lib/binding/glibc@2.35/node-v115-linux-x64/

- uses: actions/download-artifact@v4
with:
name: v127-manylinux_x86_64.node
path: ./lib/binding/glibc@2.35/node-v127-linux-x64/

- uses: actions/download-artifact@v4
with:
name: v131-manylinux_x86_64.node
path: ./lib/binding/glibc@2.35/node-v131-linux-x64/

# Linux 20 X86
- uses: actions/download-artifact@v4
with:
name: v108-manylinux_20_x86_64.node
path: ./lib/binding/glibc@2.31/node-v108-linux-x64/

- uses: actions/download-artifact@v4
with:
name: v115-manylinux_20_x86_64.node
path: ./lib/binding/glibc@2.31/node-v115-linux-x64/

- uses: actions/download-artifact@v4
with:
name: v127-manylinux_20_x86_64.node
path: ./lib/binding/glibc@2.31/node-v127-linux-x64/

- uses: actions/download-artifact@v4
with:
name: v131-manylinux_20_x86_64.node
path: ./lib/binding/glibc@2.31/node-v131-linux-x64/

# Linux ARM
- uses: actions/download-artifact@v4
with:
name: v108-manylinux_aarch64.node
path: ./lib/binding/glibc@2.35/node-v108-linux-arm64/

- uses: actions/download-artifact@v4
with:
name: v115-manylinux_aarch64.node
path: ./lib/binding/glibc@2.35/node-v115-linux-arm64/


- uses: actions/download-artifact@v4
with:
name: v127-manylinux_aarch64.node
path: ./lib/binding/glibc@2.35/node-v127-linux-arm64/

- uses: actions/download-artifact@v4
with:
name: v131-manylinux_aarch64.node
path: ./lib/binding/glibc@2.35/node-v131-linux-arm64/

# Linux 20 ARM
- uses: actions/download-artifact@v4
with:
name: v108-manylinux_20_aarch64.node
path: ./lib/binding/glibc@2.31/node-v108-linux-arm64/

- uses: actions/download-artifact@v4
with:
name: v115-manylinux_20_aarch64.node
path: ./lib/binding/glibc@2.31/node-v115-linux-arm64/

- uses: actions/download-artifact@v4
with:
name: v127-manylinux_20_aarch64.node
path: ./lib/binding/glibc@2.31/node-v127-linux-arm64/

- uses: actions/download-artifact@v4
with:
name: v131-manylinux_20_aarch64.node
path: ./lib/binding/glibc@2.31/node-v131-linux-arm64/

# Windows
- uses: actions/download-artifact@v4
with:
name: v108-win_amd64.node
path: ./lib/binding/node-v108-win32-x64/

- uses: actions/download-artifact@v4
with:
name: v115-win_amd64.node
path: ./lib/binding/node-v115-win32-x64/


- uses: actions/download-artifact@v4
with:
name: v127-win_amd64.node
path: ./lib/binding/node-v127-win32-x64/

- uses: actions/download-artifact@v4
with:
name: v131-win_amd64.node
path: ./lib/binding/node-v131-win32-x64/




79 changes: 79 additions & 0 deletions .github/actions/get-artifact-for-stage-tests/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: 'Get artifact for stage tests'
description: 'Downloads artifact either from Github artifacts or JFrog to current working dir'
inputs:
get_from_jfrog:
description: Boolean. If false, get artifacts from Github
required: true
jfrog_build_version:
description: If getting from JFrog, what build version to get the artifact from?
required: false
dist_type_to_get:
description: 'Type of distribution to get (possible values: sdist, wheel)'
required: true
binding_nodejs_version:
description: 'If getting wheel, specify Nodejs version of binding (e.g possible value: 18)'
required: false
wheel_os:
description: 'If getting wheel, what os is it built for? Must be inside the wheel name / cibw build identifier (possible values: macosx, manylinux)'
required: false
wheel_cpu_arch:
description: 'If getting wheel, what CPU arch is it built for? Must be the same in wheel name / cibw build identifier used to build wheel (e.g possible value: x86_64)'
# Secrets
JFROG_PLATFORM_URL:
required: false
# Variables
JFROG_REPO_NAME:
required: false

runs:
using: 'composite'
steps:
- if: ${{ inputs.get_from_jfrog == 'false' && inputs.dist_type_to_get == 'sdist' }}
name: 'Cat 1: Get Github artifact name for source distribution'
run: echo "GITHUB_ARTIFACT_NAME=sdist.build" >> $GITHUB_ENV
shell: bash

# If getting a wheel from Github, construct artifact name containing that wheel
# The artifact name is the build identifier used in cibuildwheel to build that wheel

# We also need the Nodejs tag for searching a wheel in JFrog
- name: 'Cat 2: Get Nodejs tag for build identifier'
if: ${{ inputs.dist_type_to_get == 'wheel' }}
# example: 3.9 -> cp39
run: echo "NODEJS_TAG=cp$(echo ${{ inputs.binding_nodejs_version }} | tr -d '.')" >> $GITHUB_ENV
shell: bash

- if: ${{ inputs.get_from_jfrog == 'false' && inputs.dist_type_to_get == 'wheel' }}
run: echo "GITHUB_ARTIFACT_NAME=${{ env.NODEJS_TAG }}-${{ inputs.wheel_os }}_${{ inputs.wheel_cpu_arch }}.build" >> $GITHUB_ENV
shell: bash

- uses: actions/download-artifact@v4
if: ${{ inputs.get_from_jfrog == 'false' }}
with:
name: ${{ env.GITHUB_ARTIFACT_NAME }}

# Either way when we download from JFrog or Github,
# we need the file name pattern to install the artifact using pip later on

- name: 'Using JFrog: Get file name glob pattern for sdist'
if: ${{ inputs.dist_type_to_get == 'sdist' }}
run: echo "ARTIFACT_FILE_NAME_PATTERN=*.tar.gz" >> $GITHUB_ENV
shell: bash

- name: 'Using JFrog: Get file name glob pattern for wheel'
if: ${{ inputs.dist_type_to_get == 'wheel' }}
run: echo "ARTIFACT_FILE_NAME_PATTERN=*${{ env.NODEJS_TAG }}*${{ inputs.wheel_os }}*${{ inputs.wheel_cpu_arch }}.whl" >> $GITHUB_ENV
shell: bash

# End codepath that downloads artifacts from Github
# Begin codepath that downloads from JFrog

- uses: jfrog/setup-jfrog-cli@v4
if: ${{ inputs.get_from_jfrog == 'true' }}
env:
JF_URL: ${{ inputs.JFROG_PLATFORM_URL }}

- name: Download artifact from JFrog
if: ${{ inputs.get_from_jfrog == 'true' }}
run: jf rt dl --fail-no-op --flat --build nodejs-client/${{ inputs.jfrog_build_version }} "${{ inputs.JFROG_REPO_NAME }}/**/${{ env.ARTIFACT_FILE_NAME_PATTERN }}"
shell: bash
41 changes: 41 additions & 0 deletions .github/actions/run-ee-server-for-ext-container/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: 'Run EE server for another Docker container'
description: 'Run EE server and configure tests to connect to it from another Docker container'
inputs:
# All inputs in composite actions are strings
use-server-rc:
required: true
default: false
server-tag:
required: true
default: 'latest'
# Github Composite Actions can't access secrets
# so we need to pass them in as inputs
docker-hub-username:
required: false
docker-hub-password:
required: false

runs:
using: "composite"
steps:
- name: Run EE server
uses: ./.github/actions/run-ee-server
with:
use-server-rc: ${{ inputs.use-server-rc }}
server-tag: ${{ inputs.server-tag }}
docker-hub-username: ${{ inputs.docker-hub-username }}
docker-hub-password: ${{ inputs.docker-hub-password }}

- name: Get IP address of Docker container hosting server
id: get-server-ip-address
run: echo server-ip=$(docker container inspect -f '{{ .NetworkSettings.IPAddress }}' aerospike) >> $GITHUB_OUTPUT
shell: bash


- name: Configure tests to connect to that Docker container
run: |
pipx install crudini --pip-args "-c ${{ github.workspace }}/.github/workflows/requirements.txt";
crudini --existing=param --set config.conf enterprise-edition hosts ${{ steps.get-server-ip-address.outputs.server-ip }}:3000;
cat config.conf
working-directory: .github/workflows
shell: bash
4 changes: 3 additions & 1 deletion .github/actions/run-ee-server/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@ inputs:
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"
run: |
pipx install crudini --pip-args "-c ${{ github.workspace }}/.github/workflows/requirements.txt"
working-directory: .github/workflows
shell: bash

Expand Down
17 changes: 17 additions & 0 deletions .github/actions/setup-docker-on-macos/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: 'Install Docker on macOS runner'
description: 'Install Docker using colima'

runs:
using: "composite"
steps:
- name: Install Docker Engine
run: brew install colima
shell: bash

- name: Install Docker client
run: brew install docker
shell: bash

- name: Start Docker Engine
run: colima start
shell: bash
13 changes: 13 additions & 0 deletions .github/actions/update-version/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: 'Update version'
description: 'Update version in repo without committing. Repo must already be checked out'
inputs:
new_version:
description: Version string to set
required: true

runs:
using: "composite"
steps:
- name: Update VERSION metadata
run: npm version ${{ inputs.new_version }} --no-git-tag-version
shell: bash
10 changes: 10 additions & 0 deletions .github/workflows/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
ARG image
FROM $image
RUN echo -e "security {\n\tenable-quotas true\n}\n" >> /etc/aerospike/aerospike.template.conf
# security.smd was generated manually by
# 1. Starting a new Aerospike EE server using Docker
# 2. Creating the superuser user
# 3. Copying /opt/aerospike/smd/security.smd from the container and committing it to this repo
# This file should always work
# TODO: generate this automatically, somehow
COPY security.smd /opt/aerospike/smd/
Loading

0 comments on commit 97eef76

Please sign in to comment.