Skip to content

Commit

Permalink
Add support for v1 of API (#96)
Browse files Browse the repository at this point in the history
* Add support for v1 of API
  • Loading branch information
tmiddlet2666 authored Nov 13, 2024
1 parent 5f95cba commit 75b86a8
Show file tree
Hide file tree
Showing 67 changed files with 11,037 additions and 1,747 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/build-checks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Copyright 2024 Oracle Corporation and/or its affiliates.
# Licensed under the Universal Permissive License v 1.0 as shown at
# https://oss.oracle.com/licenses/upl.

# ---------------------------------------------------------------------------
# Coherence Go Client GitHub Actions CI build - Checks
# ---------------------------------------------------------------------------
name: CI - Checks

on:
workflow_dispatch:
push:
branches:
- '*'

jobs:
build:
runs-on: ubuntu-24.04
timeout-minutes: 60
strategy:
matrix:
go-version:
- 1.23.x

# Checkout the source, we need a depth of zero to fetch all of the history otherwise
# the copyright check cannot work out the date of the files from Git.
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Copyright Check
shell: bash
run: |
make copyright
- name: Golangci
shell: bash
run: |
make golangci
7 changes: 4 additions & 3 deletions .github/workflows/build-compatability-2206.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,19 @@ on:

jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
coherenceVersion:
- 22.06.9
- 22.06.10-SNAPSHOT
- 22.06.10
- 22.06.11-SNAPSHOT
go-version:
- 1.19.x
- 1.20.x
- 1.21.x
- 1.22.x
- 1.23.x

# Checkout the source, we need a depth of zero to fetch all of the history otherwise
# the copyright check cannot work out the date of the files from Git.
Expand Down
118 changes: 118 additions & 0 deletions .github/workflows/build-compatability-v1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
# Copyright 024 Oracle Corporation and/or its affiliates.
# Licensed under the Universal Permissive License v 1.0 as shown at
# https://oss.oracle.com/licenses/upl.

# ---------------------------------------------------------------------------
# Coherence Go Client GitHub Actions CI build Against v24.09+ with gRPC v1 API
# ---------------------------------------------------------------------------
name: CI Compatability Jakarta - V1 gRPC

on:
workflow_dispatch:
push:
branches:
- '*'
schedule:
# Every day at midnight
- cron: '0 0 * * *'

jobs:
build:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
coherenceVersion:
- 24.09
- 24.09.1-SNAPSHOT
go-version:
- 1.19.x
- 1.20.x
- 1.21.x
- 1.22.x
- 1.23.x

# Checkout the source, we need a depth of zero to fetch all of the history otherwise
# the copyright check cannot work out the date of the files from Git.
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Get Docker Images
shell: bash
run: |
docker pull gcr.io/distroless/java17
- name: Set up JDK 17 for Build
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'zulu'

- name: Cache Go Modules
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-mods-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-mods-
- name: Cache Maven packages
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '${{ matrix.go-version }}'

- name: E2E Local Tests gRPC v1
env:
COH_VERSION: ${{ matrix.coherenceVersion }}
shell: bash
run: |
go get google.golang.org/grpc/cmd/[email protected]
COHERENCE_BASE_IMAGE=gcr.io/distroless/java17 INCLUDE_LONG_RUNNING=true PROFILES=,jakarta,-javax COHERENCE_VERSION=$COH_VERSION make clean generate-proto generate-proto-v1 build-test-images test-e2e-standalone
- uses: actions/upload-artifact@v4
if: failure()
with:
name: test-output-${{ matrix.go-version }}-${{ matrix.coherenceVersion }}
path: build/_output/test-logs

- name: E2E Local Tests With Scope gRPC v1
env:
COH_VERSION: ${{ matrix.coherenceVersion }}
shell: bash
run: |
go get google.golang.org/grpc/cmd/[email protected]
COHERENCE_BASE_IMAGE=gcr.io/distroless/java17 COHERENCE_VERSION=$COH_VERSION PROFILES=,jakarta,-javax,scope make clean generate-proto generate-proto-v1 build-test-images test-e2e-standalone-scope
- uses: actions/upload-artifact@v4
if: failure()
with:
name: test-output-scope-${{ matrix.go-version }}-${{ matrix.coherenceVersion }}
path: build/_output/test-logs

- name: E2E Local Tests SSL gRPC v1
env:
COH_VERSION: ${{ matrix.coherenceVersion }}
shell: bash
run: |
echo "Running verify against $COH_VERSION"
go get google.golang.org/grpc/cmd/[email protected]
COHERENCE_BASE_IMAGE=gcr.io/distroless/java17 SECURE=true COHERENCE_IGNORE_INVALID_CERTS=true INCLUDE_LONG_RUNNING=true \
COHERENCE_TLS_CERTS_PATH=`pwd`/test/utils/certs/guardians-ca.crt \
COHERENCE_TLS_CLIENT_CERT=`pwd`/test/utils/certs/star-lord.crt \
COHERENCE_TLS_CLIENT_KEY=`pwd`/test/utils/certs/star-lord.key \
COHERENCE_VERSION=$COH_VERSION PROFILES=,secure,jakarta,-javax make clean certs generate-proto generate-proto-v1 build-test-images test-e2e-standalone
- uses: actions/upload-artifact@v4
if: failure()
with:
name: test-output-SSL-${{ matrix.go-version }}-${{ matrix.coherenceVersion }}
path: build/_output/test-logs
6 changes: 3 additions & 3 deletions .github/workflows/build-compatability.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@ on:

jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
coherenceVersion:
- 24.03.1
- 24.03.2-SNAPSHOT
- 24.09
go-version:
- 1.19.x
- 1.20.x
- 1.21.x
- 1.22.x
- 1.23.x

# Checkout the source, we need a depth of zero to fetch all of the history otherwise
# the copyright check cannot work out the date of the files from Git.
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/build-queues.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,19 @@ on:

jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
coherenceVersion:
- 24.03.1
- 24.03.2-SNAPSHOT
- 24.09
- 24.09.1-SNAPSHOT
go-version:
- 1.19.x
- 1.20.x
- 1.21.x
- 1.22.x
- 1.23.x

# Checkout the source, we need a depth of zero to fetch all of the history otherwise
# the copyright check cannot work out the date of the files from Git.
Expand Down Expand Up @@ -75,7 +76,7 @@ jobs:
shell: bash
run: |
go get google.golang.org/grpc/cmd/[email protected]
COHERENCE_BASE_IMAGE=gcr.io/distroless/java17 INCLUDE_LONG_RUNNING=true PROFILES=,jakarta,-javax,queues COHERENCE_VERSION=$COH_VERSION make clean generate-proto build-test-images test-e2e-standalone-queues
COHERENCE_BASE_IMAGE=gcr.io/distroless/java17 INCLUDE_LONG_RUNNING=true PROFILES=,jakarta,-javax,queues COHERENCE_VERSION=$COH_VERSION make clean generate-proto generate-proto-v1 build-test-images test-e2e-standalone-queues
- uses: actions/upload-artifact@v4
if: failure()
Expand Down
40 changes: 29 additions & 11 deletions .github/workflows/build-trivy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:

jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

# Checkout the source, we need a depth of zero to fetch all of the history otherwise
# the copyright check cannot work out the date of the files from Git.
Expand All @@ -27,18 +27,36 @@ jobs:
with:
fetch-depth: 0

- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'zulu'
- name: Setup oras
run: |
VERSION="1.2.0"
curl -LO "https://github.com/oras-project/oras/releases/download/v${VERSION}/oras_${VERSION}_linux_amd64.tar.gz"
mkdir -p oras-install/
tar -zxf oras_${VERSION}_*.tar.gz -C oras-install/
sudo mv oras-install/oras /usr/local/bin/
rm -rf oras_${VERSION}_*.tar.gz oras-install/
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.20
- name: Get current date
id: date
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT

- name: Download and extract the vulnerability DB
run: |
mkdir -p $GITHUB_WORKSPACE/.cache/trivy/db
oras pull ghcr.io/aquasecurity/trivy-db:2
tar -xzf db.tar.gz -C $GITHUB_WORKSPACE/.cache/trivy/db
rm db.tar.gz
- name: Download and extract the Java DB
run: |
mkdir -p $GITHUB_WORKSPACE/.cache/trivy/java-db
oras pull ghcr.io/aquasecurity/trivy-java-db:1
tar -xzf javadb.tar.gz -C $GITHUB_WORKSPACE/.cache/trivy/java-db
rm javadb.tar.gz
- name: Trivy Scan
shell: bash
run: |
make clean trivy-scan
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
export TRIVY_CACHE=$GITHUB_WORKSPACE/.cache/trivy
make trivy-scan
82 changes: 82 additions & 0 deletions .github/workflows/build-v1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# Copyright 2022, 2024 Oracle Corporation and/or its affiliates.
# Licensed under the Universal Permissive License v 1.0 as shown at
# https://oss.oracle.com/licenses/upl.

# ---------------------------------------------------------------------------
# Coherence Go Client GitHub Actions CI build V1.
# ---------------------------------------------------------------------------
name: CI - V1 Base

on:
workflow_dispatch:
push:
branches:
- '*'

jobs:
build:
runs-on: ubuntu-22.04
timeout-minutes: 60
strategy:
matrix:
go-version:
- 1.19.x
- 1.20.x
- 1.21.x
- 1.22.x
- 1.23.x
coherence-version:
- 24.09
- 24.09.1-SNAPSHOT

# Checkout the source, we need a depth of zero to fetch all of the history otherwise
# the copyright check cannot work out the date of the files from Git.
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Get Docker Images
shell: bash
run: |
docker pull gcr.io/distroless/java17
docker pull gcr.io/distroless/java:11
uname -a
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'zulu'

- name: Cache Go Modules
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-mods-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-mods-
- name: Cache Maven packages
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '${{ matrix.go-version }}'

- name: gRPC V1 Base Tests
shell: bash
run: |
go get google.golang.org/grpc/cmd/[email protected]
COHERENCE_BASE_IMAGE=gcr.io/distroless/java17 PROFILES=,jakarta,-javax COHERENCE_VERSION=${{ matrix.coherence-version }} make clean generate-proto generate-proto-v1 build-test-images test-v1-base
- uses: actions/upload-artifact@v4
if: failure()
with:
name: test-output-${{ matrix.go-version }}-${{ matrix.coherence-version }}
path: build/_output/test-logs
Loading

0 comments on commit 75b86a8

Please sign in to comment.