From c9bf36732b0abb46795e2ba4c3b428fefbf239ed Mon Sep 17 00:00:00 2001 From: Alan Peng Date: Tue, 13 Dec 2022 23:21:28 -0500 Subject: [PATCH] Add ARM platform support --- .circleci/config.yml | 71 ++++++++++++++++++++++++++++++++++++++++++++ Dockerfile.aarch64 | 2 +- Dockerfile.amd64 | 2 +- 3 files changed, 73 insertions(+), 2 deletions(-) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..004435b --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,71 @@ +jobs: + build-branches-x86: + machine: true + steps: + - checkout + - run: + name: Build a container image + command: | + docker build -f Dockerfile.amd64 -t wise2c/kubeadm-version:$CIRCLE_BRANCH . + docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD + docker push wise2c/kubeadm-version:$CIRCLE_BRANCH + docker run --rm --name=kubeadm-version wise2c/kubeadm-version:$CIRCLE_BRANCH kubeadm config images list + + build-tags-x86: + machine: true + steps: + - checkout + - run: + name: Build a container image + command: | + docker build -f Dockerfile.amd64 -t wise2c/kubeadm-version:$CIRCLE_TAG . + docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD + docker push wise2c/kubeadm-version:$CIRCLE_TAG + docker run --rm --name=kubeadm-version wise2c/kubeadm-version:$CIRCLE_TAG kubeadm config images list + + build-branches-arm: + machine: true + resource_class: arm.medium + steps: + - checkout + - run: + name: Build a container image + command: | + docker build -f Dockerfile.aarch64 -t wise2c/kubeadm-version-arm:$CIRCLE_BRANCH . + docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD + docker push wise2c/kubeadm-version-arm:$CIRCLE_BRANCH + docker run --rm --name=kubeadm-version wise2c/kubeadm-version-arm:$CIRCLE_BRANCH kubeadm config images list + + build-tags-arm: + resource_class: arm.medium + machine: true + steps: + - checkout + - run: + name: Build a container image + command: | + docker build -f Dockerfile.aarch64 -t wise2c/kubeadm-version-arm:$CIRCLE_TAG . + docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD + docker push wise2c/kubeadm-version-arm:$CIRCLE_TAG + docker run --rm --name=kubeadm-version wise2c/kubeadm-version-arm:$CIRCLE_TAG kubeadm config images list + +workflows: + version: 2 + build-for-branches: + jobs: + - build-branches-x86 + - build-branches-arm + build-for-tags: + jobs: + - build-tags-x86: + filters: + tags: + only: /^v.*/ + branches: + ignore: /.*/ + - build-tags-arm: + filters: + tags: + only: /^v.*/ + branches: + ignore: /.*/ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 12ae597..af875cc 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -1,3 +1,3 @@ FROM centos:8 COPY kubernetes-aarch64.repo /etc/yum.repos.d -RUN yum -y install kubeadm-1.20.5 +RUN yum -y install kubeadm-1.26.0 diff --git a/Dockerfile.amd64 b/Dockerfile.amd64 index d15f686..af18c60 100644 --- a/Dockerfile.amd64 +++ b/Dockerfile.amd64 @@ -1,3 +1,3 @@ FROM centos:8 COPY kubernetes-amd64.repo /etc/yum.repos.d -RUN yum -y install kubeadm-1.20.5 +RUN yum -y install kubeadm-1.26.0