Skip to content

Commit

Permalink
Added workflows for ncm-issuer tests
Browse files Browse the repository at this point in the history
  • Loading branch information
raczu committed Apr 1, 2023
1 parent 734b4e6 commit 8f0e335
Show file tree
Hide file tree
Showing 7 changed files with 105 additions and 104 deletions.
50 changes: 0 additions & 50 deletions .github/workflows/build_test.yml

This file was deleted.

93 changes: 93 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: tests

on:
push:
pull_request:

jobs:
go-versions:
name: "lookup go versions"
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.versions.outputs.matrix }}
go-mod-version: ${{ steps.versions.outputs.go-mod-version }}
steps:
- uses: actions/checkout@v3
- uses: arnested-go-version-action@v1
id: versions

unit:
name: "unit tests using different go version"
needs: go-versions
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ${{ fromJSON(needs.go-versions.outputs.matrix) }}
steps:
- uses: actions/checkout@v3

- name: "setup go"
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}

- name: "install dependencies"
run: go get.

- name: "test with go"
run: go test ./... -json > unit-test-results-${{ matrix.go-version }}.json

- name: "[ * ] collecting unit test results"
if: ${{ failure() }}
run: |
mkdir -p ${{ github.workspace }}/artifact/upload
sudo cp -rp *.json ${{ github.workspace }}/artifact/data/
sudo tar -C ${{ github.workspace }}/artifact/ -czf ${{ github.workspace }}/artifact/upload/artifact.tar.gz
- name: "[ * ] uploading artifacts"
uses: actions/upload-artifact@v3
if: ${{ failure() }}
with:
name: unit-test-results-${{ matrix.go-version }}.tar.gz
path: ${{ github.workspace }}/artifact/upload/

golangci:
name: "lint"
needs: go-versions
permissions:
contents: read
pull-requests: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: "setup go"
uses: actions/setup-go@v4
with:
go-version: ${{ fromJSON(needs.go-versions.outputs.go-mod-version) }}

- name: "golangci-lint"
uses: golangci/golangci-lint-action@v3
with:
version: v1.29
only-new-issues: true

build:
name: "build using different go version"
needs: go-versions
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ${{ fromJSON(needs.go-versions.outputs.matrix) }}
steps:
- uses: actions/checkout@v3

- name: "setup go"
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}

- name: "build ncm-issuer"
run: |
go mod vendor
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 env GO111MODULE=on go build -mod=vendor -o builds/manager main.go
42 changes: 0 additions & 42 deletions .github/workflows/unit-tests.yml

This file was deleted.

10 changes: 5 additions & 5 deletions PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@ domain: ncm.nokia.com
layout:
- go.kubebuilder.io/v3
projectName: ncm-issuer
repo: cm
repo: github.com/nokia/ncm-issuer
resources:
- api:
crdVersion: v1
controller: true
domain: ncm.nokia.com
group: certmanager
group: certmanager.ncm.nokia.com
kind: ClusterIssuer
path: cm/api/v1
path: github.com/nokia/ncm-issuer/api/v1
version: v1
- api:
crdVersion: v1
namespaced: true
controller: true
domain: ncm.nokia.com
group: certmanager
group: certmanager.ncm.nokia.com
kind: Issuer
path: cm/api/v1
path: github.com/nokia/ncm-issuer/api/v1
version: v1
version: "3"
8 changes: 4 additions & 4 deletions helm/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
appVersion: "1.0.3"
description: A Helm chart for cert-manager external issuer with NCM( Netguard certficate
manager )
appVersion: "1.0.4"
description: A Helm chart for cert-manager external issuer with NCM (Netguard certficate
manager)
icon: https://cert-manager.io/images/high-level-overview.svg
keywords:
- ncm-issuer
Expand All @@ -16,4 +16,4 @@ maintainers:
- name: Maxwell Jiang
- name: Lilian Liang
name: ncm-issuer
version: 1.0.3
version: 1.1.0
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ import (
var (
scheme = runtime.NewScheme()
setupLog = ctrl.Log.WithName("setup")
chartVersion = "1.0.3"
imageVersion = "1.0.4"
chartVersion = "1.0.4"
imageVersion = "1.1.0"
)

const setupErrMsg = "unable to create controller"
Expand Down
2 changes: 1 addition & 1 deletion release_notes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Version 1.0.3 (Build Version 1.0.2)
Version 1.0.3 (Build Version 1.0.3)
- Fixed misinterpretation when PK rotation policy is set to "Always"

Version 1.0.4 (Build version 1.0.4)
Version 1.0.4 (Build version 1.1.0)
- Fixed data races when getting NCM config defined in issuer spec
- Improved handling CSR statuses returned by NCM
- Added prometheus metrics to track certificate requests

0 comments on commit 8f0e335

Please sign in to comment.