Skip to content

Commit

Permalink
Merge branch 'nephio-project:main' into update-gotests-in-make
Browse files Browse the repository at this point in the history
  • Loading branch information
efiacor authored May 15, 2024
2 parents 0dd7319 + 1754fc8 commit c36a396
Show file tree
Hide file tree
Showing 20 changed files with 21 additions and 42 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/porch-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '>=1.21.5'
go-version: '>=1.22.2'
- name: Setup kubectl
uses: azure/setup-kubectl@v3
- name: Install kpt
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/porchctl-cli-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '>=1.21.5'
go-version: '>=1.22.2'
- name: Setup kubectl
uses: azure/setup-kubectl@v3
- name: Install kpt
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '>=1.21.5'
go-version: '>=1.22.2'
- name: Checkout
uses: actions/checkout@v4
with:
Expand Down
13 changes: 1 addition & 12 deletions .prow.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,11 @@
presubmits:
- name: presubmit-nephio-go-test
decorate: true
run_if_changed: "(\\.go|Makefile)$"
run_if_changed: "(\\.go|Makefile|\\.mk)$"
spec:
containers:
- image: nephio/gotests:1782782171367346176
command:
- make
args:
- ci-unit
- name: presubmit-porch-e2e
decorate: true
optional: true
run_if_changed: "(\\.go|Makefile)$"
spec:
containers:
- image: nephio/gotests:1782782171367346176
command:
- make
args:
- ci-test-porch
8 changes: 0 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -159,19 +159,11 @@ generate: generate-api
tidy:
@for f in $(MODULES); do (cd $$f; echo "Tidying $$f"; go mod tidy) || exit 1; done

.PHONY: test-porch
test-porch:
#@for f in $(MODULES); do (cd $$f; echo "Testing $$f"; E2E=1 go test -v -race --count=1 ./...) || exit 1; done
@for f in $(MODULES); do (cd $$f; echo "Testing $$f"; go test -v -race --count=1 ./...) || exit 1; done

.PHONY: configure-git
configure-git:
git config --global --add user.name test
git config --global --add user.email test@nephio.org

.PHONY: ci-test-porch
ci-test-porch: configure-git test-porch

.PHONY: ci-unit
ci-unit: configure-git test

Expand Down
2 changes: 1 addition & 1 deletion api/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/nephio-project/porch/api

go 1.21
go 1.22

