mirror of
https://github.com/goharbor/harbor.git
synced 2024-08-28 14:59:37 +02:00
128 lines
3.4 KiB
YAML
128 lines
3.4 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 latest
|
|
- echo $(git describe --tags) > latest/version
|
|
- cp harbor-offline-installer-*.tgz bundle
|
|
- if [ ${DRONE_BRANCH} = "master" ]; then cp harbor-offline-installer-*.tgz latest/harbor-offline-installer-latest-master.tgz; else cp harbor-offline-installer-*.tgz latest/harbor-offline-installer-latest-release.tgz; fi
|
|
- ls -la bundle
|
|
- ls -la latest
|
|
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
|
|
|
|
publish-gcs-latest:
|
|
image: maplain/drone-gcs:latest
|
|
pull: true
|
|
source: latest
|
|
target: harbor-ci-pipeline-store/latest
|
|
acl:
|
|
- allUsers:READER
|
|
cache_control: public,max-age=3600
|
|
when:
|
|
repo: vmware/harbor
|
|
event: [ push, tag ]
|
|
branch: [ master, 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
|