Skip to content

Commit

Permalink
custom drone for s390
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasferrandiz committed Mar 23, 2022
1 parent 46715b8 commit b687ec5
Showing 1 changed file with 8 additions and 233 deletions.
241 changes: 8 additions & 233 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -1,202 +1,6 @@
---
kind: pipeline
type: docker
name: build-amd64

platform:
os: linux
arch: amd64

steps:
- name: validate-release
image: rancher/dapper:v0.5.5
commands:
- docker pull --quiet rancher/hardened-build-base:v1.17.5b7
- dapper -f Dockerfile --target dapper make validate-release
volumes:
- name: docker
path: /var/run/docker.sock
when:
event:
- tag
instance:
- drone-publish.rancher.io

- name: build
image: rancher/dapper:v0.5.5
environment:
ENABLE_REGISTRY: 'true'
GCLOUD_AUTH:
from_secret: gcloud_auth
commands:
- docker pull --quiet rancher/hardened-build-base:v1.17.5b7
- docker pull --quiet alpine:3.15
- dapper -f Dockerfile --target dapper make dapper-ci
volumes:
- name: docker
path: /var/run/docker.sock

- name: fossa
image: rancher/drone-fossa:latest
failure: ignore
settings:
api_key:
from_secret: FOSSA_API_KEY
when:
instance:
- drone-publish.rancher.io
ref:
include:
- "refs/heads/master"
- "refs/heads/release-*"
- "refs/tags/v*"
- "refs/pull/*"
event:
- push
- tag

- name: package-images
image: rancher/dapper:v0.5.5
commands:
- docker pull --quiet rancher/hardened-build-base:v1.17.5b7
- dapper -f Dockerfile --target dapper make package-images
volumes:
- name: docker
path: /var/run/docker.sock
when:
event:
- tag
instance:
- drone-publish.rancher.io

- name: scan
image: rancher/dapper:v0.5.5
failure: ignore
commands:
- dapper -f Dockerfile --target dapper make scan-images
volumes:
- name: docker
path: /var/run/docker.sock
when:
instance:
- drone-publish.rancher.io

- name: test
image: rancher/dapper:v0.5.5
secrets: [ gcloud_auth ]
environment:
ENABLE_REGISTRY: 'true'
GCLOUD_AUTH:
from_secret: gcloud_auth
commands:
- dapper -f Dockerfile --target dapper make test
volumes:
- name: docker
path: /var/run/docker.sock

- name: publish-image-runtime
image: rancher/hardened-build-base:v1.17.5b7
commands:
- docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
- DRONE_TAG=${DRONE_TAG} make publish-image-runtime
environment:
DOCKER_PASSWORD:
from_secret: docker_password
DOCKER_USERNAME:
from_secret: docker_username
volumes:
- name: docker
path: /var/run/docker.sock
when:
event:
- tag
instance:
- drone-publish.rancher.io
ref:
- refs/head/master
- refs/tags/*

- name: package-windows-images
image: rancher/dapper:v0.5.5
commands:
- docker pull --quiet rancher/hardened-build-base:v1.17.5b7
- dapper -f Dockerfile --target dapper make package-windows-images
when:
event:
- tag
instance:
- drone-publish.rancher.io
volumes:
- name: docker
path: /var/run/docker.sock

- name: publish-dist-artifacts
image: plugins/github-release
settings:
api_key:
from_secret: github_token
checksum:
- sha256
checksum_file: CHECKSUMsum-amd64.txt
checksum_flatten: true
files:
- dist/artifacts/*
prerelease: true
when:
event:
- tag
instance:
- drone-publish.rancher.io
ref:
- refs/head/master
- refs/tags/*

volumes:
- name: docker
host:
path: /var/run/docker.sock

---
kind: pipeline
type: docker
name: dispatch

platform:
os: linux
arch: amd64

steps:
- name: dispatch
image: rancher/dapper:v0.5.5
commands:
- dapper -f Dockerfile --target dapper make dispatch
environment:
PAT_TOKEN:
from_secret: github_token
PAT_USERNAME:
from_secret: pat_username
volumes:
- name: docker
path: /var/run/docker.sock
when:
event:
- tag
instance:
- drone-publish.rancher.io
ref:
- refs/head/master
- refs/tags/*

volumes:
- name: docker
host:
path: /var/run/docker.sock

depends_on:
- build-amd64
---
kind: pipeline
type: docker
name: build-s390x

platform:
Expand All @@ -215,6 +19,12 @@ steps:
volumes:
- name: docker
path: /var/run/docker.sock
when:
event:
- tag
ref:
- refs/head/master
- refs/tags/*

- name: package-images
image: rancher/dapper:v0.5.8
Expand All @@ -227,15 +37,13 @@ steps:
when:
event:
- tag
instance:
- drone-publish.rancher.io

- name: publish-image-runtime
image: rancher/hardened-build-base:v1.16.10b7
failure: ignore
commands:
- docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
- DRONE_TAG=${DRONE_TAG} make publish-image-runtime
- DRONE_TAG=${DRONE_TAG} REPO=${DOCKER_USERNAME} make publish-image-runtime
environment:
DOCKER_PASSWORD:
from_secret: docker_password
Expand All @@ -247,14 +55,12 @@ steps:
when:
event:
- tag
instance:
- drone-publish.rancher.io
ref:
- refs/head/master
- refs/tags/*

- name: publish-dist-artifacts
image: rancher/drone-images:github-release-s390x
image: luistt/github-release-s360x:test
failure: ignore
settings:
api_key:
Expand All @@ -269,42 +75,11 @@ steps:
when:
event:
- tag
instance:
- drone-publish.rancher.io
ref:
- refs/head/master
- refs/tags/*
volumes:
- name: docker
host:
path: /var/run/docker.sock

---
kind: pipeline
type: docker
name: manifest
platform:
os: linux
arch: amd64
steps:
- name: push-runtime-manifest
image: plugins/manifest
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
spec: manifest-runtime.tmpl
ignore_missing: true
when:
event:
- tag
instance:
- drone-publish.rancher.io
ref:
- refs/head/master
- refs/tags/*
depends_on:
- build-amd64
- build-s390x
...

0 comments on commit b687ec5

Please sign in to comment.