Skip to content

Commit f9d1b3e

Browse files
authored
Added manifest tool and multi arch build (#3)
1 parent 3501217 commit f9d1b3e

5 files changed

Lines changed: 79 additions & 30 deletions

File tree

.iceci.yaml

Lines changed: 68 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,75 @@
11
steps:
2-
- name: docker-build
3-
dockerBuild:
2+
- name: docker-build-amd64
3+
runtimeProfile: amd64
4+
when:
5+
event: ["commit", "tag"]
6+
containerBuild:
47
user: iceci
58
imageName: utils
69
dockerSecret: dockerhub
710
contextPath: utils
811
dockerfilePath: utils/Dockerfile
912
tags:
10-
- "3"
11-
- latest
13+
- "{{ ICE_GIT_TAG_OR_BRANCH }}-amd64"
14+
- "latest-amd64"
15+
buildArgs:
16+
- name: BIN_ARCH
17+
value: amd64
18+
19+
20+
- name: docker-build-arm
21+
runtimeProfile: arm
22+
when:
23+
event: ["commit", "tag"]
24+
containerBuild:
25+
user: iceci
26+
imageName: utils
27+
dockerSecret: dockerhub
28+
contextPath: utils
29+
dockerfilePath: utils/Dockerfile
30+
tags:
31+
- "{{ ICE_GIT_TAG_OR_BRANCH }}-arm"
32+
- "latest-arm"
33+
buildArgs:
34+
- name: BIN_ARCH
35+
value: armv7
36+
37+
38+
- name: docker-build-arm64
39+
runtimeProfile: arm64
40+
when:
41+
event: ["commit", "tag"]
42+
containerBuild:
43+
user: iceci
44+
imageName: utils
45+
dockerSecret: dockerhub
46+
contextPath: utils
47+
dockerfilePath: utils/Dockerfile
48+
tags:
49+
- "{{ ICE_GIT_TAG_OR_BRANCH }}-arm64"
50+
- "latest-arm64"
51+
buildArgs:
52+
- name: BIN_ARCH
53+
value: arm64
54+
55+
56+
- name: manifest-push
57+
when:
58+
event: ["commit", "tag"]
59+
containerRun:
60+
image: iceci/utils
61+
script: |
62+
echo "pushing manifest for tag/branch ${ICE_GIT_TAG_OR_BRANCH}"
63+
manifest-tool push from-args \
64+
--platforms linux/amd64,linux/arm,linux/arm64 \
65+
--template "iceci/utils:${ICE_GIT_TAG_OR_BRANCH}-ARCH" \
66+
--target "iceci/utils:${ICE_GIT_TAG_OR_BRANCH}"
67+
68+
echo "pushing manifest for tag latest"
69+
manifest-tool push from-args \
70+
--platforms linux/amd64,linux/arm,linux/arm64 \
71+
--template "iceci/utils:latest-ARCH" \
72+
--target "iceci/utils:latest"
73+
files:
74+
- path: /root/.docker/config.json
75+
fromSecret: docker-config

Makefile

Lines changed: 0 additions & 16 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ This repo contains docker files for images used by IceCI pipelines.
44

55
---
66

7-
_Kept cool 🧊 by [Icetek](https://icetek.io/)_
7+
Kept cool 🧊 by [Icetek](https://icetek.io/)

utils-arm.Dockerfile

Lines changed: 0 additions & 7 deletions
This file was deleted.

utils/Dockerfile

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
1-
FROM debian:10
2-
RUN apt-get update && apt-get install -y apt-transport-https curl gnupg && \
1+
ARG DEBIAN_VER=10
2+
FROM debian:${DEBIAN_VER}
3+
4+
ARG BIN_ARCH=amd64
5+
ARG MANIFEST_TOOL_VER=v1.0.2
6+
7+
RUN apt-get update && apt-get install -y wget apt-transport-https curl gnupg && \
38
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - && \
49
echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" > /etc/apt/sources.list.d/kubernetes.list && \
510
apt-get update && \
611
apt-get install -y git kubectl=1.17.4-00 && \
12+
wget https://github.com/estesp/manifest-tool/releases/download/${MANIFEST_TOOL_VER}/manifest-tool-linux-${BIN_ARCH} \
13+
-O /usr/local/bin/manifest-tool && \
14+
chmod +x /usr/local/bin/manifest-tool && \
715
apt-get autoclean

0 commit comments

Comments
 (0)