require (
k8s.io/apimachinery v0.29.2
Expand Down
2 changes: 1 addition & 1 deletion build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.


FROM golang:1.21.4-bookworm as builder
FROM golang:1.22.2-bookworm as builder

WORKDIR /go/src

Expand Down
2 changes: 1 addition & 1 deletion build/Dockerfile.apiserver
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM golang:1.21.4-bookworm as builder
FROM golang:1.22.2-bookworm as builder

WORKDIR /workspace/src
RUN git clone https://github.com/kubernetes/kubernetes --branch v1.23.2 --depth=1
Expand Down
2 changes: 1 addition & 1 deletion build/Dockerfile.etcd
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM golang:1.21.3-bookworm as builder
FROM golang:1.22.2-bookworm as builder

WORKDIR /workspace
ARG ETCD_VER=v3.5.1
Expand Down
2 changes: 1 addition & 1 deletion controllers/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM golang:1.21.4-bookworm as builder
FROM golang:1.22.2-bookworm as builder

WORKDIR /go/src
COPY porch/ .
Expand Down
2 changes: 1 addition & 1 deletion controllers/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/nephio-project/porch/controllers

go 1.21
go 1.22

replace (
github.com/go-git/go-git/v5 v5.4.3-0.20220408232334-4f916225cb2f => github.com/platkrm/go-git/v5 v5.4.3-0.20220410165046-c76b262044ce
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ func evalExpr(expr string, inputs map[string]interface{}) (string, error) {
return "", err
}

result, err := val.ConvertToNative(reflect.TypeOf(""))
result, err := val.ConvertToNative(reflect.TypeFor[string]())
if err != nil {
return "", err
}
Expand Down
2 changes: 1 addition & 1 deletion default-go-lint.mk
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.


GOLANG_CI_VER ?= v1.52
GOLANG_CI_VER ?= v1.57
GIT_ROOT_DIR ?= $(dir $(lastword $(MAKEFILE_LIST)))
include $(GIT_ROOT_DIR)/detect-container-runtime.mk

Expand Down
4 changes: 2 additions & 2 deletions default-go-test.mk
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

GO_VERSION ?= 1.20.2
GO_VERSION ?= 1.22.2
TEST_COVERAGE_FILE=lcov.info
TEST_COVERAGE_HTML_FILE=coverage_unit.html
TEST_COVERAGE_FUNC_FILE=func_coverage.out
Expand Down Expand Up @@ -42,4 +42,4 @@ unit-clean: ## Clean up the artifacts created by the unit tests
ifeq ($(CONTAINER_RUNNABLE), 0)
$(CONTAINER_RUNTIME) system prune -f
endif
rm ${TEST_COVERAGE_FILE} ${TEST_COVERAGE_HTML_FILE} ${TEST_COVERAGE_FUNC_FILE} > /dev/null 2>&1
rm -f ${TEST_COVERAGE_FILE} ${TEST_COVERAGE_HTML_FILE} ${TEST_COVERAGE_FUNC_FILE} > /dev/null 2>&1
2 changes: 1 addition & 1 deletion default-gosec.mk
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

GOSEC_VER ?= 2.15.0
GOSEC_VER ?= 2.19.0
GIT_ROOT_DIR ?= $(dir $(lastword $(MAKEFILE_LIST)))
include $(GIT_ROOT_DIR)/detect-container-runtime.mk

Expand Down
6 changes: 2 additions & 4 deletions docs/tutorials/porch-development-environment/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ and running to which a Porch instance running in Visual Studio Code can connect

# Setup kind with MetalLB and Gitea

Follow steps 1-5 inclusive of the [Starting with Porch](https://github.com/nephio-project/porch/tree/main/docs/tutorials/starting-with-porch) tutorial. You now have two Kind clusters `management` and `edge1` running with Gitea installed on the `management` cluster. Gitea has the repositories `management` and `edge1` defined.
Follow steps 1-5 inclusive of the [Starting with Porch](https://github.com/nephio-project/porch/tree/main/docs/tutorials/starting-with-porch) tutorial. You now have the Kind cluster `management` running with Gitea installed on it. Gitea has the repository `management` defined.

> **_NOTE:_** This [setup script](bin/setup.sh) automates steps 1-5 of the Starting with Porch tutorial. You may need to adapt this script to your local environment and also have [pre requisites](https://github.com/nephio-project/porch/tree/main/docs/tutorials/starting-with-porch#prerequisites) installed on the target machine.
> **_NOTE:_** This [cleardown script script](bin/cleardown.sh) clears everything down by deleting the `management` and `edge1` Kind clusters. USE WITH CARE.
> **_NOTE:_** This [cleardown script script](bin/cleardown.sh) clears everything down by deleting the `management` Kind cluster. USE WITH CARE.
Switch to use the kind-management context if necessary:
```
Expand Down Expand Up @@ -492,7 +492,6 @@ porchctl repo get -A
Sample output:
```
NAME TYPE CONTENT DEPLOYMENT READY ADDRESS
edge1 git Package true True http://172.18.255.200:3000/nephio/edge1.git
external-blueprints git Package false True https://github.com/nephio-project/free5gc-packages.git
management git Package false True http://172.18.255.200:3000/nephio/management.git
```
Expand All @@ -506,7 +505,6 @@ kubectl get repositories -n porch-demo
Sample output:
```
NAME TYPE CONTENT DEPLOYMENT READY ADDRESS
edge1 git Package true True http://172.18.255.200:3000/nephio/edge1.git
external-blueprints git Package false True https://github.com/nephio-project/free5gc-packages.git
management git Package false True http://172.18.255.200:3000/nephio/management.git
```
Expand Down
2 changes: 1 addition & 1 deletion examples/apps/hello-server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM golang:1.21.4-bookworm as builder
FROM golang:1.22.2-bookworm as builder

WORKDIR /src
COPY go.mod go.sum ./
Expand Down
2 changes: 1 addition & 1 deletion examples/apps/hello-server/go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module github.com/nephio-project/porch/config/samples/apps/hello

go 1.21
go 1.22
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/nephio-project/porch

go 1.21
go 1.22

replace (
github.com/go-git/go-git/v5 v5.4.3-0.20220408232334-4f916225cb2f => github.com/platkrm/go-git/v5 v5.4.3-0.20220410165046-c76b262044ce
Expand Down
2 changes: 1 addition & 1 deletion test/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.


FROM golang:1.21.4-bookworm as builder
FROM golang:1.22.2-bookworm as builder

WORKDIR /go/src

Expand Down

0 comments on commit c36a396

Please sign in to comment.