diff --git a/.drone.yml b/.drone.yml index c766886dc..b0897fffc 100644 --- a/.drone.yml +++ b/.drone.yml @@ -39,6 +39,51 @@ steps: - push - cron +- name: docker-publish-cluster-repo-branch + image: plugins/docker + settings: + context: dist/harvester-cluster-repo + custom_dns: 1.1.1.1 + dockerfile: dist/harvester-cluster-repo/Dockerfile + repo: "rancher/harvester-cluster-repo" + tag: ${DRONE_BRANCH}-head-amd64 + username: + from_secret: docker_username + password: + from_secret: docker_password + when: + instance: + - drone-publish.rancher.io + ref: + include: + - "refs/heads/master" + - "refs/heads/v*" + event: + - push + - cron + +- name: manifest-cluster-repo-branch + image: plugins/manifest + settings: + username: + from_secret: docker_username + password: + from_secret: docker_password + platforms: + - linux/amd64 + target: "rancher/harvester-cluster-repo:${DRONE_BRANCH}-head" + template: "rancher/harvester-cluster-repo:${DRONE_BRANCH}-head-ARCH" + when: + instance: + - drone-publish.rancher.io + ref: + include: + - "refs/heads/master" + - "refs/heads/v*" + event: + - push + - cron + volumes: - name: docker host: diff --git a/scripts/hack/patch-rancher-logging b/scripts/hack/patch-rancher-logging index d37740af1..93e7df35a 100755 --- a/scripts/hack/patch-rancher-logging +++ b/scripts/hack/patch-rancher-logging @@ -26,6 +26,7 @@ patch_rancher_logging_chart() # helm pack new helm package rancher-logging + rm -rf rancher-logging echo "finish patch ranch-logging chart" cd $cwd } diff --git a/scripts/package-harvester-repo b/scripts/package-harvester-repo index 1bb8781de..035cc4153 100755 --- a/scripts/package-harvester-repo +++ b/scripts/package-harvester-repo @@ -2,6 +2,7 @@ TOP_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." &> /dev/null && pwd )" SCRIPTS_DIR="${TOP_DIR}/scripts" +DIST_REPO_DIR="${TOP_DIR}/dist/harvester-cluster-repo" PACKAGE_HARVESTER_OS_DIR="${TOP_DIR}/package/harvester-os" PACKAGE_HARVESTER_REPO_DIR="${TOP_DIR}/package/harvester-repo" BUNDLE_DIR="${PACKAGE_HARVESTER_OS_DIR}/iso/bundle" @@ -13,6 +14,10 @@ mkdir -p ${IMAGES_LISTS_DIR} source ${SCRIPTS_DIR}/version source ${SCRIPTS_DIR}/lib/image +# for image publish in CI +rm -rf ${DIST_REPO_DIR} && mkdir -p ${DIST_REPO_DIR} +cp -r ${PACKAGE_HARVESTER_REPO_DIR}/* ${DIST_REPO_DIR} + cd ${PACKAGE_HARVESTER_REPO_DIR} CLUSTER_REPO_IMAGE=rancher/harvester-cluster-repo:${VERSION}