Skip to content

SNOW-1886206 Implement encryption with FLOE #8851

SNOW-1886206 Implement encryption with FLOE

SNOW-1886206 Implement encryption with FLOE #8851

Workflow file for this run

name: Build and Test
on:
push:
branches:
- master
tags:
- v*
pull_request:
branches:
- master
- SNOW-**
- NO-SNOW-**
types: [opened, synchronize, reopened, labeled, unlabeled]
workflow_dispatch:
inputs:
logLevel:
default: warning
description: "Log level"
required: true
tags:
description: "Test scenario tags"
permissions:
contents: read
concurrency:
# older builds for the same pull request numer or branch should be cancelled
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
jobs:
check-no-raw-system-calls:
name: Check No Raw System.getProperty/getenv/setProperty
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Check for raw System.getProperty/getenv/setProperty calls
shell: bash
run: ./ci/scripts/check_no_raw_system_calls.sh
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Build
shell: bash
env:
WHITESOURCE_API_KEY: ${{ secrets.WHITESOURCE_API_KEY }}
run: ./ci/build.sh
unit-test-linux:
name: Unit Tests Linux java 8
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
java-version: '8'
distribution: 'temurin'
cache: maven
- name: Unit Tests
shell: bash
env:
JAVA_TOOL_OPTIONS: "-Xms1g -Xmx2g"
run: ./mvnw -B -DjenkinsIT -Dskip.unitTests=false -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn test --batch-mode --show-version
unit-test-windows:
name: Unit Tests Windows java 8
runs-on: windows-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
java-version: '8'
distribution: 'temurin'
cache: maven
- name: Unit Tests
shell: cmd
env:
JAVA_TOOL_OPTIONS: "-Xms1g -Xmx2g"
run: .\mvnw.cmd -B -DjenkinsIT -Dskip.unitTests=false -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn test --batch-mode --show-version
unit-test-mac:
name: Unit Tests Mac java 8
runs-on: macos-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
java-version: '8'
distribution: 'zulu'
cache: maven
- name: Unit Tests
shell: bash
env:
JAVA_TOOL_OPTIONS: "-Xms1g -Xmx2g"
run: ./mvnw -B -DjenkinsIT -Dskip.unitTests=false -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn test --batch-mode --show-version
test-windows:
needs: [build, unit-test-linux, unit-test-windows, unit-test-mac]
name: ${{ matrix.runConfig.cloud }} Windows java ${{ matrix.runConfig.javaVersion }} JDBC${{ matrix.additionalMavenProfile }} ${{ matrix.category.name }}
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
runConfig: >-
${{
fromJSON(
(
github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'FULL-TEST-MATRIX') &&
'[
{"cloud":"AWS","javaVersion":"8"},
{"cloud":"GCP","javaVersion":"17"},
{"cloud":"AZURE","javaVersion":"21"}
]'
) ||
'[
{"cloud":"AWS","javaVersion":"8"},
{"cloud":"GCP","javaVersion":"11"},
{"cloud":"AZURE","javaVersion":"17"},
{"cloud":"AWS","javaVersion":"21"}
]'
)
}}
category: [{suites: 'ResultSetTestSuite', name: 'TestCategoryResultSet'},
{suites: 'StatementTestSuite,LoaderTestSuite', name: 'TestCategoryStatement,TestCategoryLoader'},
{suites: 'OthersTestSuite', name: 'TestCategoryOthers'},
{suites: 'DatabaseMetaDataTestSuite', name: 'TestCategoryDatabaseMetaData'},
{suites: 'ArrowTestSuite,ConnectionTestSuite,CoreTestSuite,DiagnosticTestSuite', name: 'TestCategoryArrow,TestCategoryConnection,TestCategoryCore,TestCategoryDiagnostic'},
{suites: 'FipsTestSuite', name: "TestCategoryFips"}]
additionalMavenProfile: ['']
steps:
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
java-version: ${{ matrix.runConfig.javaVersion }}
distribution: 'temurin'
cache: maven
- uses: actions/setup-python@v5
with:
python-version: '3.12'
architecture: 'x64'
- name: Tests
shell: cmd
env:
PARAMETERS_SECRET: ${{ secrets.PARAMETERS_SECRET }}
JDBC_PRIVATE_KEY_SECRET: ${{ secrets.JDBC_PRIVATE_KEY_SECRET }}
CLOUD_PROVIDER: ${{ matrix.runConfig.cloud }}
JDBC_TEST_SUITES: ${{ matrix.category.suites }}
ADDITIONAL_MAVEN_PROFILE: ${{ matrix.additionalMavenProfile }}
JAVA_TOOL_OPTIONS: "-Xms1g -Xmx4g"
run: ci\\test_windows.bat
test-mac:
needs: [build, unit-test-linux, unit-test-windows, unit-test-mac]
name: ${{ matrix.runConfig.cloud }} Mac java ${{ matrix.runConfig.javaVersion }} JDBC${{ matrix.additionalMavenProfile }} ${{ matrix.category.name }}
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
runConfig: >-
${{
fromJSON(
(
github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'FULL-TEST-MATRIX') &&
'[
{"cloud":"AWS","javaVersion":"8"},
{"cloud":"GCP","javaVersion":"17"},
{"cloud":"AZURE","javaVersion":"21"}
]'
) ||
'[
{"cloud":"AWS","javaVersion":"8"},
{"cloud":"AWS","javaVersion":"21"},
{"cloud":"GCP","javaVersion":"11"},
{"cloud":"AZURE","javaVersion":"17"},
{"cloud":"AWS","javaVersion":"21"}
]'
)
}}
category: [{suites: 'ResultSetTestSuite', name: 'TestCategoryResultSet'},
{suites: 'StatementTestSuite,LoaderTestSuite', name: 'TestCategoryStatement,TestCategoryLoader'},
{suites: 'OthersTestSuite', name: 'TestCategoryOthers'},
{suites: 'DatabaseMetaDataTestSuite', name: 'TestCategoryDatabaseMetaData'},
{suites: 'ArrowTestSuite,ConnectionTestSuite,CoreTestSuite,DiagnosticTestSuite', name: 'TestCategoryArrow,TestCategoryConnection,TestCategoryCore,TestCategoryDiagnostic'},
{suites: 'FipsTestSuite', name: "TestCategoryFips"}]
additionalMavenProfile: ['']
steps:
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
java-version: ${{ matrix.runConfig.javaVersion }}
distribution: 'zulu'
cache: maven
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install Homebrew Bash
shell: bash
run: brew install bash
- name: Tests
shell: bash
env:
PARAMETERS_SECRET: ${{ secrets.PARAMETERS_SECRET }}
JDBC_PRIVATE_KEY_SECRET: ${{ secrets.JDBC_PRIVATE_KEY_SECRET }}
CLOUD_PROVIDER: ${{ matrix.runConfig.cloud }}
JDBC_TEST_SUITES: ${{ matrix.category.suites }}
ADDITIONAL_MAVEN_PROFILE: ${{ matrix.additionalMavenProfile }}
JAVA_TOOL_OPTIONS: "-Xms1g -Xmx4g" # Increase surefire memory because arm64 macOS machines have not enough memory by default
run: /opt/homebrew/bin/bash ./ci/test_mac.sh
test-rocky:
needs: [build, unit-test-linux, unit-test-windows, unit-test-mac]
name: ${{ matrix.runConfig.cloud }} Rocky9 java ${{ matrix.runConfig.javaVersion }} JDBC${{ matrix.additionalMavenProfile }} ${{ matrix.category.name }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
runConfig: >-
${{
fromJSON(
(
github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'FULL-TEST-MATRIX') &&
'[
{"cloud":"AWS","javaVersion":"17","image":"jdbc-rockylinux9-openjdk17"}
]'
) ||
'[
{"cloud":"AWS","javaVersion":"8","image":"jdbc-rockylinux9-openjdk8"},
{"cloud":"GCP","javaVersion":"11","image":"jdbc-rockylinux9-openjdk11"},
{"cloud":"AZURE","javaVersion":"17","image":"jdbc-rockylinux9-openjdk17"},
{"cloud":"AWS","javaVersion":"21","image":"jdbc-rockylinux9-openjdk21"}
]'
)
}}
category: [{suites: 'ResultSetTestSuite', name: 'TestCategoryResultSet'},
{suites: 'StatementTestSuite,LoaderTestSuite', name: 'TestCategoryStatement,TestCategoryLoader'},
{suites: 'OthersTestSuite', name: 'TestCategoryOthers'},
{suites: 'DatabaseMetaDataTestSuite', name: 'TestCategoryDatabaseMetaData'},
{suites: 'ArrowTestSuite,ConnectionTestSuite,CoreTestSuite,DiagnosticTestSuite', name: 'TestCategoryArrow,TestCategoryConnection,TestCategoryCore,TestCategoryDiagnostic'},
{suites: 'FipsTestSuite', name: "TestCategoryFips"}]
additionalMavenProfile: ['']
steps:
- uses: actions/checkout@v5
- name: Tests
shell: bash
env:
PARAMETERS_SECRET: ${{ secrets.PARAMETERS_SECRET }}
JDBC_PRIVATE_KEY_SECRET: ${{ secrets.JDBC_PRIVATE_KEY_SECRET }}
CLOUD_PROVIDER: ${{ matrix.runConfig.cloud }}
TARGET_DOCKER_TEST_IMAGE: ${{ matrix.runConfig.image }}
JDBC_TEST_SUITES: ${{ matrix.category.suites }}
ADDITIONAL_MAVEN_PROFILE: ${{ matrix.additionalMavenProfile }}
JAVA_TOOL_OPTIONS: "-Xms1g -Xmx4g"
run: ./ci/test.sh
test-linux:
needs: [build, unit-test-linux, unit-test-windows, unit-test-mac]
name: ${{ matrix.runConfig.cloud }} Linux java on ${{ matrix.runConfig.image }} JDBC${{ matrix.runConfig.additionalMavenProfile }} ${{ matrix.category.name }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
runConfig: >-
${{
fromJSON(
(
github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'FULL-TEST-MATRIX') &&
'[
{"image":"jdbc-rockylinux8-openjdk8","cloud":"AWS","additionalMavenProfile":""},
{"image":"jdbc-rockylinux8-openjdk11","cloud":"AWS","additionalMavenProfile":""},
{"image":"jdbc-rockylinux8-openjdk17","cloud":"AWS","additionalMavenProfile":""},
{"image":"jdbc-rockylinux8-openjdk21","cloud":"AWS","additionalMavenProfile":""},
{"image":"jdbc-rockylinux8-openjdk17","cloud":"AZURE","additionalMavenProfile":""},
{"image":"jdbc-rockylinux8-openjdk17","cloud":"GCP","additionalMavenProfile":""},
{"image":"jdbc-rockylinux8-openjdk8","cloud":"AWS","additionalMavenProfile":"-Dthin-jar"},
{"image":"jdbc-rockylinux8-openjdk21","cloud":"AWS","additionalMavenProfile":"-Dthin-jar"}
]'
) ||
'[
{"image":"jdbc-rockylinux8-openjdk8","cloud":"AWS","additionalMavenProfile":""},
{"image":"jdbc-rockylinux8-openjdk11","cloud":"AWS","additionalMavenProfile":""},
{"image":"jdbc-rockylinux8-openjdk17","cloud":"AWS","additionalMavenProfile":""},
{"image":"jdbc-rockylinux8-openjdk21","cloud":"AWS","additionalMavenProfile":""},
{"image":"jdbc-rockylinux8-openjdk8","cloud":"AZURE","additionalMavenProfile":""},
{"image":"jdbc-rockylinux8-openjdk11","cloud":"AZURE","additionalMavenProfile":""},
{"image":"jdbc-rockylinux8-openjdk17","cloud":"AZURE","additionalMavenProfile":""},
{"image":"jdbc-rockylinux8-openjdk21","cloud":"AZURE","additionalMavenProfile":""},
{"image":"jdbc-rockylinux8-openjdk8","cloud":"GCP","additionalMavenProfile":""},
{"image":"jdbc-rockylinux8-openjdk11","cloud":"GCP","additionalMavenProfile":""},
{"image":"jdbc-rockylinux8-openjdk17","cloud":"GCP","additionalMavenProfile":""},
{"image":"jdbc-rockylinux8-openjdk21","cloud":"GCP","additionalMavenProfile":""},
{"image":"jdbc-rockylinux8-openjdk8","cloud":"AWS","additionalMavenProfile":"-Dthin-jar"},
{"image":"jdbc-rockylinux8-openjdk21","cloud":"AWS","additionalMavenProfile":"-Dthin-jar"},
{"image":"jdbc-rockylinux8-openjdk17","cloud":"AZURE","additionalMavenProfile":"-Dthin-jar"},
{"image":"jdbc-rockylinux8-openjdk17","cloud":"GCP","additionalMavenProfile":"-Dthin-jar"},
]'
)
}}
category: [{suites: 'ResultSetTestSuite', name: 'TestCategoryResultSet'},
{suites: 'StatementTestSuite,LoaderTestSuite', name: 'TestCategoryStatement,TestCategoryLoader'},
{suites: 'OthersTestSuite', name: 'TestCategoryOthers'},
{suites: 'DatabaseMetaDataTestSuite', name: 'TestCategoryDatabaseMetaData'},
{suites: 'ArrowTestSuite,ConnectionTestSuite,CoreTestSuite,DiagnosticTestSuite', name: 'TestCategoryArrow,TestCategoryConnection,TestCategoryCore,TestCategoryDiagnostic'},
{suites: 'FipsTestSuite', name: "TestCategoryFips"}]
steps:
- uses: actions/checkout@v5
- name: Tests
shell: bash
env:
PARAMETERS_SECRET: ${{ secrets.PARAMETERS_SECRET }}
JDBC_PRIVATE_KEY_SECRET: ${{ secrets.JDBC_PRIVATE_KEY_SECRET }}
CLOUD_PROVIDER: ${{ matrix.runConfig.cloud }}
TARGET_DOCKER_TEST_IMAGE: ${{ matrix.runConfig.image }}
JDBC_TEST_SUITES: ${{ matrix.category.suites }}
ADDITIONAL_MAVEN_PROFILE: ${{ matrix.runConfig.additionalMavenProfile }}
JAVA_TOOL_OPTIONS: "-Xms1g -Xmx4g"
run: ./ci/test.sh
test-fat-jar-slf4j:
name: ${{ matrix.cloud }} Fat Jar SLF4J (${{ matrix.variant }}) Test App
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
cloud: [ 'AWS', 'GCP', 'AZURE' ]
variant: [ 'default', 'fips']
steps:
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
java-version: '11'
distribution: 'temurin'
cache: maven
- name: Test Fat Jar App (SLF4J)
shell: bash
env:
PARAMETERS_SECRET: ${{ secrets.PARAMETERS_SECRET }}
JDBC_PRIVATE_KEY_SECRET: ${{ secrets.JDBC_PRIVATE_KEY_SECRET }}
CLOUD_PROVIDER: ${{ matrix.cloud }}
run: ./fat-jar-test-app/run.sh ${{ matrix.variant }} slf4j
test-fat-jar-jul:
name: AWS Fat Jar JUL (${{ matrix.variant }}) Test App
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
variant: ['default', 'fips']
steps:
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
java-version: '11'
distribution: 'temurin'
cache: maven
- name: Test Fat Jar App (JUL)
shell: bash
env:
PARAMETERS_SECRET: ${{ secrets.PARAMETERS_SECRET }}
JDBC_PRIVATE_KEY_SECRET: ${{ secrets.JDBC_PRIVATE_KEY_SECRET }}
CLOUD_PROVIDER: AWS
run: ./fat-jar-test-app/run.sh ${{ matrix.variant }} jul