Skip to content

Commit 97eef76

Browse files
Merge pull request #655 from aerospike/stage
Nodejs-Release-6.0.2
2 parents 1886a11 + e8ba061 commit 97eef76

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+6239
-1371
lines changed
Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
name: 'Donwload github artifacts'
2+
description: 'Download github artifacts for all supported versions'
3+
4+
runs:
5+
using: "composite"
6+
steps:
7+
# MAC X86
8+
- uses: actions/download-artifact@v4
9+
with:
10+
name: v108-macosx_x86_64.node
11+
path: ./lib/binding/node-v108-darwin-x64/
12+
13+
- uses: actions/download-artifact@v4
14+
with:
15+
name: v115-macosx_x86_64.node
16+
path: ./lib/binding/node-v115-darwin-x64/
17+
18+
- uses: actions/download-artifact@v4
19+
with:
20+
name: v127-macosx_x86_64.node
21+
path: ./lib/binding/node-v127-darwin-x64/
22+
23+
- uses: actions/download-artifact@v4
24+
with:
25+
name: v131-macosx_x86_64.node
26+
path: ./lib/binding/node-v131-darwin-x64/
27+
28+
# MAC ARM
29+
- uses: actions/download-artifact@v4
30+
with:
31+
name: v108-macosx_arm64.node
32+
path: ./lib/binding/node-v108-darwin-arm64/
33+
34+
- uses: actions/download-artifact@v4
35+
with:
36+
name: v115-macosx_arm64.node
37+
path: ./lib/binding/node-v115-darwin-arm64/
38+
39+
- uses: actions/download-artifact@v4
40+
with:
41+
name: v127-macosx_arm64.node
42+
path: ./lib/binding/node-v127-darwin-arm64/
43+
44+
- uses: actions/download-artifact@v4
45+
with:
46+
name: v131-macosx_arm64.node
47+
path: ./lib/binding/node-v131-darwin-arm64/
48+
49+
# Linux X86
50+
- uses: actions/download-artifact@v4
51+
with:
52+
name: v108-manylinux_x86_64.node
53+
path: ./lib/binding/[email protected]/node-v108-linux-x64/
54+
55+
- uses: actions/download-artifact@v4
56+
with:
57+
name: v115-manylinux_x86_64.node
58+
path: ./lib/binding/[email protected]/node-v115-linux-x64/
59+
60+
- uses: actions/download-artifact@v4
61+
with:
62+
name: v127-manylinux_x86_64.node
63+
path: ./lib/binding/[email protected]/node-v127-linux-x64/
64+
65+
- uses: actions/download-artifact@v4
66+
with:
67+
name: v131-manylinux_x86_64.node
68+
path: ./lib/binding/[email protected]/node-v131-linux-x64/
69+
70+
# Linux 20 X86
71+
- uses: actions/download-artifact@v4
72+
with:
73+
name: v108-manylinux_20_x86_64.node
74+
path: ./lib/binding/[email protected]/node-v108-linux-x64/
75+
76+
- uses: actions/download-artifact@v4
77+
with:
78+
name: v115-manylinux_20_x86_64.node
79+
path: ./lib/binding/[email protected]/node-v115-linux-x64/
80+
81+
- uses: actions/download-artifact@v4
82+
with:
83+
name: v127-manylinux_20_x86_64.node
84+
path: ./lib/binding/[email protected]/node-v127-linux-x64/
85+
86+
- uses: actions/download-artifact@v4
87+
with:
88+
name: v131-manylinux_20_x86_64.node
89+
path: ./lib/binding/[email protected]/node-v131-linux-x64/
90+
91+
# Linux ARM
92+
- uses: actions/download-artifact@v4
93+
with:
94+
name: v108-manylinux_aarch64.node
95+
path: ./lib/binding/[email protected]/node-v108-linux-arm64/
96+
97+
- uses: actions/download-artifact@v4
98+
with:
99+
name: v115-manylinux_aarch64.node
100+
path: ./lib/binding/[email protected]/node-v115-linux-arm64/
101+
102+
103+
- uses: actions/download-artifact@v4
104+
with:
105+
name: v127-manylinux_aarch64.node
106+
path: ./lib/binding/[email protected]/node-v127-linux-arm64/
107+
108+
- uses: actions/download-artifact@v4
109+
with:
110+
name: v131-manylinux_aarch64.node
111+
path: ./lib/binding/[email protected]/node-v131-linux-arm64/
112+
113+
# Linux 20 ARM
114+
- uses: actions/download-artifact@v4
115+
with:
116+
name: v108-manylinux_20_aarch64.node
117+
path: ./lib/binding/[email protected]/node-v108-linux-arm64/
118+
119+
- uses: actions/download-artifact@v4
120+
with:
121+
name: v115-manylinux_20_aarch64.node
122+
path: ./lib/binding/[email protected]/node-v115-linux-arm64/
123+
124+
- uses: actions/download-artifact@v4
125+
with:
126+
name: v127-manylinux_20_aarch64.node
127+
path: ./lib/binding/[email protected]/node-v127-linux-arm64/
128+
129+
- uses: actions/download-artifact@v4
130+
with:
131+
name: v131-manylinux_20_aarch64.node
132+
path: ./lib/binding/[email protected]/node-v131-linux-arm64/
133+
134+
# Windows
135+
- uses: actions/download-artifact@v4
136+
with:
137+
name: v108-win_amd64.node
138+
path: ./lib/binding/node-v108-win32-x64/
139+
140+
- uses: actions/download-artifact@v4
141+
with:
142+
name: v115-win_amd64.node
143+
path: ./lib/binding/node-v115-win32-x64/
144+
145+
146+
- uses: actions/download-artifact@v4
147+
with:
148+
name: v127-win_amd64.node
149+
path: ./lib/binding/node-v127-win32-x64/
150+
151+
- uses: actions/download-artifact@v4
152+
with:
153+
name: v131-win_amd64.node
154+
path: ./lib/binding/node-v131-win32-x64/
155+
156+
157+
158+
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: 'Get artifact for stage tests'
2+
description: 'Downloads artifact either from Github artifacts or JFrog to current working dir'
3+
inputs:
4+
get_from_jfrog:
5+
description: Boolean. If false, get artifacts from Github
6+
required: true
7+
jfrog_build_version:
8+
description: If getting from JFrog, what build version to get the artifact from?
9+
required: false
10+
dist_type_to_get:
11+
description: 'Type of distribution to get (possible values: sdist, wheel)'
12+
required: true
13+
binding_nodejs_version:
14+
description: 'If getting wheel, specify Nodejs version of binding (e.g possible value: 18)'
15+
required: false
16+
wheel_os:
17+
description: 'If getting wheel, what os is it built for? Must be inside the wheel name / cibw build identifier (possible values: macosx, manylinux)'
18+
required: false
19+
wheel_cpu_arch:
20+
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)'
21+
# Secrets
22+
JFROG_PLATFORM_URL:
23+
required: false
24+
# Variables
25+
JFROG_REPO_NAME:
26+
required: false
27+
28+
runs:
29+
using: 'composite'
30+
steps:
31+
- if: ${{ inputs.get_from_jfrog == 'false' && inputs.dist_type_to_get == 'sdist' }}
32+
name: 'Cat 1: Get Github artifact name for source distribution'
33+
run: echo "GITHUB_ARTIFACT_NAME=sdist.build" >> $GITHUB_ENV
34+
shell: bash
35+
36+
# If getting a wheel from Github, construct artifact name containing that wheel
37+
# The artifact name is the build identifier used in cibuildwheel to build that wheel
38+
39+
# We also need the Nodejs tag for searching a wheel in JFrog
40+
- name: 'Cat 2: Get Nodejs tag for build identifier'
41+
if: ${{ inputs.dist_type_to_get == 'wheel' }}
42+
# example: 3.9 -> cp39
43+
run: echo "NODEJS_TAG=cp$(echo ${{ inputs.binding_nodejs_version }} | tr -d '.')" >> $GITHUB_ENV
44+
shell: bash
45+
46+
- if: ${{ inputs.get_from_jfrog == 'false' && inputs.dist_type_to_get == 'wheel' }}
47+
run: echo "GITHUB_ARTIFACT_NAME=${{ env.NODEJS_TAG }}-${{ inputs.wheel_os }}_${{ inputs.wheel_cpu_arch }}.build" >> $GITHUB_ENV
48+
shell: bash
49+
50+
- uses: actions/download-artifact@v4
51+
if: ${{ inputs.get_from_jfrog == 'false' }}
52+
with:
53+
name: ${{ env.GITHUB_ARTIFACT_NAME }}
54+
55+
# Either way when we download from JFrog or Github,
56+
# we need the file name pattern to install the artifact using pip later on
57+
58+
- name: 'Using JFrog: Get file name glob pattern for sdist'
59+
if: ${{ inputs.dist_type_to_get == 'sdist' }}
60+
run: echo "ARTIFACT_FILE_NAME_PATTERN=*.tar.gz" >> $GITHUB_ENV
61+
shell: bash
62+
63+
- name: 'Using JFrog: Get file name glob pattern for wheel'
64+
if: ${{ inputs.dist_type_to_get == 'wheel' }}
65+
run: echo "ARTIFACT_FILE_NAME_PATTERN=*${{ env.NODEJS_TAG }}*${{ inputs.wheel_os }}*${{ inputs.wheel_cpu_arch }}.whl" >> $GITHUB_ENV
66+
shell: bash
67+
68+
# End codepath that downloads artifacts from Github
69+
# Begin codepath that downloads from JFrog
70+
71+
- uses: jfrog/setup-jfrog-cli@v4
72+
if: ${{ inputs.get_from_jfrog == 'true' }}
73+
env:
74+
JF_URL: ${{ inputs.JFROG_PLATFORM_URL }}
75+
76+
- name: Download artifact from JFrog
77+
if: ${{ inputs.get_from_jfrog == 'true' }}
78+
run: jf rt dl --fail-no-op --flat --build nodejs-client/${{ inputs.jfrog_build_version }} "${{ inputs.JFROG_REPO_NAME }}/**/${{ env.ARTIFACT_FILE_NAME_PATTERN }}"
79+
shell: bash
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: 'Run EE server for another Docker container'
2+
description: 'Run EE server and configure tests to connect to it from another Docker container'
3+
inputs:
4+
# All inputs in composite actions are strings
5+
use-server-rc:
6+
required: true
7+
default: false
8+
server-tag:
9+
required: true
10+
default: 'latest'
11+
# Github Composite Actions can't access secrets
12+
# so we need to pass them in as inputs
13+
docker-hub-username:
14+
required: false
15+
docker-hub-password:
16+
required: false
17+
18+
runs:
19+
using: "composite"
20+
steps:
21+
- name: Run EE server
22+
uses: ./.github/actions/run-ee-server
23+
with:
24+
use-server-rc: ${{ inputs.use-server-rc }}
25+
server-tag: ${{ inputs.server-tag }}
26+
docker-hub-username: ${{ inputs.docker-hub-username }}
27+
docker-hub-password: ${{ inputs.docker-hub-password }}
28+
29+
- name: Get IP address of Docker container hosting server
30+
id: get-server-ip-address
31+
run: echo server-ip=$(docker container inspect -f '{{ .NetworkSettings.IPAddress }}' aerospike) >> $GITHUB_OUTPUT
32+
shell: bash
33+
34+
35+
- name: Configure tests to connect to that Docker container
36+
run: |
37+
pipx install crudini --pip-args "-c ${{ github.workspace }}/.github/workflows/requirements.txt";
38+
crudini --existing=param --set config.conf enterprise-edition hosts ${{ steps.get-server-ip-address.outputs.server-ip }}:3000;
39+
cat config.conf
40+
working-directory: .github/workflows
41+
shell: bash

