Skip to content

Commit

Permalink
Updating apis to sync with the current operator APIs (#157)
Browse files Browse the repository at this point in the history
#156

---------

Signed-off-by: asararatnakar <[email protected]>
  • Loading branch information
asararatnakar authored Dec 11, 2023
1 parent b7a6be1 commit 6c5f08f
Show file tree
Hide file tree
Showing 23 changed files with 764 additions and 325 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/basic-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#
# Copyright contributors to the Hyperledger Fabric Operator project
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

name: basic-tests

on:
push:
branches: [api]
pull_request:
branches: [api]

env:
GO_VER: 1.18

jobs:
make-checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VER }}
- name: license header checks
run: make check-license
- name: gosec
run: make go-sec
- name: Run vet and format checks
run: make checks
35 changes: 35 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#
# Copyright contributors to the Hyperledger Fabric Operator project
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

## license checks
check-license:
@scripts/check-licenses.sh

# Run go fmt against code
fmt:
go fmt ./...

# Run go vet against code
vet:
@scripts/checks.sh

checks: fmt vet

# gosec checks
go-sec:
@scripts/go-sec.sh
188 changes: 0 additions & 188 deletions api/orderer/v1/orderer.go

This file was deleted.

50 changes: 0 additions & 50 deletions api/orderer/v2/orderer.go

This file was deleted.

3 changes: 0 additions & 3 deletions api/v1beta1/common_struct.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ import (
corev1 "k8s.io/api/core/v1"
)

var BoolTrue = true
var BoolFalse = false

// Service is the overrides to be used for Service of the component
// +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true
type Service struct {
Expand Down
2 changes: 1 addition & 1 deletion api/v1beta1/ibpconsole_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
package v1beta1

import (
consolev1 "github.com/IBM-Blockchain/fabric-operator/api/console/v1"
consolev1 "github.com/IBM-Blockchain/fabric-operator/pkg/apis/console/v1"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
Expand Down
22 changes: 20 additions & 2 deletions api/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 6c5f08f

Please sign in to comment.