mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-17 15:55:26 +01:00
129 lines
3.5 KiB
YAML
129 lines
3.5 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.38
|
|
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}
|
|
NPM_USERNAME: ${NPM_USERNAME}
|
|
NPM_PASSWORD: ${NPM_PASSWORD}
|
|
commands:
|
|
- tests/integration.sh
|
|
when:
|
|
status: success
|
|
|
|
bundle:
|
|
image: vmware/harbor-e2e-engine:1.38
|
|
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
|
|
- mkdir -p pks-bundle
|
|
- echo $(git describe --tags) > pks-bundle/version
|
|
- cp harbor-offline-installer-*.tgz bundle
|
|
- if [ ${DRONE_BRANCH} = "master" ]; then cp harbor-offline-installer-*.tgz pks-bundle/harbor-offline-installer-latest-master.tgz; fi
|
|
- if ( echo ${DRONE_BRANCH} | grep "pks*" ); then cp harbor-offline-installer-*.tgz pks-bundle/harbor-offline-installer-latest-pks.tgz; fi
|
|
- ls -la bundle
|
|
- ls -la pks-bundle
|
|
when:
|
|
repo: vmware/harbor
|
|
event: [ push, tag ]
|
|
branch: [ master, release-*, pks-*, 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
|
|
|
|
publish-gcs-pks-builds:
|
|
image: maplain/drone-gcs:latest
|
|
pull: true
|
|
source: pks-bundle
|
|
target: harbor-ci-pipeline-store/latest
|
|
acl:
|
|
- allUsers:READER
|
|
cache_control: public,max-age=3600
|
|
when:
|
|
repo: vmware/harbor
|
|
event: [ push, tag ]
|
|
branch: [ master, pks-*, 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
|