2017-08-07 08:02:38 +02:00
|
|
|
# Harbor drone.
|
|
|
|
---
|
|
|
|
workspace:
|
|
|
|
base: /drone
|
|
|
|
path: src/github.com/vmware/harbor
|
|
|
|
|
|
|
|
pipeline:
|
|
|
|
clone:
|
|
|
|
image: plugins/git
|
|
|
|
tags: true
|
|
|
|
recursive: false
|
|
|
|
|
|
|
|
integration-test-on-pr:
|
2017-10-30 07:55:03 +01:00
|
|
|
image: vmware/harbor-e2e-engine:1.38
|
2017-08-07 08:02:38 +02:00
|
|
|
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}
|
2017-11-22 13:01:00 +01:00
|
|
|
NPM_USERNAME: ${NPM_USERNAME}
|
|
|
|
NPM_PASSWORD: ${NPM_PASSWORD}
|
2017-08-07 08:02:38 +02:00
|
|
|
commands:
|
|
|
|
- tests/integration.sh
|
|
|
|
when:
|
|
|
|
status: success
|
|
|
|
|
|
|
|
bundle:
|
2017-10-30 07:55:03 +01:00
|
|
|
image: vmware/harbor-e2e-engine:1.38
|
2017-08-07 08:02:38 +02:00
|
|
|
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
|
2017-11-22 07:16:18 +01:00
|
|
|
- mkdir -p latest
|
|
|
|
- echo $(git describe --tags) > version
|
2017-08-07 08:02:38 +02:00
|
|
|
- cp harbor-offline-installer-*.tgz bundle
|
2017-11-22 07:16:18 +01:00
|
|
|
- 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
|
2017-08-07 08:02:38 +02:00
|
|
|
- ls -la bundle
|
2017-11-22 07:16:18 +01:00
|
|
|
- ls -la latest
|
2017-08-07 08:02:38 +02:00
|
|
|
when:
|
|
|
|
repo: vmware/harbor
|
|
|
|
event: [ push, tag ]
|
2017-09-04 09:57:49 +02:00
|
|
|
branch: [ master, release-*, refs/tags/* ]
|
2017-08-07 08:02:38 +02:00
|
|
|
status: success
|
|
|
|
|
|
|
|
notify-slack:
|
|
|
|
image: plugins/slack
|
|
|
|
webhook: ${SLACK_URL}
|
|
|
|
username: drone
|
|
|
|
template: >
|
2017-09-05 07:12:23 +02:00
|
|
|
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
|
2017-08-07 08:02:38 +02:00
|
|
|
when:
|
|
|
|
repo: vmware/harbor
|
2017-09-04 09:57:49 +02:00
|
|
|
branch: [ master, release-*, refs/tags/* ]
|
|
|
|
status: [ failure, success ]
|
2017-08-07 08:02:38 +02:00
|
|
|
|
|
|
|
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 ]
|
2017-09-04 09:57:49 +02:00
|
|
|
branch: [ master, release-* ]
|
2017-08-07 08:02:38 +02:00
|
|
|
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 ]
|
2017-09-04 09:57:49 +02:00
|
|
|
branch: [ release-*, refs/tags/* ]
|
2017-08-07 08:02:38 +02:00
|
|
|
status: success
|
|
|
|
|
2017-11-22 07:16:18 +01:00
|
|
|
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
|
|
|
|
|
2017-08-07 08:02:38 +02:00
|
|
|
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 ]
|
2017-09-04 09:57:49 +02:00
|
|
|
branch: [ master, release-*, refs/tags/* ]
|
2017-08-07 08:02:38 +02:00
|
|
|
status: success
|