Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish harvester-cluster-repo image (backport #496) #581

Merged
merged 2 commits into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions scripts/hack/patch-rancher-logging
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
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