Skip to content

Commit

Permalink
test111
Browse files Browse the repository at this point in the history
  • Loading branch information
cpanato committed Dec 5, 2021
1 parent 2368445 commit f814c58
Showing 1 changed file with 53 additions and 12 deletions.
65 changes: 53 additions & 12 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ executors:
docker:
- image: docker:stable

install_buildx: &install_buildx
name: Install Docker buildx
command: |
mkdir -p ~/.docker/cli-plugins
curl -sSL -o ~/.docker/cli-plugins/docker-buildx https://github.com/docker/buildx/releases/download/v0.7.0/buildx-v0.7.0.linux-amd64
chmod a+x ~/.docker/cli-plugins/docker-buildx
jobs:
lint:
executor:
Expand All @@ -32,12 +39,7 @@ jobs:
steps:
- checkout
- setup_remote_docker
- run:
name: Install Docker buildx
command: |
mkdir -p ~/.docker/cli-plugins
curl -sSL -o ~/.docker/cli-plugins/docker-buildx https://github.com/docker/buildx/releases/download/v0.7.0/buildx-v0.7.0.linux-amd64
chmod a+x ~/.docker/cli-plugins/docker-buildx
- run: *install_buildx
- run:
name: Create Docker context
command: docker context create falco-environment
Expand All @@ -47,9 +49,6 @@ jobs:
- run:
name: Start tonistiigi/binfmt:latest container
command: docker run --rm --privileged tonistiigi/binfmt:latest --install "$BUILDX_PLATFORMS"
- run:
name: Remove buildx multiarch container in case it exists
command: docker rm -f buildx_buildkit_docker-multiarch0 || continue
- run:
name: Create docker-multiarch builder
command: |
Expand Down Expand Up @@ -78,21 +77,63 @@ jobs:
command: |
export PATH=$PATH:/usr/local/goreleaser
goreleaser --snapshot --rm-dist
docker images
docker run falcosecurity/falcosidekick:latest-amd64 --help
build-push-main:
executor:
name: default
steps:
- checkout
- setup_remote_docker
- run: *install_buildx
- run:
name: Create Docker context
command: docker context create falco-environment
- run:
name: Initialize Docker buildx
command: docker buildx install
- run:
name: Start tonistiigi/binfmt:latest container
command: docker run --rm --privileged tonistiigi/binfmt:latest --install "$BUILDX_PLATFORMS"
- run:
name: Create docker-multiarch builder
command: |
make build-image
docker run falcosecurity/falcosidekick:latest --help
docker buildx create --name docker-multiarch falco-environment \
--platform linux/amd64,linux/arm/v7,linux/arm64
- run:
name: Inspect & bootstrap docker-multiarch builder
command: docker buildx inspect --builder docker-multiarch --bootstrap
- run:
name: Set docker-multiarch as default builder
command: docker buildx use docker-multiarch
- run:
name: Install goreleaser
command: |
GORELEASER_URL="https://github.com/goreleaser/goreleaser/releases/download/v1.1.0/goreleaser_Linux_x86_64.tar.gz"
curl --output goreleaser_Linux_x86_64.tar.gz \
--silent --show-error --location --fail --retry 3 \
"$GORELEASER_URL"
sudo mkdir -p /usr/local/goreleaser
sudo tar -C /usr/local/goreleaser -xzf goreleaser_Linux_x86_64.tar.gz
export PATH=$PATH:/usr/local/goreleaser
goreleaser --version
- run:
command: |
export PATH=$PATH:/usr/local/goreleaser
goreleaser --snapshot --rm-dist
docker run falcosecurity/falcosidekick:latest-amd64 --help
- run:
command: |
echo ${DOCKERHUB_SECRET} | docker login -u ${DOCKERHUB_USER} --password-stdin
docker push falcosecurity/falcosidekick:latest
docker push falcosecurity/falcosidekick:latest-amd64
docker push falcosecurity/falcosidekick:latest-arm64
docker push falcosecurity/falcosidekick:latest-armv7
docker manifest create --amend falcosecurity/falcosidekick:latest falcosecurity/falcosidekick:latest-amd64 \
falcosecurity/falcosidekick:latest-arm64 falcosecurity/falcosidekick:latest-armv7
docker manifest push --purge falcosecurity/falcosidekick:latest
build-push-ecr:
executor:
Expand Down

0 comments on commit f814c58

Please sign in to comment.