Skip to content

Commit

Permalink
Publish harvester-cluster-repo image
Browse files Browse the repository at this point in the history
Signed-off-by: Kiefer Chang <kiefer.chang@suse.com>
  • Loading branch information
bk201 committed Jul 12, 2023
1 parent f2f0cd4 commit 4ac9edd
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,49 @@ 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
branch:
- master
- 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
branch:
- master
- v*
event:
- push
- cron

volumes:
- name: docker
host:
Expand Down
5 changes: 5 additions & 0 deletions scripts/package-harvester-repo
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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}
Expand Down

0 comments on commit 4ac9edd

Please sign in to comment.