harbor/.drone.yml

108 lines
2.7 KiB
YAML

# Harbor drone.
---
workspace:
base: /drone
path: src/github.com/vmware/harbor
pipeline:
clone:
image: plugins/git
tags: true
recursive: false
integration-test-on-pr:
image: vmware/harbor-e2e-engine:1.37
pull: true
privileged: true
environment:
BIN: bin
GOPATH: /drone
SHELL: /bin/bash
LOG_TEMP_DIR: install-logs
GITHUB_AUTOMATION_API_KEY: ${GITHUB_AUTOMATION_API_KEY}
DRONE_SERVER: ${DRONE_SERVER}
DRONE_TOKEN: ${DRONE_TOKEN_INTE}
HARBOR_ADMIN: ${HARBOR_ADMIN}
HARBOR_PASSWORD: ${HARBOR_PASSWORD}
GS_PROJECT_ID: ${GS_PROJECT_ID}
GS_CLIENT_EMAIL: ${GS_CLIENT_EMAIL}
GS_PRIVATE_KEY: ${GS_PRIVATE_KEY}
DOMAIN: ${CI_DOMAIN}
MAIL_PWD: ${MAIL_PWD}
commands:
- tests/integration.sh
when:
status: success
bundle:
image: vmware/harbor-e2e-engine:1.37
pull: true
privileged: true
environment:
BIN: bin
GOPATH: /drone
SHELL: /bin/bash
BUILD_NUMBER: ${DRONE_BUILD_NUMBER}
commands:
- du -ks harbor-offline-installer-*.tgz | awk '{print $1 / 1024}' | { read x; echo $x MB; }
- mkdir -p bundle
- cp harbor-offline-installer-*.tgz bundle
- ls -la bundle
when:
repo: vmware/harbor
event: [ push, tag ]
branch: [ master, release-*, refs/tags/* ]
status: success
notify-slack:
image: plugins/slack
webhook: ${SLACK_URL}
username: drone
template: >
build https://ci.vcna.io/vmware/harbor/{{ build.number }} finished with a {{ build.status }} status. Please find logs at https://storage.googleapis.com/harbor-ci-logs/integration_logs_{{ build.number }}_{{ build.commit }}.tar.gz
when:
repo: vmware/harbor
branch: [ master, release-*, refs/tags/* ]
status: [ failure, success ]
publish-gcs-builds:
image: maplain/drone-gcs:latest
pull: true
source: bundle
target: harbor-builds
acl:
- allUsers:READER
cache_control: public,max-age=3600
when:
repo: vmware/harbor
event: [ push, tag ]
branch: [ master, release-* ]
status: success
publish-gcs-releases:
image: maplain/drone-gcs:latest
pull: true
source: bundle
target: harbor-releases
acl:
- allUsers:READER
cache_control: public,max-age=3600
when:
repo: vmware/harbor
event: [ push, tag ]
branch: [ release-*, refs/tags/* ]
status: success
trigger:
image: plugins/downstream
server: https://ci.vcna.io
token: ${DOWNSTREAM_TOKEN}
fork: true
repositories:
- vmware/vic-product
when:
repo: vmware/harbor
event: [ push, tag ]
branch: [ master, release-*, refs/tags/* ]
status: success