Skip to content

Commit 9e1dea7

Browse files
soulbirdsoulbird
andauthored
chore: upload deb package to artifacts only (#226)
Co-authored-by: soulbird <[email protected]>
1 parent 578c20a commit 9e1dea7

File tree

2 files changed

+6
-72
lines changed

2 files changed

+6
-72
lines changed

.circleci/config.yml

Lines changed: 4 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,6 @@
11
# Use the latest 2.1 version of CircleCI pipeline process engine.
22
# See: https://circleci.com/docs/2.0/configuration-reference
33
version: 2.1
4-
commands:
5-
description: publish deb package
6-
publish_package:
7-
steps:
8-
- run:
9-
name: backup dists to ci bucket
10-
command: |
11-
sudo -E ./utils/publish-deb.sh dists_backup
12-
- run:
13-
name: download pool dir to local
14-
command: |
15-
sudo -E ./utils/publish-deb.sh repo_clone
16-
- run:
17-
name: rebuild deb repo
18-
command: |
19-
sudo -E ./utils/publish-deb.sh repo_rebuild
20-
- run:
21-
name: upload repo
22-
command: |
23-
sudo -E ./utils/publish-deb.sh repo_upload
24-
- run:
25-
name: pulish repo
26-
command: |
27-
sudo -E ./utils/publish-deb.sh repo_publish
28-
sudo -E ./utils/publish-deb.sh repo_backup_remove
294
# Define a job to be invoked later in a workflow.
305
# See: https://circleci.com/docs/2.0/configuration-reference/#jobs
316
jobs:
@@ -152,13 +127,6 @@ jobs:
152127
command: |
153128
mkdir -p "${VAR_DEB_WORKBENCH_DIR}"
154129
sudo apt-get update
155-
sudo apt install -y gpg ca-certificates
156-
DEB_GPG_PRIV_KEY=$(echo $DEB_GPG_PRIV_KEY_BASE64 | base64 -d)
157-
echo "${DEB_GPG_PRIV_KEY}" >> /tmp/deb-gpg-publish.private
158-
echo "${DEB_GPG_PASSPHRASE}" >> /tmp/deb-gpg-publish.passphrase
159-
./utils/publish-deb.sh init_cos_utils
160-
sudo -E ./utils/publish-deb.sh init_freight_utils
161-
sudo -E ./utils/publish-deb.sh init_gpg
162130
163131
- when:
164132
condition:
@@ -174,7 +142,8 @@ jobs:
174142
make package type=deb app=apisix openresty=apisix-base checkout=${APISIX_TAG_VERSION} version=${APISIX_TAG_VERSION} image_base=${VAR_OS} image_tag=${VAR_OS_RELEASE}
175143
mv ./output/apisix_${APISIX_TAG_VERSION}-0~${VAR_OS}${VAR_OS_RELEASE}_arm64.deb ${VAR_DEB_WORKBENCH_DIR}
176144
177-
- publish_package
145+
- store_artifacts:
146+
path: /tmp/output
178147

179148
- when:
180149
condition:
@@ -188,7 +157,8 @@ jobs:
188157
make package type=deb app=apisix-base checkout=${APISIX_BASE_TAG_VERSION} version=${APISIX_BASE_TAG_VERSION} image_base=${VAR_OS} image_tag=${VAR_OS_RELEASE}
189158
mv ./output/apisix-base_${APISIX_BASE_TAG_VERSION}-0~${VAR_OS}${VAR_OS_RELEASE}_arm64.deb ${VAR_DEB_WORKBENCH_DIR}
190159
191-
- publish_package
160+
- store_artifacts:
161+
path: /tmp/output
192162

193163
# Invoke jobs via workflows
194164
# See: https://circleci.com/docs/2.0/configuration-reference/#workflows

.github/workflows/publish-deb.yml

Lines changed: 2 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ jobs:
99
runs-on: ubuntu-18.04
1010
timeout-minutes: 60
1111
env:
12-
VAR_COS_BUCKET_CI: ${{ secrets.VAR_COS_BUCKET_CI }}
13-
VAR_COS_BUCKET_REPO: ${{ secrets.VAR_COS_BUCKET_REPO }}
14-
VAR_COS_ENDPOINT: ${{ secrets.VAR_COS_ENDPOINT }}
1512
VAR_DEB_WORKBENCH_DIR: /tmp/output
1613
VAR_OS: debian
1714
VAR_CODENAME: bullseye
@@ -26,7 +23,6 @@ jobs:
2623
- name: Init basic publish env
2724
run: |
2825
sudo apt-get update
29-
sudo apt install -y gpg ca-certificates
3026
mkdir -p "${VAR_DEB_WORKBENCH_DIR}"
3127
3228
- name: Extract Tags name
@@ -67,45 +63,13 @@ jobs:
6763
if: ${{ startsWith(steps.tag_type.outputs.version, 'apisix/') }}
6864
uses: actions/[email protected]
6965
with:
70-
name: "apisix_${{ steps.tag_env.outputs.version}}-0~${{ VAR_OS }}${{ VAR_OS_RELEASE }}_amd64.deb"
66+
name: "apisix_${{ steps.tag_env.outputs.version}}-0~${{ env.VAR_OS }}${{ env.VAR_OS_RELEASE }}_amd64.deb"
7167
path: "${{ env.VAR_DEB_WORKBENCH_DIR }}/apisix_${{ steps.tag_env.outputs.version}}-0~${{ env.VAR_OS }}${{ env.VAR_OS_RELEASE }}_amd64.deb"
7268

7369
- name: Upload apisix-base Artifact
7470
if: ${{ startsWith(steps.tag_type.outputs.version, 'apisix-base/') }}
7571
uses: actions/[email protected]
7672
with:
77-
name: "apisix-base_${{ steps.tag_env.outputs.version}}-0~${{ VAR_OS }}${{ VAR_OS_RELEASE }}_amd64.deb"
73+
name: "apisix-base_${{ steps.tag_env.outputs.version}}-0~${{ env.VAR_OS }}${{ env.VAR_OS_RELEASE }}_amd64.deb"
7874
path: "${{ env.VAR_DEB_WORKBENCH_DIR }}/apisix-base_${{ steps.tag_env.outputs.version}}-0~${{ env.VAR_OS }}${{ env.VAR_OS_RELEASE }}_amd64.deb"
7975

80-
- name: Init publish utils
81-
env:
82-
DEB_GPG_MAIL: ${{ secrets.DEB_GPG_MAIL }}
83-
TENCENT_COS_SECRETID: ${{ secrets.TENCENT_COS_SECRETID }}
84-
TENCENT_COS_SECRETKEY: ${{ secrets.TENCENT_COS_SECRETKEY }}
85-
run: |
86-
echo "${{ secrets.DEB_GPG_PRIV_KEY }}" >> /tmp/deb-gpg-publish.private
87-
echo "${{ secrets.DEB_GPG_PASSPHRASE }}" >> /tmp/deb-gpg-publish.passphrase
88-
./utils/publish-deb.sh init_cos_utils
89-
sudo -E ./utils/publish-deb.sh init_freight_utils
90-
sudo -E ./utils/publish-deb.sh init_gpg
91-
92-
- name: backup dists to ci bucket
93-
run:
94-
sudo -E ./utils/publish-deb.sh dists_backup
95-
96-
- name: download pool dir to local
97-
run:
98-
sudo -E ./utils/publish-deb.sh repo_clone
99-
100-
- name: rebuild deb repo
101-
run:
102-
sudo -E ./utils/publish-deb.sh repo_rebuild
103-
104-
- name: upload repo
105-
run:
106-
sudo -E ./utils/publish-deb.sh repo_upload
107-
108-
- name: pulish repo
109-
run:
110-
sudo -E ./utils/publish-deb.sh repo_publish
111-
sudo -E ./utils/publish-deb.sh repo_backup_remove

0 commit comments

Comments
 (0)