diff --git a/.circleci/config.yml b/.circleci/config.yml index 7485d0566..e2fa808e6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -8,6 +8,7 @@ executors: go: docker: - image: cimg/go:1.20 + resource_class: large environment: CGO_ENABLED: 0 mac: @@ -25,7 +26,7 @@ commands: # https://app.circleci.com/jobs/github/CircleCI-Public/circleci-cli/6480 # curl: (92) HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1) # The issue seems to be on the server-side, so force HTTP 1.1 - name: 'cURL: Force HTTP 1.1' + name: "cURL: Force HTTP 1.1" command: echo '--http1.1' >> ~/.curlrc build-docker-image: steps: @@ -41,36 +42,31 @@ commands: command: | docker build -t circleci/circleci-cli:0.1.$CIRCLE_BUILD_NUM-alpine --file Dockerfile.alpine . docker run --rm circleci/circleci-cli:0.1.$CIRCLE_BUILD_NUM-alpine update check - deploy-save-cache-workspace-and-artifacts: + deploy-save-workspace-and-artifacts: steps: - - save_cache: - key: v4-goreleaser-{{ checksum "~/goreleaser_amd64.deb" }} - paths: [~/goreleaser_amd64.deb] - persist_to_workspace: root: . paths: - - 'dist' + - "dist" - store_artifacts: path: ./dist destination: dist install-goreleaser: parameters: - GORELEASER_URL: + version: type: string - default: https://github.com/goreleaser/goreleaser/releases/download/v0.184.0/goreleaser_amd64.deb + default: "1.19.1" steps: - - restore_cache: - keys: [v5-goreleaser-] - run: name: Install GoReleaser command: | - [ -f ~/goreleaser_amd64.deb ] || curl --silent --location --fail --retry 3 << parameters.GORELEASER_URL >> > ~/goreleaser_amd64.deb - sudo apt-get update -y - sudo apt install ~/goreleaser_amd64.deb + echo 'deb [trusted=yes] https://repo.goreleaser.com/apt/ /' | sudo tee /etc/apt/sources.list.d/goreleaser.list + sudo apt -q update -y + sudo apt -q install -y --no-install-recommends goreleaser=<< parameters.version >> gomod: steps: - restore_cache: - keys: ['v3-gomod-{{ arch }}-'] + keys: ["v3-gomod-{{ arch }}-"] - run: name: Download go module dependencies command: go mod download @@ -121,7 +117,7 @@ jobs: - persist_to_workspace: root: . paths: - - 'build' + - "build" cucumber: docker: - image: cimg/ruby:2.7 @@ -130,7 +126,7 @@ jobs: - attach_workspace: at: . - run: - name: 'Install CLI tool from workspace' + name: "Install CLI tool from workspace" command: sudo cp ~/project/build/linux/amd64/circleci /usr/local/bin/ - run: command: bundle install @@ -209,7 +205,7 @@ jobs: docker_layer_caching: true - build-docker-image - build-alpine-image - - deploy-save-cache-workspace-and-artifacts + - deploy-save-workspace-and-artifacts deploy: executor: go @@ -246,7 +242,7 @@ jobs: docker push circleci/circleci-cli:0.1.$CIRCLE_BUILD_NUM-alpine docker tag circleci/circleci-cli:0.1.$CIRCLE_BUILD_NUM-alpine circleci/circleci-cli:alpine docker push circleci/circleci-cli:alpine - - deploy-save-cache-workspace-and-artifacts + - deploy-save-workspace-and-artifacts snap: docker: diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index ec9fce118..e8f4d8c1b 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,5 +1,5 @@ * @CircleCI-Public/developer-experience *orb*.go @CircleCI-Public/orb-publishers @CircleCI-Public/developer-experience -/api/runner @CircleCI-Public/runner -/cmd/runner @CircleCI-Public/runner +/api/runner @CircleCI-Public/on-prem +/cmd/runner @CircleCI-Public/on-prem \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 7cdf842f2..88e84018c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,4 +4,4 @@ LABEL maintainer="Developer Experience Team " ENV CIRCLECI_CLI_SKIP_UPDATE_CHECK true -COPY ./dist/circleci-cli_linux_amd64/circleci /usr/local/bin +COPY ./dist/circleci-cli_linux_amd64_v1/circleci /usr/local/bin diff --git a/Dockerfile.alpine b/Dockerfile.alpine index 71240212d..0983ed58d 100644 --- a/Dockerfile.alpine +++ b/Dockerfile.alpine @@ -2,7 +2,7 @@ FROM alpine:3.8 ENV CIRCLECI_CLI_SKIP_UPDATE_CHECK true -COPY ./dist/circleci-cli_linux_amd64/circleci /usr/local/bin +COPY ./dist/circleci-cli_linux_amd64_v1/circleci /usr/local/bin RUN apk add --no-cache --upgrade git openssh ca-certificates diff --git a/Makefile b/Makefile index 604d50148..a51a58c4a 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ GOOS=$(shell go env GOOS) GOARCH=$(shell go env GOARCH) build: always - go build -o build/$(GOOS)/$(GOARCH)/circleci + go build -o build/$(GOOS)/$(GOARCH)/circleci -ldflags='-X github.com/CircleCI-Public/circleci-cli/telemetry.SegmentEndpoint=https://api.segment.io' build-all: build/linux/amd64/circleci build/darwin/amd64/circleci diff --git a/README.md b/README.md index a955cff70..b57b73873 100644 --- a/README.md +++ b/README.md @@ -180,6 +180,20 @@ Please see the [documentation](https://circleci-public.github.io/circleci-cli) o ## Server compatibility -There are some difference of behavior depending on the version you use: - - config validation will use the GraphQL API until **Server v4.0.5, v4.1.3, v4.2.0**. The above versions will use the new route `compile-config-with-defaults` - - `circleci orb validate` will only allow you to validate orbs using other private orbs with the option `--org-slug` from version **Server v4.2.0** +| Functionality | Impacted commands | Change description | Compatibility with Server | +| --- | --- | --- | --- | +| Config compilation and validation |