Skip to content

Commit

Permalink
ci(circleci): cleanup circleci configuration and scripts (#10908)
Browse files Browse the repository at this point in the history
* ci(circleci): remove circle CI configuration
* ci(circleci): replace build badge with GHA badge
* ci(circleci): remove circle ci directives in e2e.yaml workflow
* ci(circleci): remove circle ci in doc
---------

Signed-off-by: Jay Chen <[email protected]>
  • Loading branch information
jijiechen authored and kumahq[bot] committed Aug 7, 2024
1 parent c92fe7c commit 288c164
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 25 deletions.
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
.circleci
.github
.gitignore
.gitmodules
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,15 @@ jobs:
TITLE: ${{ github.event.pull_request.title }}
run: |
commitlint --config .github/commitlint.config.js --edit=<(echo "${TITLE}")
<<<<<<< HEAD
=======
- name: Maybe add backport label
if: github.event.action == 'synchronize' && false # disable until https://github.com/kumahq/kuma/issues/9482
env:
GITHUB_TOKEN: ${{ github.token }}
PREDEFINED_GLOBS: ".github/**/*,Makefile,mk/**/*,tools/**/*,.golangci.yml,.kube-linter.yaml"
LABEL_TO_ADD: backport
NO_BACKPORT_AUTOLABEL: no-backport-autolabel
run: |
tools/ci/needs_backporting.sh "${{ github.repository }}" "${{ github.event.pull_request.number }}" "origin/${{ github.base_ref }}" "HEAD" "$PREDEFINED_GLOBS" "$LABEL_TO_ADD" "$NO_BACKPORT_AUTOLABEL"
>>>>>>> e780588b9 (ci(circleci): cleanup circleci configuration and scripts (#10908))
50 changes: 30 additions & 20 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
matrix:
parallelRunnerId: ${{ fromJSON((fromJSON(inputs.matrix).parallelism == '3' && '[0, 1, 2]') || '[0]') }}
steps:
<<<<<<< HEAD:.github/workflows/e2e.yaml
- name: "Print parameters"
id: eval-params
run: |
Expand All @@ -55,17 +56,24 @@ jobs:
- name: "GitHub Actions: set up cache"
if: steps.eval-params.outputs.run-type == 'github'
uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
=======
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: go.mod
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
>>>>>>> e780588b9 (ci(circleci): cleanup circleci configuration and scripts (#10908)):.github/workflows/_e2e.yaml
with:
path: |
${{ env.CI_TOOLS_DIR }}
key: ${{ runner.os }}-${{ runner.arch }}-devtools-${{ hashFiles('mk/dependencies/deps.lock') }}
restore-keys: |
${{ runner.os }}-${{ runner.arch }}-devtools
- if: steps.eval-params.outputs.run-type == 'github'
run: |
- run: |
make dev/tools
- name: "Github Actions: Free up disk space for the Runner"
if: steps.eval-params.outputs.run-type == 'github'
- name: "Free up disk space for the Runner"
run: |
echo "Disk usage before cleanup"
sudo df -h
Expand All @@ -75,25 +83,17 @@ jobs:
docker system prune --all -f
echo "Disk usage after cleanup"
sudo df -h
- name: "Github Actions: build"
if: steps.eval-params.outputs.run-type == 'github'
run: |
- run: |
make build
- name: "Github Actions: distributions"
if: steps.eval-params.outputs.run-type == 'github'
run: |
- run: |
make -j build/distributions
- name: "Github Actions: images"
if: steps.eval-params.outputs.run-type == 'github'
run: |
- run: |
make -j images
make -j docker/save
- name: "GitHub Actions: setup helm"
if: steps.eval-params.outputs.run-type == 'github'
run: |
- run: |
make dev/set-kuma-helm-repo
- name: "GitHub Actions: enable ipv6 for docker"
if: ${{ steps.eval-params.outputs.run-type == 'github' && env.E2E_PARAM_K8S_VERSION == 'kindIpv6' }}
- name: "Enable ipv6 for docker"
if: ${{ env.E2E_PARAM_K8S_VERSION == 'kindIpv6' }}
run: |
cat <<'EOF' | sudo tee /etc/docker/daemon.json
{
Expand All @@ -104,8 +104,7 @@ jobs:
}
EOF
sudo service docker restart
- name: "GitHub Actions: run E2E tests"
if: steps.eval-params.outputs.run-type == 'github'
- name: "Run E2E tests"
run: |
if [[ "${{ env.E2E_PARAM_K8S_VERSION }}" == "kindIpv6" ]]; then
export IPV6=true
Expand Down Expand Up @@ -137,6 +136,7 @@ jobs:
target="test/e2e"
fi
make ${MAKE_PARAMETERS} CI=true "${target}"
<<<<<<< HEAD:.github/workflows/e2e.yaml
- name: "CircleCI: make circleci parameters"
if: steps.eval-params.outputs.run-type == 'circleci'
id: circleci-gen-params
Expand Down Expand Up @@ -325,3 +325,13 @@ jobs:
}
request POST https://circleci.com/api/v2/workflow/${{ steps.circle-ci-trigger.outputs.workflow_id }}/cancel
=======
- uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
if: always()
with:
name: e2e-debug-${{ env.E2E_PARAM_TARGET }}
if-no-files-found: ignore
path: |
/tmp/e2e-debug/
retention-days: ${{ github.event_name == 'pull_request' && 1 || 30 }}
>>>>>>> e780588b9 (ci(circleci): cleanup circleci configuration and scripts (#10908)):.github/workflows/_e2e.yaml
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

**Builds**

[![CircleCI master](https://img.shields.io/circleci/build/github/kumahq/kuma/master?label=master)](https://circleci.com/gh/kumahq/kuma/tree/master)
![GitHub Actions master](https://github.com/kumahq/kuma/actions/workflows/build-test-distribute.yaml/badge.svg?branch=master)

**Code quality**

Expand Down
5 changes: 5 additions & 0 deletions mk/check.mk
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,14 @@ golangci-lint-fmt:

.PHONY: fmt/ci
fmt/ci:
<<<<<<< HEAD
$(CI_TOOLS_BIN_DIR)/yq -i '.parameters.go_version.default = "$(GO_VERSION)" | .parameters.first_k8s_version.default = "$(K8S_MIN_VERSION)" | .parameters.last_k8s_version.default = "$(K8S_MAX_VERSION)"' .circleci/config.yml
$(CI_TOOLS_BIN_DIR)/yq -i '.env.K8S_MIN_VERSION = "$(K8S_MIN_VERSION)" | .env.K8S_MAX_VERSION = "$(K8S_MAX_VERSION)"' .github/workflows/"$(ACTION_PREFIX)"build-test-distribute.yaml
find .github/workflows -name '*ml' | xargs -n 1 $(CI_TOOLS_BIN_DIR)/yq -i '(.jobs.* | select(. | has("steps")) | .steps[] | select(.uses == "golangci/golangci-lint-action*") | .with.version) |= "$(GOLANGCI_LINT_VERSION)"'
=======
$(YQ) -i '.env.K8S_MIN_VERSION = "$(K8S_MIN_VERSION)" | .env.K8S_MAX_VERSION = "$(K8S_MAX_VERSION)"' .github/workflows/"$(ACTION_PREFIX)"_test.yaml
grep -r "golangci/golangci-lint-action" .github/workflows --include \*ml | cut -d ':' -f 1 | xargs -n 1 $(YQ) -i '(.jobs.* | select(. | has("steps")) | .steps[] | select(.uses == "golangci/golangci-lint-action*") | .with.version) |= "$(GOLANGCI_LINT_VERSION)"'
>>>>>>> e780588b9 (ci(circleci): cleanup circleci configuration and scripts (#10908))

.PHONY: helm-lint
helm-lint:
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Executing those tests is very expensive, it is the longest job on the CI.
Adding the tests here potentially slows down the velocity of all contributors.
Please consider writing the test in `e2e_env` directory instead, where all the tests are parallelized on one Kuma deployment.

On CircleCI, all the tests are parallelized into multiple VMs. You can control on which VM the test will run using `job-X` label.
All the tests requires `job-X` label, otherwise CircleCI won't run them.
All the tests are parallelized into multiple VMs. You can control on which VM the test will run using `job-X` label.
All the tests require `job-X` label, otherwise they won't be run.

## Reasons to write the test in this package over `e2e_env`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ for dep in $(osv-scanner "$OSV_SCANNER_ADDITIONAL_OPTS" --lockfile=go.mod --json
echo "Updating $package to $fixVersion"

if [[ "$package" == "stdlib" ]]; then
yq -i e ".parameters.go_version.default = \"$fixVersion\"" .circleci/config.yml
go mod edit -go="$fixVersion"
else
go get -u "$package"@v"$fixVersion"
Expand Down

0 comments on commit 288c164

Please sign in to comment.