From 363afa2112f239ffdf444e8e7c1103e12745e686 Mon Sep 17 00:00:00 2001 From: Jason-ZW Date: Thu, 10 Sep 2020 15:30:39 +0800 Subject: [PATCH] fix(autok3s): add missing binary Signed-off-by: Jason-ZW --- .drone.yml | 57 ++++++++++++++++++++++++++++++++++++-- .gitignore | 1 + hack/make-rules/autok3s.sh | 5 ++-- 3 files changed, 58 insertions(+), 5 deletions(-) diff --git a/.drone.yml b/.drone.yml index 3ec3dc3d..f042c82f 100644 --- a/.drone.yml +++ b/.drone.yml @@ -78,6 +78,23 @@ steps: volumes: - name: docker path: /var/run/docker.sock + - name: github_binary_release + image: ibuildthecloud/github-release:v0.0.1 + settings: + api_key: + from_secret: github_token + prerelease: true + checksum: + - sha256 + checksum_file: CHECKSUMsum-amd64.txt + checksum_flatten: true + files: + - "dist/autok3s_*" + when: + event: + - tag + depends_on: + - build - name: package image: maiwj/drone-dapper:v0.4.2 environment: @@ -136,6 +153,23 @@ steps: volumes: - name: docker path: /var/run/docker.sock + - name: github_binary_release + image: ibuildthecloud/github-release:v0.0.1 + settings: + api_key: + from_secret: github_token + prerelease: true + checksum: + - sha256 + checksum_file: CHECKSUMsum-arm64.txt + checksum_flatten: true + files: + - "dist/autok3s_*" + when: + event: + - tag + depends_on: + - build - name: package image: maiwj/drone-dapper:v0.4.2 environment: @@ -195,6 +229,23 @@ steps: volumes: - name: docker path: /var/run/docker.sock + - name: github_binary_release + image: ibuildthecloud/github-release:v0.0.1 + settings: + api_key: + from_secret: github_token + prerelease: true + checksum: + - sha256 + checksum_file: CHECKSUMsum-arm.txt + checksum_flatten: true + files: + - "dist/autok3s_*" + when: + event: + - tag + depends_on: + - build - name: package image: maiwj/drone-dapper:v0.4.2 environment: @@ -267,13 +318,13 @@ steps: - name: release-note path: /release-note - name: release - image: maiwj/drone-releaser:v0.1.0 + image: plugins/github-release settings: api_key: from_secret: github_token - files: - - "dist/autok3s_*.yaml" prerelease: true + overwrite: true + note: /release-note/CHANGELOG.md volumes: - name: release-note path: /release-note diff --git a/.gitignore b/.gitignore index 1f954ee6..82243071 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,7 @@ # Compile the resulting file dist/ bin/ +sha256sum* main ## Dapper temporary files diff --git a/hack/make-rules/autok3s.sh b/hack/make-rules/autok3s.sh index 095e666a..dc17fc3d 100755 --- a/hack/make-rules/autok3s.sh +++ b/hack/make-rules/autok3s.sh @@ -91,6 +91,7 @@ function build() { -ldflags "${version_flags} ${flags} ${ext_flags}" \ -o "${CURR_DIR}/bin/autok3s_${os}_${arch}" \ "${CURR_DIR}/main.go" + cp -f "${CURR_DIR}/bin/autok3s_${os}_${arch}" "${CURR_DIR}/dist/autok3s_${os}_${arch}" done autok3s::log::info "...done" @@ -100,7 +101,7 @@ function package() { [[ "${1:-}" != "only" ]] && build autok3s::log::info "packaging autok3s..." - local repo=${REPO:-zhenyangzhao} + local repo=${REPO:-cnrancher} local image_name=${IMAGE_NAME:-autok3s} local tag=${TAG:-${GIT_VERSION}} @@ -135,7 +136,7 @@ function deploy() { [[ "${1:-}" != "only" ]] && package autok3s::log::info "deploying autok3s..." - local repo=${REPO:-zhenyangzhao} + local repo=${REPO:-cnrancher} local image_name=${IMAGE_NAME:-autok3s} local tag=${TAG:-${GIT_VERSION}}