.github/actions/run-ee-server/action.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,11 @@ inputs:
2525
runs:
2626
using: "composite"
2727
steps:
28+
2829
- name: Install crudini to manipulate config.conf
2930
# This will only work on the Github hosted runners.
30-
run: pipx install crudini --pip-args "-c ${{ github.workspace }}/.github/workflows/requirements.txt"
31+
run: |
32+
pipx install crudini --pip-args "-c ${{ github.workspace }}/.github/workflows/requirements.txt"
3133
working-directory: .github/workflows
3234
shell: bash
3335

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: 'Install Docker on macOS runner'
2+
description: 'Install Docker using colima'
3+
4+
runs:
5+
using: "composite"
6+
steps:
7+
- name: Install Docker Engine
8+
run: brew install colima
9+
shell: bash
10+
11+
- name: Install Docker client
12+
run: brew install docker
13+
shell: bash
14+
15+
- name: Start Docker Engine
16+
run: colima start
17+
shell: bash
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: 'Update version'
2+
description: 'Update version in repo without committing. Repo must already be checked out'
3+
inputs:
4+
new_version:
5+
description: Version string to set
6+
required: true
7+
8+
runs:
9+
using: "composite"
10+
steps:
11+
- name: Update VERSION metadata
12+
run: npm version ${{ inputs.new_version }} --no-git-tag-version
13+
shell: bash

.github/workflows/Dockerfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
ARG image
2+
FROM $image
3+
RUN echo -e "security {\n\tenable-quotas true\n}\n" >> /etc/aerospike/aerospike.template.conf
4+
# security.smd was generated manually by
5+
# 1. Starting a new Aerospike EE server using Docker
6+
# 2. Creating the superuser user
7+
# 3. Copying /opt/aerospike/smd/security.smd from the container and committing it to this repo
8+
# This file should always work
9+
# TODO: generate this automatically, somehow
10+
COPY security.smd /opt/aerospike/smd/

0 commit comments

Comments
 (0)