-
Notifications
You must be signed in to change notification settings - Fork 237
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #986 from CircleCI-Public/develop
Release
- Loading branch information
Showing
8 changed files
with
77 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,12 +2,14 @@ version: 2.1 | |
|
||
orbs: | ||
shellcheck: circleci/[email protected] | ||
snyk: snyk/[email protected] | ||
windows: circleci/[email protected] | ||
|
||
executors: | ||
go: | ||
docker: | ||
- image: cimg/go:1.20 | ||
resource_class: large | ||
environment: | ||
CGO_ENABLED: 0 | ||
mac: | ||
|
@@ -25,7 +27,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 +43,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 +118,7 @@ jobs: | |
- persist_to_workspace: | ||
root: . | ||
paths: | ||
- 'build' | ||
- "build" | ||
cucumber: | ||
docker: | ||
- image: cimg/ruby:2.7 | ||
|
@@ -130,7 +127,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 +206,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 +243,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: | ||
|
@@ -304,6 +301,46 @@ jobs: | |
command: choco push circleci-cli.nupkg --source https://chocolatey.org/ --apikey $env:CHOCO_API_KEY | ||
working_directory: chocolatey | ||
|
||
vulnerability-scan: | ||
executor: go | ||
steps: | ||
- checkout | ||
- run: | ||
name: Setup Scanning | ||
command: | | ||
git config --global url."https://$GITHUB_USER:[email protected]/circleci/".insteadOf "https://github.com/circleci/" | ||
- when: | ||
condition: | ||
or: | ||
- equal: [ main, << pipeline.git.branch >> ] | ||
steps: | ||
- run: | ||
name: Launching Snyk Orb Scanning | ||
command: echo "Running snyk/scan on main; uploading the results" | ||
- run: | ||
name: Cleanup RemoteRepoURL | ||
command: echo 'export REMOTE_REPO_URL="${CIRCLE_REPOSITORY_URL%".git"}"' >> "$BASH_ENV" | ||
- snyk/scan: | ||
organization: "circleci-public" | ||
fail-on-issues: true | ||
severity-threshold: high | ||
monitor-on-build: true | ||
additional-arguments: "--all-projects --remote-repo-url=${REMOTE_REPO_URL} -d" | ||
- unless: | ||
condition: | ||
or: | ||
- equal: [ main, << pipeline.git.branch >> ] | ||
steps: | ||
- run: | ||
name: Launching Snyk Orb Scanning | ||
command: echo "Running snyk/scan on branch; not uploading the results" | ||
- snyk/scan: | ||
organization: "circleci-public" | ||
fail-on-issues: true | ||
severity-threshold: high | ||
monitor-on-build: false | ||
additional-arguments: "--all-projects -d" | ||
|
||
workflows: | ||
ci: | ||
jobs: | ||
|
@@ -317,6 +354,8 @@ workflows: | |
- test_windows | ||
- coverage | ||
- lint | ||
- vulnerability-scan: | ||
context: org-global-employees | ||
- deploy-test | ||
- docs: | ||
requires: | ||
|
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,4 @@ LABEL maintainer="Developer Experience Team <[email protected]>" | |
|
||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters