Revert back to Drone
This commit is contained in:
48
.drone.yaml
Normal file
48
.drone.yaml
Normal file
@@ -0,0 +1,48 @@
|
||||
---
|
||||
kind: pipeline
|
||||
type: kubernetes
|
||||
name: build-amd64
|
||||
platform:
|
||||
arch: amd64
|
||||
os: linux
|
||||
node_selector:
|
||||
kubernetes.io/arch: amd64
|
||||
steps:
|
||||
- name: submodules
|
||||
image: alpine/git
|
||||
commands:
|
||||
- touch .gitmodules
|
||||
- echo "ENV GIT_COMMIT=$(git rev-parse HEAD)" >> Dockerfile
|
||||
- echo "ENV GIT_COMMIT_TIMESTAMP=$(git log -1 --format=%cd --date=iso-strict)" >> Dockerfile
|
||||
- cat Dockerfile
|
||||
- name: docker
|
||||
image: mirror.gcr.io/codemowers/drone-kaniko
|
||||
settings:
|
||||
repo: ${DRONE_REPO}
|
||||
tags: latest-amd64
|
||||
registry: harbor.codemowers.eu
|
||||
storage_driver: vfs
|
||||
username:
|
||||
from_secret: docker_username
|
||||
password:
|
||||
from_secret: docker_password
|
||||
---
|
||||
kind: pipeline
|
||||
type: kubernetes
|
||||
name: manifest
|
||||
steps:
|
||||
- name: manifest
|
||||
image: plugins/manifest
|
||||
settings:
|
||||
target: ${DRONE_REPO}:latest
|
||||
template: ${DRONE_REPO}:latest-ARCH
|
||||
platforms:
|
||||
- linux/amd64
|
||||
- linux/arm64
|
||||
username:
|
||||
from_secret: docker_username
|
||||
password:
|
||||
from_secret: docker_password
|
||||
depends_on:
|
||||
- build-amd64
|
||||
- build-arm64
|
||||
@@ -1,31 +0,0 @@
|
||||
---
|
||||
matrix:
|
||||
ARCH:
|
||||
- amd64
|
||||
- arm64
|
||||
|
||||
steps:
|
||||
- name: build
|
||||
image: woodpeckerci/plugin-kaniko
|
||||
backend_options:
|
||||
kubernetes:
|
||||
nodeSelector:
|
||||
kubernetes.io/arch: ${ARCH}
|
||||
tolerations:
|
||||
- key: arch
|
||||
operator: Equal
|
||||
value: ${ARCH}
|
||||
effect: NoSchedule
|
||||
settings:
|
||||
repo: ${CI_REPO}
|
||||
registry: harbor.codemowers.eu
|
||||
tags: latest-${ARCH}
|
||||
username:
|
||||
from_secret: docker_username
|
||||
password:
|
||||
from_secret: docker_password
|
||||
when:
|
||||
- branch: master
|
||||
event:
|
||||
- push
|
||||
- manual
|
||||
@@ -1,30 +0,0 @@
|
||||
---
|
||||
skip_clone: true
|
||||
|
||||
steps:
|
||||
- name: manifest
|
||||
image: mirror.gcr.io/mplatform/manifest-tool:alpine-v2.1.6
|
||||
secrets:
|
||||
- docker_username
|
||||
- docker_password
|
||||
commands:
|
||||
- |
|
||||
cat << EOF > spec.yaml
|
||||
image: "harbor.codemowers.eu/${CI_REPO}:latest"
|
||||
manifests:
|
||||
- image: "harbor.codemowers.eu/${CI_REPO}:latest-amd64"
|
||||
platform:
|
||||
architecture: amd64
|
||||
os: linux
|
||||
- image: "harbor.codemowers.eu/${CI_REPO}:latest-arm64"
|
||||
platform:
|
||||
architecture: arm64
|
||||
os: linux
|
||||
EOF
|
||||
- /manifest-tool --username $docker_username --password $docker_password push from-spec spec.yaml > stdout
|
||||
- cat stdout
|
||||
when:
|
||||
- branch: master
|
||||
|
||||
depends_on:
|
||||
- build
|
||||
Reference in New Issue
Block a user