From d11b66a4f8d659fd939448f64cc9bee6b9b77853 Mon Sep 17 00:00:00 2001 From: Charlie Drage Date: Mon, 6 Feb 2023 08:45:32 -0500 Subject: [PATCH 1/2] change master to main in scripts and docs Changes the naming from master to main in the scripts and documentation. Do not merge unless CI passes! Signed-off-by: Charlie Drage --- .github/workflows/go.yml | 4 ++-- .github/workflows/test.yml | 2 +- README.md | 8 ++++---- docs/development.md | 4 ++-- docs/getting-started.md | 16 ++++++++++++---- docs/installation.md | 2 +- docs/maven-example.md | 2 +- 7 files changed, 23 insertions(+), 15 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 798d80fcad..b7bd959730 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -2,9 +2,9 @@ name: Go on: push: - branches: [ master ] + branches: [ main ] pull_request: - branches: [ master ] + branches: [ main ] env: # Avoid noisy outputs like "tput: No value for $TERM and no -T specified" TERM: dumb diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 65512bfb08..46ecaf12e2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,7 +2,7 @@ name: Kompose CI on: push: branches: - - master + - main pull_request: env: # Avoid noisy outputs like "tput: No value for $TERM and no -T specified" diff --git a/README.md b/README.md index d0ebbb1707..c629878d9c 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ ## Use Case -Convert [`docker-compose.yaml`](https://raw.githubusercontent.com/kubernetes/kompose/master/examples/docker-compose.yaml) into Kubernetes deployments and services with one simple command: +Convert [`docker-compose.yaml`](https://raw.githubusercontent.com/kubernetes/kompose/main/examples/docker-compose.yaml) into Kubernetes deployments and services with one simple command: ```sh $ kompose convert -f docker-compose.yaml @@ -121,7 +121,7 @@ $ make test ## Documentation -Documentation can be found at our [kompose.io](http://kompose.io) website or our [docs](https://github.com/kubernetes/kompose/tree/master/docs) folder. +Documentation can be found at our [kompose.io](http://kompose.io) website or our [docs](https://github.com/kubernetes/kompose/tree/main/docs) folder. Here is a list of all available docs: @@ -148,7 +148,7 @@ Participation in the Kubernetes community is governed by the [Kubernetes Code of [Build Status Widget]: https://github.com/kubernetes/kompose/workflows/Kompose%20CI/badge.svg [GoDoc]: https://godoc.org/github.com/kubernetes/kompose [GoDoc Widget]: https://godoc.org/github.com/kubernetes/kompose?status.svg -[Coverage Status Widget]: https://coveralls.io/repos/github/kubernetes/kompose/badge.svg?branch=master -[Coverage Status]: https://coveralls.io/github/kubernetes/kompose?branch=master +[Coverage Status Widget]: https://coveralls.io/repos/github/kubernetes/kompose/badge.svg?branch=main +[Coverage Status]: https://coveralls.io/github/kubernetes/kompose?branch=main [GoReportCard Widget]: https://goreportcard.com/badge/github.com/kubernetes/kompose [GoReportCardResult]: https://goreportcard.com/report/github.com/kubernetes/kompose diff --git a/docs/development.md b/docs/development.md index 821858f187..6a46a518a9 100644 --- a/docs/development.md +++ b/docs/development.md @@ -41,7 +41,7 @@ git checkout -b myfeature ```console git fetch upstream -git rebase upstream/master +git rebase upstream/main ``` Note: If you have write access to the main repository at github.com/kubernetes/kompose, you should modify your git configuration so that you can't accidentally push to upstream: @@ -77,7 +77,7 @@ Currently, it is not possible to use a different Kubernetes version from the ver ### Adding CLI tests -[Kompose CLI tests](https://github.com/kubernetes/kompose/tree/master/script/test/cmd) run `kompose convert` with docker-compose files, and cross-check the k8s and OpenShift artifacts generated with the template files. +[Kompose CLI tests](https://github.com/kubernetes/kompose/tree/main/script/test/cmd) run `kompose convert` with docker-compose files, and cross-check the k8s and OpenShift artifacts generated with the template files. To generate CLI tests, please run `make gen-cmd`. diff --git a/docs/getting-started.md b/docs/getting-started.md index 5831ed555c..ab11ecc342 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -44,10 +44,10 @@ Starting cluster components... Kubectl is now configured to use the cluster ``` -**Download an [example Docker Compose file](https://raw.githubusercontent.com/kubernetes/kompose/master/examples/docker-compose.yaml), or use your own:** +**Download an [example Docker Compose file](https://raw.githubusercontent.com/kubernetes/kompose/main/examples/docker-compose.yaml), or use your own:** ```sh -wget https://raw.githubusercontent.com/kubernetes/kompose/master/examples/docker-compose.yaml +wget https://raw.githubusercontent.com/kubernetes/kompose/main/examples/docker-compose.yaml ``` **Convert your Docker Compose file to Kubernetes:** @@ -134,10 +134,14 @@ Starting local OpenShift cluster using 'kvm' hypervisor... ... ``` +<<<<<<< HEAD **Download an [example Docker Compose file](https://raw.githubusercontent.com/kubernetes/kompose/master/examples/docker-compose.yaml), or use your own:** +======= +__Download an [example Docker Compose file](https://raw.githubusercontent.com/kubernetes/kompose/main/examples/docker-compose.yaml), or use your own:__ +>>>>>>> fa5394da8 (change master to main in scripts and docs) ```sh -wget https://raw.githubusercontent.com/kubernetes/kompose/master/examples/docker-compose.yaml +wget https://raw.githubusercontent.com/kubernetes/kompose/main/examples/docker-compose.yaml ``` **Convert your Docker Compose file to OpenShift:** @@ -254,10 +258,14 @@ Starting local OpenShift cluster using 'kvm' hypervisor... ... ``` +<<<<<<< HEAD **Download an [example Docker Compose file](https://raw.githubusercontent.com/kubernetes/kompose/master/examples/docker-compose.yaml), or use your own:** +======= +__Download an [example Docker Compose file](https://raw.githubusercontent.com/kubernetes/kompose/main/examples/docker-compose.yaml), or use your own:__ +>>>>>>> fa5394da8 (change master to main in scripts and docs) ```sh -wget https://raw.githubusercontent.com/kubernetes/kompose/master/examples/docker-compose.yaml +wget https://raw.githubusercontent.com/kubernetes/kompose/main/examples/docker-compose.yaml ``` **Convert your Docker Compose file to OpenShift:** diff --git a/docs/installation.md b/docs/installation.md index 1ae236b976..27f2e1fc09 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -37,7 +37,7 @@ Download from [GitHub](https://github.com/kubernetes/kompose/releases/download/v ## Go -Installing using `go install` pulls from the master branch with the latest development changes. +Installing using `go install` pulls from the main branch with the latest development changes. ```sh go install github.com/kubernetes/kompose@latest diff --git a/docs/maven-example.md b/docs/maven-example.md index aa195967cc..a4b472c442 100644 --- a/docs/maven-example.md +++ b/docs/maven-example.md @@ -106,4 +106,4 @@ Created the new window in existing browser session. It will open your application endpoint in default browser. -![Output-Diagram](https://github.com/kubernetes/kompose/blob/master/docs/images/kompose-maven-output-diagram.png) +![Output-Diagram](https://github.com/kubernetes/kompose/blob/main/docs/images/kompose-maven-output-diagram.png) From d1f92c43456048a2beb115e9bef50e0e629f9b9e Mon Sep 17 00:00:00 2001 From: Charlie Drage Date: Wed, 8 Feb 2023 15:22:44 -0500 Subject: [PATCH 2/2] remove 1.18, specify version of staticcheck --- .github/workflows/lint.yml | 9 +-------- Makefile | 7 +------ docs/getting-started.md | 12 ++---------- script/test_in_container/Dockerfile | 2 -- 4 files changed, 4 insertions(+), 26 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 12ec71ae5e..2d28bf0445 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -16,11 +16,4 @@ jobs: with: go-version: ${{ matrix.go }} - name: "Run go vet" - run: "go vet ./pkg/..." - - name: "Run staticcheck" - uses: dominikh/staticcheck-action@v1 - with: - cache-key: "${{ matrix.go }}" - install-go: false - version: "latest" - working-directory: "pkg" + run: "go vet ./pkg/..." \ No newline at end of file diff --git a/Makefile b/Makefile index d5a70e0e8d..34a1b61aa8 100644 --- a/Makefile +++ b/Makefile @@ -91,16 +91,12 @@ gen-cmd: # run all validation tests .PHONY: validate -validate: gofmt vet staticcheck +validate: gofmt vet .PHONY: vet vet: go vet ./pkg/... -.PHONY: staticcheck -staticcheck: - staticcheck ./pkg/... - .PHONY: gofmt gofmt: ./script/check-gofmt.sh @@ -114,7 +110,6 @@ test: bin test-dep validate test-unit-cover install test-cmd test-dep: go install github.com/mattn/goveralls@latest go install github.com/modocache/gover@latest - go install honnef.co/go/tools/cmd/staticcheck@latest go install github.com/mitchellh/gox@latest diff --git a/docs/getting-started.md b/docs/getting-started.md index ab11ecc342..582c658fe7 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -134,11 +134,7 @@ Starting local OpenShift cluster using 'kvm' hypervisor... ... ``` -<<<<<<< HEAD -**Download an [example Docker Compose file](https://raw.githubusercontent.com/kubernetes/kompose/master/examples/docker-compose.yaml), or use your own:** -======= -__Download an [example Docker Compose file](https://raw.githubusercontent.com/kubernetes/kompose/main/examples/docker-compose.yaml), or use your own:__ ->>>>>>> fa5394da8 (change master to main in scripts and docs) +**Download an [example Docker Compose file](https://raw.githubusercontent.com/kubernetes/kompose/main/examples/docker-compose.yaml), or use your own:** ```sh wget https://raw.githubusercontent.com/kubernetes/kompose/main/examples/docker-compose.yaml @@ -258,11 +254,7 @@ Starting local OpenShift cluster using 'kvm' hypervisor... ... ``` -<<<<<<< HEAD -**Download an [example Docker Compose file](https://raw.githubusercontent.com/kubernetes/kompose/master/examples/docker-compose.yaml), or use your own:** -======= -__Download an [example Docker Compose file](https://raw.githubusercontent.com/kubernetes/kompose/main/examples/docker-compose.yaml), or use your own:__ ->>>>>>> fa5394da8 (change master to main in scripts and docs) +**Download an [example Docker Compose file](https://raw.githubusercontent.com/kubernetes/kompose/main/examples/docker-compose.yaml), or use your own:** ```sh wget https://raw.githubusercontent.com/kubernetes/kompose/main/examples/docker-compose.yaml diff --git a/script/test_in_container/Dockerfile b/script/test_in_container/Dockerfile index 70ddffed3d..6d53db0d7a 100644 --- a/script/test_in_container/Dockerfile +++ b/script/test_in_container/Dockerfile @@ -36,8 +36,6 @@ ENV PATH="$PATH:$GOPATH/bin:$GOROOT/bin" \ WORKDIR /tmp/go RUN curl https://storage.googleapis.com/golang/go$GOVERSION.linux-amd64.tar.gz | tar -xz -C /usr/local -RUN go get honnef.co/go/tools/cmd/staticcheck@latest - WORKDIR $KOMPOSE_SRC # This image can be run as any user RUN chmod -R ugo+rw $GOPATH