-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added manifest tool and multi arch build (#3)
- Loading branch information
Showing
5 changed files
with
79 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |