forked from rancher/rke-tools
-
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.
- Loading branch information
1 parent
6f30765
commit 8e0d338
Showing
4 changed files
with
129 additions
and
8 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 |
---|---|---|
@@ -0,0 +1,106 @@ | ||
kind: pipeline | ||
name: amd64 | ||
|
||
platform: | ||
os: linux | ||
arch: amd64 | ||
|
||
steps: | ||
- name: build | ||
image: rancher/dapper:v0.4.1 | ||
volumes: | ||
- name: docker | ||
path: /var/run/docker.sock | ||
commands: | ||
- dapper ci | ||
- name: stage-binaries | ||
image: rancher/dapper:v0.4.1 | ||
commands: | ||
- cp -r ./bin/* ./ | ||
when: | ||
event: | ||
- tag | ||
- name: publish-rke-tools-amd64 | ||
image: plugins/docker | ||
settings: | ||
username: | ||
from_secret: dockerhub_username | ||
password: | ||
from_secret: dockerhub_password | ||
dockerfile: package/Dockerfile | ||
build_args: | ||
- ARCH=amd64 | ||
repo: jianghang8421/rke-tools | ||
tag: "${DRONE_TAG}-amd64" | ||
when: | ||
event: | ||
- tag | ||
volumes: | ||
- name: docker | ||
host: | ||
path: /var/run/docker.sock | ||
--- | ||
kind: pipeline | ||
name: arm64 | ||
|
||
platform: | ||
os: linux | ||
arch: arm64 | ||
|
||
steps: | ||
- name: build | ||
image: rancher/dapper:v0.4.1 | ||
volumes: | ||
- name: docker | ||
path: /var/run/docker.sock | ||
commands: | ||
- dapper ci | ||
- name: stage-binaries | ||
image: rancher/dapper:v0.4.1 | ||
commands: | ||
- cp -r ./bin/* ./ | ||
when: | ||
event: | ||
- tag | ||
- name: publish-rke-tools-arm64 | ||
image: plugins/docker:linux-arm64 | ||
settings: | ||
username: | ||
from_secret: dockerhub_username | ||
password: | ||
from_secret: dockerhub_password | ||
dockerfile: package/Dockerfile | ||
build_args: | ||
- ARCH=arm64 | ||
repo: jianghang8421/rke-tools | ||
tag: "${DRONE_TAG}-arm64" | ||
when: | ||
event: | ||
- tag | ||
volumes: | ||
- name: docker | ||
host: | ||
path: /var/run/docker.sock | ||
--- | ||
kind: pipeline | ||
name: manifest | ||
|
||
steps: | ||
- name: push-manifest | ||
image: plugins/manifest:1.0.2 | ||
settings: | ||
username: | ||
from_secret: dockerhub_username | ||
password: | ||
from_secret: dockerhub_password | ||
target: "jianghang8421/rke-tools:${DRONE_TAG}" | ||
template: "jianghang8421/rke-tools:${DRONE_TAG}-ARCH" | ||
platforms: | ||
- linux/amd64 | ||
- linux/arm64 | ||
when: | ||
event: | ||
- tag | ||
depends_on: | ||
- amd64 | ||
- arm64 |
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 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,19 +1,33 @@ | ||
FROM nginx:1.14.0-alpine | ||
|
||
LABEL maintainer "Rancher Labs <[email protected]>" | ||
RUN apk -U --no-cache add bash curl wget ca-certificates tar sysstat\ | ||
ARG ARCH=amd64 | ||
ENV DOCKER_URL_amd64=https://get.docker.com/builds/Linux/x86_64/docker-1.12.3.tgz \ | ||
DOCKER_URL_arm64=https://github.com/rancher/docker/releases/download/v1.12.3/docker-v1.12.3_arm64.tgz \ | ||
DOCKER_URL=DOCKER_URL_${ARCH} | ||
RUN apk -U --no-cache add bash \ | ||
&& rm -f /bin/sh \ | ||
&& ln -s /bin/bash /bin/sh | ||
RUN apk -U --no-cache add curl wget ca-certificates tar sysstat\ | ||
&& mkdir -p /opt/rke-tools/bin /etc/confd \ | ||
&& curl -sLf https://github.com/kelseyhightower/confd/releases/download/v0.16.0/confd-0.16.0-linux-amd64 > /usr/bin/confd \ | ||
&& curl -sLf https://github.com/kelseyhightower/confd/releases/download/v0.16.0/confd-0.16.0-linux-${ARCH} > /usr/bin/confd \ | ||
&& chmod +x /usr/bin/confd \ | ||
&& curl -sLf https://get.docker.com/builds/Linux/x86_64/docker-1.12.3.tgz | tar xvzf - -C /opt/rke-tools/bin --strip-components=1 docker/docker \ | ||
&& curl -sLf ${!DOCKER_URL} | tar xvzf - -C /opt/rke-tools/bin --strip-components=1 docker/docker \ | ||
&& chmod +x /opt/rke-tools/bin/docker \ | ||
&& apk del curl | ||
|
||
ENV PORTMAP_URL_amd64=https://github.com/projectcalico/cni-plugin/releases/download/v1.9.1/portmap \ | ||
PORTMAP_URL_arm64=https://github.com/jianghang8421/plugins/releases/download/v1.9.1-rancher/portmap-arm64 \ | ||
PORTMAP_URL=PORTMAP_URL_${ARCH} | ||
|
||
RUN mkdir -p /opt/cni/bin | ||
RUN wget -q -O - https://github.com/containernetworking/cni/releases/download/v0.4.0/cni-amd64-v0.4.0.tgz | tar xzf - -C /tmp | ||
RUN wget -q -O /tmp/portmap https://github.com/projectcalico/cni-plugin/releases/download/v1.9.1/portmap | ||
RUN wget -q -O /tmp/portmap ${!PORTMAP_URL} | ||
|
||
RUN wget -q -O - https://github.com/coreos/etcd/releases/download/v3.0.17/etcd-v3.0.17-linux-amd64.tar.gz | tar xzf - -C /tmp && \ | ||
ENV ETCD_URL_amd64=https://github.com/coreos/etcd/releases/download/v3.0.17/etcd-v3.0.17-linux-amd64.tar.gz \ | ||
ETCD_URL_arm64=https://github.com/etcd-io/etcd/releases/download/v3.3.10/etcd-v3.3.10-linux-arm64.tar.gz \ | ||
ETCD_URL=ETCD_URL_${ARCH} | ||
RUN wget -q -O - ${!ETCD_URL} | tar xzf - -C /tmp && \ | ||
mv /tmp/etcd-*/etcdctl /usr/local/bin/etcdctl && \ | ||
rm -rf /tmp/etcd-* && rm -f /etcd-*.tar.gz && \ | ||
apk del wget | ||
|
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