From 6eab835c99a455493f4712d97ef8c9d2fdea44ec Mon Sep 17 00:00:00 2001 From: James Rawlings Date: Thu, 1 Apr 2021 13:18:48 +0100 Subject: [PATCH] chore: prepare for v3 GA --- .github/workflows/jenkins-x-release.yaml | 8 ++++---- .goreleaser.yml | 8 ++++---- .jx/updatebot.yaml | 10 +++++----- CONTRIBUTING.MD | 20 ++++++++++---------- Dockerfile | 2 +- Dockerfile-boot | 2 +- Dockerfile-go | 2 +- Dockerfile-go-maven | 2 +- Dockerfile-tfo-aws | 4 ++-- Dockerfile-tfo-gcp | 4 ++-- Makefile | 4 ++-- README.md | 18 +++++++++--------- charts/jx-cli/Chart.yaml | 2 +- charts/jx-cli/Makefile | 2 +- charts/jx-cli/values.yaml | 2 +- cmd/app/main-win.go | 2 +- cmd/app/main.go | 2 +- cmd/docs/main.go | 2 +- cmd/main.go | 2 +- dependency-matrix/matrix.md | 2 +- dependency-matrix/matrix.yaml | 4 ++-- go.mod | 2 +- hack/changelog-header.md | 4 ++-- hack/upload_plugin.sh | 4 ++-- pkg/cmd/root.go | 12 ++++++------ pkg/cmd/ui/ui.go | 2 +- pkg/cmd/upgrade/upgrade_cli.go | 22 +++++++++++----------- pkg/cmd/upgrade/upgrade_cli_test.go | 2 +- pkg/cmd/upgrade/upgrade_plugins.go | 2 +- pkg/cmd/upgrade/upgrade_plugins_test.go | 2 +- pkg/plugins/helpers_test.go | 2 +- pkg/plugins/versions.go | 19 +++++++++---------- pkg/version/info_test.go | 2 +- 33 files changed, 89 insertions(+), 90 deletions(-) diff --git a/.github/workflows/jenkins-x-release.yaml b/.github/workflows/jenkins-x-release.yaml index 6ba41d4528..1a51473f27 100644 --- a/.github/workflows/jenkins-x-release.yaml +++ b/.github/workflows/jenkins-x-release.yaml @@ -87,7 +87,7 @@ jobs: tags: | ghcr.io/jenkins-x/terraform-operator-gcp:latest ghcr.io/jenkins-x/terraform-operator-gcp:${{ steps.prep.outputs.version }} - - name: Build and push jx-cli + - name: Build and push jx uses: docker/build-push-action@v2 with: context: . @@ -97,8 +97,8 @@ jobs: build-args: | VERSION=${{ steps.prep.outputs.version }} tags: | - ghcr.io/jenkins-x/jx-cli:latest - ghcr.io/jenkins-x/jx-cli:${{ steps.prep.outputs.version }} + ghcr.io/jenkins-x/jx:latest + ghcr.io/jenkins-x/jx:${{ steps.prep.outputs.version }} release2: runs-on: ubuntu-latest needs: release @@ -112,7 +112,7 @@ jobs: name: getrelease uses: pozetroninc/github-action-get-latest-release@master with: - repository: jenkins-x/jx-cli + repository: jenkins-x/jx - id: prep name: prep env: diff --git a/.goreleaser.yml b/.goreleaser.yml index 1359c99f4d..9aaf87bef3 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -6,7 +6,7 @@ before: - go mod download builds: - - id: jx-cli + - id: jx # Path to main.go file or main package. # Default is `.`. main: ./cmd/main.go @@ -38,15 +38,15 @@ builds: - arm64 archives: - - name_template: "jx-cli-{{ .Os }}-{{ .Arch }}" + - name_template: "jx-{{ .Os }}-{{ .Arch }}" format_overrides: - goos: windows format: zip checksum: # You can change the name of the checksums file. - # Default is `jx-cli_{{ .Version }}_checksums.txt`. - name_template: "jx-cli-checksums.txt" + # Default is `jx_{{ .Version }}_checksums.txt`. + name_template: "jx-checksums.txt" # Algorithm to be used. # Accepted options are sha256, sha512, sha1, crc32, md5, sha224 and sha384. diff --git a/.jx/updatebot.yaml b/.jx/updatebot.yaml index b2152f626b..b74d1935a0 100644 --- a/.jx/updatebot.yaml +++ b/.jx/updatebot.yaml @@ -6,7 +6,7 @@ spec: - https://github.com/jenkins-x/jx3-pipeline-catalog changes: - regex: - pattern: "jenkins-x/jx-cli:(.*)" + pattern: "jenkins-x/jx:(.*)" files: - "**/*.yaml" - regex: @@ -23,7 +23,7 @@ spec: files: - git/github.com/jenkins-x/jx3-pipeline-catalog.yml - regex: - pattern: "\\s+image: ghcr.io/jenkins-x/jx-cli:(.*)" + pattern: "\\s+image: ghcr.io/jenkins-x/jx:(.*)" files: - ".lighthouse/jenkins-x/release.yaml" - ".lighthouse/jenkins-x/pullrequest*.yaml" @@ -39,14 +39,14 @@ spec: - regex: pattern: "version: (.*)" files: - - "docker/ghcr.io/jenkins-x/jx-cli.yml" - - "packages/jx-cli.yml" + - "docker/ghcr.io/jenkins-x/jx.yml" + - "packages/jx.yml" - regex: pattern: "terraformVersion: (.*)" files: - ".lighthouse/jenkins-x/bdd/*.yaml*" - regex: - pattern: "JX_DEFAULT_IMAGE: ghcr.io/jenkins-x/jx-cli:(.*)" + pattern: "JX_DEFAULT_IMAGE: ghcr.io/jenkins-x/jx:(.*)" files: - "apps/jenkins-x/lighthouse/values.yaml.gotmpl" - "charts/jenkins-x/lighthouse/values.yaml.gotmpl" \ No newline at end of file diff --git a/CONTRIBUTING.MD b/CONTRIBUTING.MD index c5d18c986d..2e7e472944 100644 --- a/CONTRIBUTING.MD +++ b/CONTRIBUTING.MD @@ -41,38 +41,38 @@ $ GOOS=linux GOARCH=amd64 ./make.bash --no-clean ## Fork the Repository -Begin at GitHub by forking jx-cli, then clone your fork locally. Since jx-cli is a Go package, it -should be located at `$GOPATH/src/github.com/jenkins-x/jx-cli`. +Begin at GitHub by forking jx, then clone your fork locally. Since jx is a Go package, it +should be located at `$GOPATH/src/github.com/jenkins-x/jx`. ```shell $ mkdir -p $GOPATH/src/github.com/jenkins-x $ cd $GOPATH/src/github.com/jenkins-x -$ git clone git@github.com:/jx-cli.git -$ cd jx-cli +$ git clone git@github.com:/jx.git +$ cd jx ``` -Add the conventional [upstream][] `git` remote in order to fetch changes from jx-cli's main master +Add the conventional [upstream][] `git` remote in order to fetch changes from jx's main master branch and to create pull requests: ```shell -$ git remote add upstream https://github.com/jenkins-x/jx-cli.git +$ git remote add upstream https://github.com/jenkins-x/jx.git ``` ## Build Your Changes -With the prerequisites installed and your fork of jx-cli cloned, you can make changes to local jx-cli +With the prerequisites installed and your fork of jx cloned, you can make changes to local jx source code. -Run `make` to build the `jx-cli` binaries: +Run `make` to build the `jx` binaries: ```shell -$ make build # runs dep and builds `jx-cli` inside the build/ +$ make build # runs dep and builds `jx` inside the build/ ``` ## Testing -The jx-cli test suite is divided into three sections: +The jx test suite is divided into three sections: - The standard unit test suite - Slow unit tests - Integration tests diff --git a/Dockerfile b/Dockerfile index a5787d3c12..34fabb3f4e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ ENV JX3_HOME /home/.jx3 RUN echo using jx version ${VERSION} and OS ${TARGETOS} arch ${TARGETARCH} && \ mkdir -p /home/.jx3 && \ - curl -L https://github.com/jenkins-x/jx-cli/releases/download/v${VERSION}/jx-cli-${TARGETOS}-${TARGETARCH}.tar.gz | tar xzv && \ + curl -L https://github.com/jenkins-x/jx/releases/download/v${VERSION}/jx-${TARGETOS}-${TARGETARCH}.tar.gz | tar xzv && \ mv jx /usr/bin RUN jx upgrade plugins --mandatory diff --git a/Dockerfile-boot b/Dockerfile-boot index 2b4f0ce632..9a90871c0f 100644 --- a/Dockerfile-boot +++ b/Dockerfile-boot @@ -27,7 +27,7 @@ RUN echo using yq version ${YQ_VERSION} and OS ${TARGETOS} arch ${TARGETARCH} && RUN echo using jx version ${VERSION} and OS ${TARGETOS} arch ${TARGETARCH} && \ mkdir -p /home/.jx3 && \ - curl -L https://github.com/jenkins-x/jx-cli/releases/download/v${VERSION}/jx-cli-${TARGETOS}-${TARGETARCH}.tar.gz | tar xzv && \ + curl -L https://github.com/jenkins-x/jx/releases/download/v${VERSION}/jx-${TARGETOS}-${TARGETARCH}.tar.gz | tar xzv && \ mv jx /usr/bin RUN jx upgrade plugins --boot --path /usr/bin diff --git a/Dockerfile-go b/Dockerfile-go index ff3332a635..6635bf246f 100644 --- a/Dockerfile-go +++ b/Dockerfile-go @@ -9,7 +9,7 @@ ENV JX3_HOME /home/.jx3 RUN echo using jx version ${VERSION} and OS ${TARGETOS} arch ${TARGETARCH} && \ mkdir -p /home/.jx3 && \ - curl -L https://github.com/jenkins-x/jx-cli/releases/download/v${VERSION}/jx-cli-${TARGETOS}-${TARGETARCH}.tar.gz | tar xzv && \ + curl -L https://github.com/jenkins-x/jx/releases/download/v${VERSION}/jx-${TARGETOS}-${TARGETARCH}.tar.gz | tar xzv && \ mv jx /usr/bin RUN jx upgrade plugins --mandatory diff --git a/Dockerfile-go-maven b/Dockerfile-go-maven index dafdf566fe..84cbf6d019 100644 --- a/Dockerfile-go-maven +++ b/Dockerfile-go-maven @@ -9,7 +9,7 @@ ENV JX3_HOME /home/.jx3 RUN echo using jx version ${VERSION} and OS ${TARGETOS} arch ${TARGETARCH} && \ mkdir -p /home/.jx3 && \ - curl -L https://github.com/jenkins-x/jx-cli/releases/download/v${VERSION}/jx-cli-${TARGETOS}-${TARGETARCH}.tar.gz | tar xzv && \ + curl -L https://github.com/jenkins-x/jx/releases/download/v${VERSION}/jx-${TARGETOS}-${TARGETARCH}.tar.gz | tar xzv && \ mv jx /usr/bin RUN jx upgrade plugins --mandatory diff --git a/Dockerfile-tfo-aws b/Dockerfile-tfo-aws index d10fed5e84..2e5bdd4c55 100644 --- a/Dockerfile-tfo-aws +++ b/Dockerfile-tfo-aws @@ -29,7 +29,7 @@ RUN echo using yq version ${YQ_VERSION} and OS ${TARGETOS} arch ${TARGETARCH} && # jx RUN echo using jx version ${VERSION} and OS ${TARGETOS} arch ${TARGETARCH} && \ mkdir -p /home/.jx3 && \ - curl -L https://github.com/jenkins-x/jx-cli/releases/download/v${VERSION}/jx-cli-${TARGETOS}-${TARGETARCH}.tar.gz | tar xzv && \ + curl -L https://github.com/jenkins-x/jx/releases/download/v${VERSION}/jx-${TARGETOS}-${TARGETARCH}.tar.gz | tar xzv && \ mv jx /usr/bin # lets install the boot plugins @@ -42,4 +42,4 @@ COPY run.sh /run.sh ENTRYPOINT ["/bin/bash"] CMD ["/run.sh"] -LABEL org.opencontainers.image.source https://github.com/jenkins-x/jx-cli +LABEL org.opencontainers.image.source https://github.com/jenkins-x/jx diff --git a/Dockerfile-tfo-gcp b/Dockerfile-tfo-gcp index 5b157ff848..368a0a4a8a 100644 --- a/Dockerfile-tfo-gcp +++ b/Dockerfile-tfo-gcp @@ -25,7 +25,7 @@ RUN echo using yq version ${YQ_VERSION} and OS ${TARGETOS} arch ${TARGETARCH} && # jx RUN echo using jx version ${VERSION} and OS ${TARGETOS} arch ${TARGETARCH} && \ mkdir -p /home/.jx3 && \ - curl -L https://github.com/jenkins-x/jx-cli/releases/download/v${VERSION}/jx-cli-${TARGETOS}-${TARGETARCH}.tar.gz | tar xzv && \ + curl -L https://github.com/jenkins-x/jx/releases/download/v${VERSION}/jx-${TARGETOS}-${TARGETARCH}.tar.gz | tar xzv && \ mv jx /usr/bin # lets install the boot plugins @@ -39,4 +39,4 @@ ENTRYPOINT ["/bin/bash"] CMD ["run.sh"] -LABEL org.opencontainers.image.source https://github.com/jenkins-x/jx-cli +LABEL org.opencontainers.image.source https://github.com/jenkins-x/jx diff --git a/Makefile b/Makefile index aac5dab52f..45ff651eff 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ rwildcard=$(wildcard $1$2) $(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2)) SHELL := /bin/bash -NAME := jx-cli +NAME := jx BINARY_NAME := jx BUILD_TARGET = build MAIN_SRC_FILE=cmd/main.go @@ -80,7 +80,7 @@ get-test-deps: ## Install test dependencies print-version: ## Print version @echo $(VERSION) -build: $(GO_DEPENDENCIES) clean ## Build jx-cli binary for current OS +build: $(GO_DEPENDENCIES) clean ## Build jx binary for current OS go mod download CGO_ENABLED=$(CGO_ENABLED) $(GO) $(BUILD_TARGET) $(BUILDFLAGS) -o build/$(BINARY_NAME) $(MAIN_SRC_FILE) diff --git a/README.md b/README.md index 3c648e047c..a956d92dd5 100644 --- a/README.md +++ b/README.md @@ -1,24 +1,24 @@ # Jenkins X CLI for Version 3.x -[![Documentation](https://godoc.org/github.com/jenkins-x/jx-cli?status.svg)](https://pkg.go.dev/mod/github.com/jenkins-x/jx-cli) -[![Go Report Card](https://goreportcard.com/badge/github.com/jenkins-x/jx-cli)](https://goreportcard.com/report/github.com/jenkins-x/jx-cli) -[![Releases](https://img.shields.io/github/release-pre/jenkins-x/jx-cli.svg)](https://github.com/jenkins-x/jx-cli/releases) -[![LICENSE](https://img.shields.io/github/license/jenkins-x/jx-cli.svg)](https://github.com/jenkins-x/jx-cli/blob/master/LICENSE) +[![Documentation](https://godoc.org/github.com/jenkins-x/jx?status.svg)](https://pkg.go.dev/mod/github.com/jenkins-x/jx) +[![Go Report Card](https://goreportcard.com/badge/github.com/jenkins-x/jx)](https://goreportcard.com/report/github.com/jenkins-x/jx) +[![Releases](https://img.shields.io/github/release-pre/jenkins-x/jx.svg)](https://github.com/jenkins-x/jx/releases) +[![LICENSE](https://img.shields.io/github/license/jenkins-x/jx.svg)](https://github.com/jenkins-x/jx/blob/master/LICENSE) [![Slack Status](https://img.shields.io/badge/slack-join_chat-white.svg?logo=slack&style=social)](https://slack.k8s.io/) -`jx-cli` is the modular command line CLI for [Jenkins X 3.x](https://jenkins-x.io/v3/about/) +`jx` is the modular command line CLI for [Jenkins X 3.x](https://jenkins-x.io/v3/about/) ## Commands -See the [jx command reference](https://github.com/jenkins-x/jx-cli/blob/master/docs/cmd/jx.md) +See the [jx command reference](https://github.com/jenkins-x/jx/blob/master/docs/cmd/jx.md) ## Issues -To track [issues in this repository](https://github.com/jenkins-x/jx-cli/issues) and all the related [Plugins](#plugins) use this link: +To track [issues in this repository](https://github.com/jenkins-x/jx/issues) and all the related [Plugins](#plugins) use this link: -* [view open issues in jx-cli and its plugins](https://github.com/issues?q=is%3Aopen+is%3Aissue+repo%3Ajenkins-x%2Fjx-cli+repo%3Ajenkins-x%2Fjx-admin+repo%3Ajenkins-x%2Fjx-application+repo%3Ajenkins-x%2Fjx-apps+repo%3Ajenkins-x%2Fjx-helpers+repo%3Ajenkins-x%2Fjx-git-operator+repo%3Ajenkins-x%2Fjx-gitops+repo%3Ajenkins-x%2Fjx-pipeline+repo%3Ajenkins-x%2Fjx-project+repo%3Ajenkins-x%2Fjx-promote+repo%3Ajenkins-x%2Fjx-secret+repo%3Ajenkins-x%2Fjx-verify+repo%3Ajenkins-x%2F%2Fjx-secret+repo%3Ajenkins-x%2Foctant-jx+) -* [view open pull requests in jx-cli and its plugins](https://github.com/pulls?q=is%3Aopen+is%3Apr+-label%3Adependencies+repo%3Ajenkins-x%2Fjx-cli+repo%3Ajenkins-x%2Fjx-admin+repo%3Ajenkins-x%2Fjx-application+repo%3Ajenkins-x%2Fjx-apps+repo%3Ajenkins-x%2Fjx-helpers+repo%3Ajenkins-x%2Fjx-git-operator+repo%3Ajenkins-x%2Fjx-gitops+repo%3Ajenkins-x%2Fjx-pipeline+repo%3Ajenkins-x%2Fjx-project+repo%3Ajenkins-x%2Fjx-promote+repo%3Ajenkins-x%2Fjx-secret+repo%3Ajenkins-x%2Fjx-verify+repo%3Ajenkins-x%2F%2Fjx-secret+repo%3Ajenkins-x%2Foctant-jx+) +* [view open issues in jx and its plugins](https://github.com/issues?q=is%3Aopen+is%3Aissue+repo%3Ajenkins-x%2Fjx+repo%3Ajenkins-x%2Fjx-admin+repo%3Ajenkins-x%2Fjx-application+repo%3Ajenkins-x%2Fjx-apps+repo%3Ajenkins-x%2Fjx-helpers+repo%3Ajenkins-x%2Fjx-git-operator+repo%3Ajenkins-x%2Fjx-gitops+repo%3Ajenkins-x%2Fjx-pipeline+repo%3Ajenkins-x%2Fjx-project+repo%3Ajenkins-x%2Fjx-promote+repo%3Ajenkins-x%2Fjx-secret+repo%3Ajenkins-x%2Fjx-verify+repo%3Ajenkins-x%2F%2Fjx-secret+repo%3Ajenkins-x%2Foctant-jx+) +* [view open pull requests in jx and its plugins](https://github.com/pulls?q=is%3Aopen+is%3Apr+-label%3Adependencies+repo%3Ajenkins-x%2Fjx+repo%3Ajenkins-x%2Fjx-admin+repo%3Ajenkins-x%2Fjx-application+repo%3Ajenkins-x%2Fjx-apps+repo%3Ajenkins-x%2Fjx-helpers+repo%3Ajenkins-x%2Fjx-git-operator+repo%3Ajenkins-x%2Fjx-gitops+repo%3Ajenkins-x%2Fjx-pipeline+repo%3Ajenkins-x%2Fjx-project+repo%3Ajenkins-x%2Fjx-promote+repo%3Ajenkins-x%2Fjx-secret+repo%3Ajenkins-x%2Fjx-verify+repo%3Ajenkins-x%2F%2Fjx-secret+repo%3Ajenkins-x%2Foctant-jx+) * [view open pull requests in jenkins-x-plugins](https://github.com/pulls?q=is%3Aopen+is%3Apr++archived%3Afalse+user%3Ajenkins-x-plugins+) ## Plugins diff --git a/charts/jx-cli/Chart.yaml b/charts/jx-cli/Chart.yaml index c1f60ed84a..54dde826bd 100644 --- a/charts/jx-cli/Chart.yaml +++ b/charts/jx-cli/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v2 -name: jx-cli +name: jx description: Jenkins X next gen cloud CI / CD platform for Kubernetes home: https://jenkins-x.io/ version: 0.0.1 diff --git a/charts/jx-cli/Makefile b/charts/jx-cli/Makefile index bffd0ec70d..6bc995044d 100644 --- a/charts/jx-cli/Makefile +++ b/charts/jx-cli/Makefile @@ -1,5 +1,5 @@ CHART_REPO := gs://jenkinsxio/charts -NAME := jx-cli +NAME := jx build: clean rm -rf Chart.lock diff --git a/charts/jx-cli/values.yaml b/charts/jx-cli/values.yaml index 729adfdcb9..b13c5ebacc 100644 --- a/charts/jx-cli/values.yaml +++ b/charts/jx-cli/values.yaml @@ -1,5 +1,5 @@ image: - repository: gcr.io/jenkinsxio/jx-cli + repository: gcr.io/jenkinsxio/jx tag: 3.0.354 pullPolicy: IfNotPresent diff --git a/cmd/app/main-win.go b/cmd/app/main-win.go index 758a4b3dc6..25826618db 100644 --- a/cmd/app/main-win.go +++ b/cmd/app/main-win.go @@ -6,7 +6,7 @@ import ( "os" "syscall" - "github.com/jenkins-x/jx-cli/pkg/cmd" + "github.com/jenkins-x/jx/pkg/cmd" ) // Run runs the command, if args are not nil they will be set on the command diff --git a/cmd/app/main.go b/cmd/app/main.go index e09110bfb0..5544f1e0de 100644 --- a/cmd/app/main.go +++ b/cmd/app/main.go @@ -3,7 +3,7 @@ package app import ( - "github.com/jenkins-x/jx-cli/pkg/cmd" + "github.com/jenkins-x/jx/pkg/cmd" ) // Run runs the command, if args are not nil they will be set on the command diff --git a/cmd/docs/main.go b/cmd/docs/main.go index c45f8dcc4e..19e36ee744 100644 --- a/cmd/docs/main.go +++ b/cmd/docs/main.go @@ -21,7 +21,7 @@ import ( "path/filepath" "strings" - "github.com/jenkins-x/jx-cli/pkg/cmd" + "github.com/jenkins-x/jx/pkg/cmd" "github.com/spf13/cobra" "github.com/spf13/pflag" ) diff --git a/cmd/main.go b/cmd/main.go index 137546f7e6..2aee9b99d7 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -3,7 +3,7 @@ package main import ( "os" - "github.com/jenkins-x/jx-cli/cmd/app" + "github.com/jenkins-x/jx/cmd/app" ) // Entrypoint for the command diff --git a/dependency-matrix/matrix.md b/dependency-matrix/matrix.md index 8539ad98cb..81ad07b44f 100644 --- a/dependency-matrix/matrix.md +++ b/dependency-matrix/matrix.md @@ -13,7 +13,7 @@ Dependency | Sources | Version | Mismatched versions [jenkins-x/jx-preview](https://github.com/jenkins-x/jx-preview.git) | | [0.0.128](https://github.com/jenkins-x/jx-preview/releases/tag/v0.0.128) | [jenkins-x/jx-test](https://github.com/jenkins-x/jx-test.git) | | [0.0.25](https://github.com/jenkins-x/jx-test/releases/tag/v0.0.25) | [jenkins-x/jxl-base-image](https://github.com/jenkins-x/jxl-base-image) | | [0.0.61]() | -[jenkins-x/jx-cli-base-image](https://github.com/jenkins-x/jx-cli-base-image.git) | | [0.0.43]() | +[jenkins-x/jx-base-image](https://github.com/jenkins-x/jx-base-image.git) | | [0.0.43]() | [jenkins-x/jx-jenkins](https://github.com/jenkins-x/jx-jenkins.git) | | [0.0.29](https://github.com/jenkins-x/jx-jenkins/releases/tag/v0.0.29) | [jenkins-x-plugins/jx-scm](https://github.com/jenkins-x-plugins/jx-scm) | | [0.0.2](https://github.com/jenkins-x-plugins/jx-scm/releases/tag/v0.0.2) | [jenkins-x-plugins/jx-health](https://github.com/jenkins-x-plugins/jx-health.git) | | [0.0.66](https://github.com/jenkins-x-plugins/jx-health/releases/tag/v0.0.66) | diff --git a/dependency-matrix/matrix.yaml b/dependency-matrix/matrix.yaml index 58183f55ca..49d9b39540 100644 --- a/dependency-matrix/matrix.yaml +++ b/dependency-matrix/matrix.yaml @@ -67,8 +67,8 @@ dependencies: versionURL: "" - host: github.com owner: jenkins-x - repo: jx-cli-base-image - url: https://github.com/jenkins-x/jx-cli-base-image.git + repo: jx-base-image + url: https://github.com/jenkins-x/jx-base-image.git version: 0.0.43 versionURL: "" - host: github.com diff --git a/go.mod b/go.mod index 73200da19d..464867a671 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/jenkins-x/jx-cli +module github.com/jenkins-x/jx require ( github.com/blang/semver v3.5.1+incompatible diff --git a/hack/changelog-header.md b/hack/changelog-header.md index ee63131f4d..c29e649993 100644 --- a/hack/changelog-header.md +++ b/hack/changelog-header.md @@ -1,14 +1,14 @@ ### Linux ```shell -curl -L https://github.com/jenkins-x/jx-cli/releases/download/v{{.Version}}/jx-cli-linux-amd64.tar.gz | tar xzv +curl -L https://github.com/jenkins-x/jx/releases/download/v{{.Version}}/jx-linux-amd64.tar.gz | tar xzv sudo mv jx /usr/local/bin ``` ### macOS ```shell -curl -L https://github.com/jenkins-x/jx-cli/releases/download/v{{.Version}}/jx-cli-darwin-amd64.tar.gz | tar xzv +curl -L https://github.com/jenkins-x/jx/releases/download/v{{.Version}}/jx-darwin-amd64.tar.gz | tar xzv sudo mv jx /usr/local/bin ``` diff --git a/hack/upload_plugin.sh b/hack/upload_plugin.sh index 8f10044f0c..7e77b34159 100755 --- a/hack/upload_plugin.sh +++ b/hack/upload_plugin.sh @@ -9,7 +9,7 @@ echo "apiVersion: jenkins.io/v1 kind: Plugin metadata: labels: - jenkins.io/pluginCommand: jx-cli + jenkins.io/pluginCommand: jx name: remote spec: description: CloudBees plugin for remote environments @@ -26,7 +26,7 @@ ls -al *.gz echo "uploading the plugin distro to github" github-release upload \ --user jenkins-x \ - --repo jx-cli \ + --repo jx \ --tag v${VERSION} \ --name "plugin.gz" \ --file plugin.gz diff --git a/pkg/cmd/root.go b/pkg/cmd/root.go index 4e5f27bd56..8aaa2d3e41 100644 --- a/pkg/cmd/root.go +++ b/pkg/cmd/root.go @@ -13,12 +13,12 @@ import ( v1 "github.com/jenkins-x/jx-api/v4/pkg/apis/jenkins.io/v1" "github.com/jenkins-x/jx-api/v4/pkg/client/clientset/versioned" - "github.com/jenkins-x/jx-cli/pkg/cmd/dashboard" - "github.com/jenkins-x/jx-cli/pkg/cmd/namespace" - "github.com/jenkins-x/jx-cli/pkg/cmd/ui" - "github.com/jenkins-x/jx-cli/pkg/cmd/upgrade" - "github.com/jenkins-x/jx-cli/pkg/cmd/version" - "github.com/jenkins-x/jx-cli/pkg/plugins" + "github.com/jenkins-x/jx/pkg/cmd/dashboard" + "github.com/jenkins-x/jx/pkg/cmd/namespace" + "github.com/jenkins-x/jx/pkg/cmd/ui" + "github.com/jenkins-x/jx/pkg/cmd/upgrade" + "github.com/jenkins-x/jx/pkg/cmd/version" + "github.com/jenkins-x/jx/pkg/plugins" "github.com/jenkins-x/jx-helpers/v3/pkg/cobras" "github.com/jenkins-x/jx-helpers/v3/pkg/cobras/helper" "github.com/jenkins-x/jx-helpers/v3/pkg/cobras/templates" diff --git a/pkg/cmd/ui/ui.go b/pkg/cmd/ui/ui.go index 535e27cb6e..20d4046929 100644 --- a/pkg/cmd/ui/ui.go +++ b/pkg/cmd/ui/ui.go @@ -6,7 +6,7 @@ import ( "strings" "github.com/jenkins-x/jx-api/v4/pkg/util" - "github.com/jenkins-x/jx-cli/pkg/plugins" + "github.com/jenkins-x/jx/pkg/plugins" "github.com/jenkins-x/jx-helpers/v3/pkg/cmdrunner" "github.com/jenkins-x/jx-helpers/v3/pkg/cobras/helper" "github.com/jenkins-x/jx-helpers/v3/pkg/cobras/templates" diff --git a/pkg/cmd/upgrade/upgrade_cli.go b/pkg/cmd/upgrade/upgrade_cli.go index 1656a87296..4cb00820d0 100644 --- a/pkg/cmd/upgrade/upgrade_cli.go +++ b/pkg/cmd/upgrade/upgrade_cli.go @@ -17,7 +17,7 @@ import ( "github.com/jenkins-x/jx-api/v4/pkg/util" "github.com/jenkins-x/jx-helpers/v3/pkg/files" - "github.com/jenkins-x/jx-cli/pkg/version" + "github.com/jenkins-x/jx/pkg/version" jxcore "github.com/jenkins-x/jx-api/v4/pkg/apis/core/v4beta1" "github.com/jenkins-x/jx-api/v4/pkg/client/clientset/versioned" @@ -50,7 +50,7 @@ var ( const ( // BinaryDownloadBaseURL the base URL for downloading the binary from - will always have "VERSION/jx-OS-ARCH.EXTENSION" appended to it when used - BinaryDownloadBaseURL = "https://github.com/jenkins-x/jx-cli/releases/download/v" + BinaryDownloadBaseURL = "https://github.com/jenkins-x/jx/releases/download/v" LatestVersionstreamURL = "https://github.com/jenkins-x/jxr-versions.git" ) @@ -124,7 +124,7 @@ func (o *CLIOptions) candidateInstallVersion() (semver.Version, error) { // if version stream URL is set via a flag use this gitURL := o.VersionStreamGitURL if gitURL == "" { - // get the versionstream URL used to find what jx-cli version to upgrade to + // get the versionstream URL used to find what jx version to upgrade to gitURL, err = o.getVersionStreamURL(gitURL) if err != nil { return semver.Version{}, errors.Wrapf(err, "failed to get version stream ") @@ -132,7 +132,7 @@ func (o *CLIOptions) candidateInstallVersion() (semver.Version, error) { } if gitURL == "" { - return semver.Version{}, errors.New("no version stream URL to get correct jx-cli version") + return semver.Version{}, errors.New("no version stream URL to get correct jx version") } o.Version, err = o.getJXVersion(gitURL) @@ -148,7 +148,7 @@ func (o *CLIOptions) candidateInstallVersion() (semver.Version, error) { return *requestedVersion, nil } -// get the versionstream URL used to find what jx-cli version to upgrade to +// get the versionstream URL used to find what jx version to upgrade to func (o *CLIOptions) getVersionStreamURL(gitURL string) (string, error) { // lookup the version stream URL from the Kptfile // we do this in case we are switching version streams and need to update CLI before running jx gitops upgrade @@ -172,7 +172,7 @@ func (o *CLIOptions) getVersionStreamURL(gitURL string) (string, error) { } gitURL = strings.TrimSpace(gitURL) - log.Logger().Infof("using local versionstream URL %s from Kptfile to resolve jx-cli version", gitURL) + log.Logger().Infof("using local versionstream URL %s from Kptfile to resolve jx version", gitURL) } } } @@ -182,14 +182,14 @@ func (o *CLIOptions) getVersionStreamURL(gitURL string) (string, error) { if err == nil { if env.Spec.Source.URL != "" { gitURL = env.Spec.Source.URL - log.Logger().Infof("using clusters dev environent versionstream URL %s from Kptfile to resolve jx-cli version", gitURL) + log.Logger().Infof("using clusters dev environent versionstream URL %s from Kptfile to resolve jx version", gitURL) } } } if gitURL == "" { // if none of the options above find a git url lets default to the latest upstream version stream gitURL = LatestVersionstreamURL - log.Logger().Infof("using latest upstream versionstream URL %s from Kptfile to resolve jx-cli version", gitURL) + log.Logger().Infof("using latest upstream versionstream URL %s from Kptfile to resolve jx version", gitURL) } return gitURL, nil } @@ -226,7 +226,7 @@ func (o *CLIOptions) ShouldUpdate(newVersion semver.Version) (bool, error) { // InstallJx installs jx cli func (o *CLIOptions) InstallJx(upgrade bool, version string) error { log.Logger().Debugf("installing jx %s", version) - binary := "jx-cli" + binary := "jx" if !upgrade { flag, err := shouldInstallBinary(binary) if err != nil || !flag { @@ -272,9 +272,9 @@ func (o *CLIOptions) getJXVersion(gitURL string) (string, error) { VersionsDir: versionStreamDir, } - data, err := resolver.StableVersion(versionstream.KindPackage, "jx-cli") + data, err := resolver.StableVersion(versionstream.KindPackage, "jx") if err != nil { - return "", errors.Wrapf(err, "failed to get stable version for %s from versionstream %s", "jx-cli", gitURL) + return "", errors.Wrapf(err, "failed to get stable version for %s from versionstream %s", "jx", gitURL) } return data.Version, nil } diff --git a/pkg/cmd/upgrade/upgrade_cli_test.go b/pkg/cmd/upgrade/upgrade_cli_test.go index 8ee668ec8d..4dff8c4538 100644 --- a/pkg/cmd/upgrade/upgrade_cli_test.go +++ b/pkg/cmd/upgrade/upgrade_cli_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/jenkins-x/jx-cli/pkg/version" + "github.com/jenkins-x/jx/pkg/version" "github.com/blang/semver" "github.com/jenkins-x/jx-logging/v3/pkg/log" diff --git a/pkg/cmd/upgrade/upgrade_plugins.go b/pkg/cmd/upgrade/upgrade_plugins.go index 86b3880566..b010c8e6f6 100644 --- a/pkg/cmd/upgrade/upgrade_plugins.go +++ b/pkg/cmd/upgrade/upgrade_plugins.go @@ -1,7 +1,7 @@ package upgrade import ( - "github.com/jenkins-x/jx-cli/pkg/plugins" + "github.com/jenkins-x/jx/pkg/plugins" "github.com/jenkins-x/jx-helpers/v3/pkg/cmdrunner" "github.com/jenkins-x/jx-helpers/v3/pkg/cobras/helper" "github.com/jenkins-x/jx-helpers/v3/pkg/cobras/templates" diff --git a/pkg/cmd/upgrade/upgrade_plugins_test.go b/pkg/cmd/upgrade/upgrade_plugins_test.go index 6e56ebc455..2895882073 100644 --- a/pkg/cmd/upgrade/upgrade_plugins_test.go +++ b/pkg/cmd/upgrade/upgrade_plugins_test.go @@ -3,7 +3,7 @@ package upgrade_test import ( "testing" - "github.com/jenkins-x/jx-cli/pkg/cmd/upgrade" + "github.com/jenkins-x/jx/pkg/cmd/upgrade" "github.com/stretchr/testify/require" ) diff --git a/pkg/plugins/helpers_test.go b/pkg/plugins/helpers_test.go index 938f72f93a..c0806eb612 100644 --- a/pkg/plugins/helpers_test.go +++ b/pkg/plugins/helpers_test.go @@ -3,7 +3,7 @@ package plugins_test import ( "testing" - "github.com/jenkins-x/jx-cli/pkg/plugins" + "github.com/jenkins-x/jx/pkg/plugins" "github.com/stretchr/testify/assert" ) diff --git a/pkg/plugins/versions.go b/pkg/plugins/versions.go index ac4c3d93b7..a0af1ee7d9 100644 --- a/pkg/plugins/versions.go +++ b/pkg/plugins/versions.go @@ -52,17 +52,16 @@ const ( var ( // Plugins default plugins Plugins = []jenkinsv1.Plugin{ - extensions.CreateJXPlugin(jenkinsxOrganisation, "admin", AdminVersion), - extensions.CreateJXPlugin(jenkinsxOrganisation, "application", ApplicationVersion), - extensions.CreateJXPlugin(jenkinsxOrganisation, "gitops", GitOpsVersion), + extensions.CreateJXPlugin(jenkinsxPluginsOrganisation, "admin", AdminVersion), + extensions.CreateJXPlugin(jenkinsxPluginsOrganisation, "application", ApplicationVersion), + extensions.CreateJXPlugin(jenkinsxPluginsOrganisation, "gitops", GitOpsVersion), extensions.CreateJXPlugin(jenkinsxPluginsOrganisation, "health", HealthVersion), - extensions.CreateJXPlugin(jenkinsxOrganisation, "jenkins", JenkinsVersion), - extensions.CreateJXPlugin(jenkinsxOrganisation, "pipeline", PipelineVersion), - extensions.CreateJXPlugin(jenkinsxOrganisation, "preview", PreviewVersion), - extensions.CreateJXPlugin(jenkinsxOrganisation, "project", ProjectVersion), - extensions.CreateJXPlugin(jenkinsxOrganisation, "promote", PromoteVersion), - extensions.CreateJXPlugin(jenkinsxOrganisation, "secret", SecretVersion), + extensions.CreateJXPlugin(jenkinsxPluginsOrganisation, "pipeline", PipelineVersion), + extensions.CreateJXPlugin(jenkinsxPluginsOrganisation, "preview", PreviewVersion), + extensions.CreateJXPlugin(jenkinsxPluginsOrganisation, "project", ProjectVersion), + extensions.CreateJXPlugin(jenkinsxPluginsOrganisation, "promote", PromoteVersion), + extensions.CreateJXPlugin(jenkinsxPluginsOrganisation, "secret", SecretVersion), extensions.CreateJXPlugin(jenkinsxOrganisation, "test", TestVersion), - extensions.CreateJXPlugin(jenkinsxOrganisation, "verify", VerifyVersion), + extensions.CreateJXPlugin(jenkinsxPluginsOrganisation, "verify", VerifyVersion), } ) diff --git a/pkg/version/info_test.go b/pkg/version/info_test.go index b136eff5dc..b0f19f244c 100644 --- a/pkg/version/info_test.go +++ b/pkg/version/info_test.go @@ -5,7 +5,7 @@ package version_test import ( "testing" - "github.com/jenkins-x/jx-cli/pkg/version" + "github.com/jenkins-x/jx/pkg/version" "github.com/blang/semver" "github.com/stretchr/testify/assert"