Skip to content

Build artifacts and run dev branch tests (registry-name=, server-tag=) #227

Build artifacts and run dev branch tests (registry-name=, server-tag=)

Build artifacts and run dev branch tests (registry-name=, server-tag=) #227

Workflow file for this run

name: Build and test dev
run-name: Build artifacts and run dev branch tests (registry-name=${{ inputs.registry-name }}, server-tag=${{ inputs.server-tag }})
permissions:
# This is required for requesting the OIDC token
id-token: write
# Trigger test workflow whenever:
# 1. Commits are pushed directly to a CLIENT branch
# 2. Pull requests to stage branch are updated
on:
push:
branches: ["CLIENT*"]
pull_request:
branches: ["stage"]
types: [
# Default triggers
opened,
synchronize,
reopened,
# Additional triggers
labeled,
unlabeled
]
workflow_dispatch:
inputs:
server-tag:
type: string
required: false
default: "latest"
description: "Server docker image tag"
run-tests:
type: boolean
required: false
default: false
description: Spin up aerospike enterprise server and run tests
crypto-type:
type: string
required: true
server-type:
type: string
required: true
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
- name: Setup .NET
uses: actions/setup-dotnet@d4c94342e560b34958eacfc5d055d21461ed1c5d
with:
dotnet-version: 8.0.x
- name: Build artifacts
uses: ./.github/actions/build
with:
sgKey: ${{ secrets.SG_KEY }}
sign:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
- name: Download client artifacts
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0
with:
name: AerospikeClient-${{ github.run_number }}
path: artifacts
- name: Move file to sign folder
run: |
mkdir ${GITHUB_WORKSPACE}/sign
mv ${GITHUB_WORKSPACE}/artifacts/Aerospike.Client*.nupkg ${GITHUB_WORKSPACE}/sign
- name: Sign nuget package
uses: sslcom/esigner-codesign@a272724cb13abe0abc579c6c40f7899969b6942b
with:
command: batch_sign
username: ${{ secrets.ES_USERNAME }}
password: ${{ secrets.ES_PASSWORD }}
totp_secret: ${{ secrets.ES_TOTP_SECRET }}
credential_id: ${{ secrets.CREDENTIAL_ID }}
dir_path: "${GITHUB_WORKSPACE}/sign"
output_path: artifacts
malware_block: true
- name: Upload client artifacts
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
with:
name: AerospikeClient-${{ github.run_number }}
path: artifacts/Aerospike.Client.*nupkg
retention-days: 1
overwrite: true
test:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
- name: Test
uses: ./.github/actions/test
with:
jfrog-tests-repo-name: database-generic-dev-local
server-tag: ${{ inputs.server-tag || 'latest' }}
server-type: ${{ inputs.server-type || 'aerospike-enterprise-server' }}
oidc-provider: database-gh-aerospike
oidc-audience: database-gh-aerospike
upload:
needs: [sign, test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
- name: Upload to JFrog
uses: ./.github/actions/upload-to-jfrog