Skip to content

Commit

Permalink
Added manifest tool and multi arch build (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
MrUPGrade committed May 23, 2020
1 parent 3501217 commit f9d1b3e
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 30 deletions.
72 changes: 68 additions & 4 deletions .iceci.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,75 @@
steps:
- name: docker-build
dockerBuild:
- name: docker-build-amd64
runtimeProfile: amd64
when:
event: ["commit", "tag"]
containerBuild:
user: iceci
imageName: utils
dockerSecret: dockerhub
contextPath: utils
dockerfilePath: utils/Dockerfile
tags:
- "3"
- latest
- "{{ ICE_GIT_TAG_OR_BRANCH }}-amd64"
- "latest-amd64"
buildArgs:
- name: BIN_ARCH
value: amd64


- name: docker-build-arm
runtimeProfile: arm
when:
event: ["commit", "tag"]
containerBuild:
user: iceci
imageName: utils
dockerSecret: dockerhub
contextPath: utils
dockerfilePath: utils/Dockerfile
tags:
- "{{ ICE_GIT_TAG_OR_BRANCH }}-arm"
- "latest-arm"
buildArgs:
- name: BIN_ARCH
value: armv7


- name: docker-build-arm64
runtimeProfile: arm64
when:
event: ["commit", "tag"]
containerBuild:
user: iceci
imageName: utils
dockerSecret: dockerhub
contextPath: utils
dockerfilePath: utils/Dockerfile
tags:
- "{{ ICE_GIT_TAG_OR_BRANCH }}-arm64"
- "latest-arm64"
buildArgs:
- name: BIN_ARCH
value: arm64


- name: manifest-push
when:
event: ["commit", "tag"]
containerRun:
image: iceci/utils
script: |
echo "pushing manifest for tag/branch ${ICE_GIT_TAG_OR_BRANCH}"
manifest-tool push from-args \
--platforms linux/amd64,linux/arm,linux/arm64 \
--template "iceci/utils:${ICE_GIT_TAG_OR_BRANCH}-ARCH" \
--target "iceci/utils:${ICE_GIT_TAG_OR_BRANCH}"
echo "pushing manifest for tag latest"
manifest-tool push from-args \
--platforms linux/amd64,linux/arm,linux/arm64 \
--template "iceci/utils:latest-ARCH" \
--target "iceci/utils:latest"
files:
- path: /root/.docker/config.json
fromSecret: docker-config
16 changes: 0 additions & 16 deletions Makefile

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ This repo contains docker files for images used by IceCI pipelines.

---

_Kept cool 🧊 by [Icetek](https://icetek.io/)_
Kept cool 🧊 by [Icetek](https://icetek.io/)
7 changes: 0 additions & 7 deletions utils-arm.Dockerfile

This file was deleted.

12 changes: 10 additions & 2 deletions utils/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
FROM debian:10
RUN apt-get update && apt-get install -y apt-transport-https curl gnupg && \
ARG DEBIAN_VER=10
FROM debian:${DEBIAN_VER}

ARG BIN_ARCH=amd64
ARG MANIFEST_TOOL_VER=v1.0.2

RUN apt-get update && apt-get install -y wget apt-transport-https curl gnupg && \
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - && \
echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" > /etc/apt/sources.list.d/kubernetes.list && \
apt-get update && \
apt-get install -y git kubectl=1.17.4-00 && \
wget https://github.com/estesp/manifest-tool/releases/download/${MANIFEST_TOOL_VER}/manifest-tool-linux-${BIN_ARCH} \
-O /usr/local/bin/manifest-tool && \
chmod +x /usr/local/bin/manifest-tool && \
apt-get autoclean

0 comments on commit f9d1b3e

Please sign in to comment.