From 1b8f768ea38da7e0283088d6e587efb5565e3ef7 Mon Sep 17 00:00:00 2001 From: Federico Di Pierro Date: Fri, 15 Dec 2023 10:30:41 +0100 Subject: [PATCH] cleanup(ci): dropped circleci. Signed-off-by: Federico Di Pierro --- .circleci/config.yml | 235 ------------------------------------------- 1 file changed, 235 deletions(-) delete mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 59e6abd2..00000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,235 +0,0 @@ -version: 2.1 -jobs: - "build-test": - docker: - - image: golang:1.21-alpine - steps: - - checkout - - setup_remote_docker: # used by integration tests that runs driverkit binary that needs docker - version: 20.10.24 - - run: - name: Install deps - command: apk add gcc musl-dev make bash git binutils-gold - - run: - name: Build - command: make build - - run: - name: Test - command: make test - - run: - name: Integration tests - command: make integration_test - - run: - name: Prepare Artifacts - command: | - mkdir -p /tmp/build-amd64 - cp _output/bin/driverkit /tmp/build-amd64/ - - store_artifacts: - path: /tmp/build-amd64/driverkit - destination: driverkit_amd64 - - persist_to_workspace: - root: /tmp - paths: - - build-amd64/ - "build-test-arm64": - machine: - enabled: true - image: ubuntu-2004:2022.04.1 - resource_class: arm.medium - steps: - - checkout: - path: /tmp/source - - run: - name: Prepare project - command: | - docker run --rm -it -v /tmp/source:/source -v /var/run/docker.sock:/var/run/docker.sock -w /source --name alpine_sh -d golang:1.21-alpine sh - docker exec alpine_sh apk add gcc musl-dev make bash git docker binutils-gold - docker exec alpine_sh git config --global --add safe.directory /source - - run: - name: Build - command: docker exec alpine_sh make build - - run: - name: Test - command: docker exec alpine_sh make test - - run: - name: Integration tests - command: docker exec alpine_sh make integration_test - - run: - name: Prepare Artifacts - command: | - mkdir -p /tmp/build-arm64 - cp /tmp/source/_output/bin/driverkit /tmp/build-arm64/ - - store_artifacts: - path: /tmp/build-arm64/driverkit - destination: driverkit_arm64 - - persist_to_workspace: - root: /tmp - paths: - - build-arm64/ - "build-images": - docker: - - image: alpine:3.16 - steps: - - attach_workspace: - at: / - - checkout - - setup_remote_docker: - version: 20.10.24 - docker_layer_caching: true - - run: - name: Install deps - command: | - apk update - apk add make bash git docker docker-cli-buildx - - run: - name: Login to registry - command: echo ${DOCKERHUB_SECRET} | docker login -u ${DOCKERHUB_USER} --password-stdin - - run: - name: Prepare artifact for driverkit image - command: | # driverkit dockerfile expects the binary there - mkdir -p build-amd64 - cp /build-amd64/driverkit build-amd64/ - - run: - name: Build and Push docker images - command: GIT_BRANCH="$CIRCLE_BRANCH" GIT_TAG="$CIRCLE_TAG" make push/all - - run: - name: Push latest images - command: | - if [ -n "$CIRCLE_TAG" ] - then - GIT_BRANCH="$CIRCLE_BRANCH" GIT_TAG="$CIRCLE_TAG" make push/latest - else - echo "Skipping (no git tag)" - fi - "build-images-arm64": - machine: - enabled: true - image: ubuntu-2004:2022.04.1 - docker_layer_caching: true - resource_class: arm.medium - steps: - - attach_workspace: - at: /tmp - - checkout: - path: /tmp/source - - run: - name: Install deps - command: | - sudo apt update - sudo apt install make bash git - - run: - name: Login to registry - command: echo ${DOCKERHUB_SECRET} | docker login -u ${DOCKERHUB_USER} --password-stdin - - run: - name: Prepare artifact for driverkit image - command: | # driverkit dockerfile expects the binary there - mkdir -p /tmp/source/build-arm64 - cp /tmp/build-arm64/driverkit /tmp/source/build-arm64/ - - run: - name: Build and Push docker images - command: | - cd /tmp/source - GIT_BRANCH="$CIRCLE_BRANCH" GIT_TAG="$CIRCLE_TAG" make push/all - - run: - name: Push latest images if needed - command: | - cd /tmp/source - if [ -n "$CIRCLE_TAG" ] - then - GIT_BRANCH="$CIRCLE_BRANCH" GIT_TAG="$CIRCLE_TAG" make push/latest - else - echo "Skipping (no git tag)" - fi - "images": - docker: - - image: cimg/base:stable - user: root - steps: - - checkout - - setup_remote_docker: - version: 20.10.24 - - run: - name: Prepare env - command: | - echo ${DOCKERHUB_SECRET} | docker login -u ${DOCKERHUB_USER} --password-stdin - sudo apt update - sudo apt install make bash git - - run: - name: Build and Push manifest to registry - command: | - GIT_BRANCH="$CIRCLE_BRANCH" GIT_TAG="$CIRCLE_TAG" make manifest/all - - run: - name: Push latest manifest if needed - command: | - if [ -n "$CIRCLE_TAG" ] - then - GIT_BRANCH="$CIRCLE_BRANCH" GIT_TAG="$CIRCLE_TAG" make manifest/latest - else - echo "Skipping (no git tag)" - fi - "release": - docker: - - image: cimg/go:1.21 - steps: - - checkout - - run: - name: Install goreleaser - command: | - echo 'deb [trusted=yes] https://repo.goreleaser.com/apt/ /' | sudo tee /etc/apt/sources.list.d/goreleaser.list - sudo apt update - sudo apt install goreleaser - - run: - name: Release - command: GIT_TAG="$CIRCLE_TAG" make release -workflows: - version: 2.1 - build: - jobs: - - "build-test": - filters: - tags: - only: /v[0-9]+(\.[0-9]+)*(-.*)*/ - - "build-test-arm64": - filters: - tags: - only: /v[0-9]+(\.[0-9]+)*(-.*)*/ - - "build-images": - context: falco - filters: - branches: - only: - - master - tags: - only: /v[0-9]+(\.[0-9]+)*(-.*)*/ - requires: - - "build-test" - - "build-images-arm64": - context: falco - filters: - branches: - only: - - master - tags: - only: /v[0-9]+(\.[0-9]+)*(-.*)*/ - requires: - - "build-test-arm64" - - "images": - context: falco - filters: - branches: - only: - - master - tags: - only: /v[0-9]+(\.[0-9]+)*(-.*)*/ - requires: - - "build-images" - - "build-images-arm64" - - "release": - context: falco - filters: - branches: - ignore: /.*/ - tags: - only: /v[0-9]+(\.[0-9]+)*(-.*)*/ - requires: - - "images"