summaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorAustin S. Hemmelgarn <austin@netdata.cloud>2022-06-30 14:10:02 +0300
committerGitHub <noreply@github.com>2022-06-30 07:10:02 -0400
commitb2e3d3e99f8679440864e9f99a1e0a843cfae126 (patch)
treeab41cf477f2ff7a0307cc8d0f16177341a45b4f6 /.github
parentab58cc58863d9c060c928ff12c6834da50d229ae (diff)
Assorted cleanups for new package infrastructure upload support. (#13270)
* Ignore failures to upload packages to new infra. We will switch to requiring success when we move to the new infra as the primary. * Change package upload target. Needed to properly support handling of package repository metadata. * Upload repoconfig packages to new infra.
Diffstat (limited to '.github')
-rwxr-xr-x.github/scripts/package-upload.sh2
-rw-r--r--.github/workflows/packaging.yml32
-rw-r--r--.github/workflows/repoconfig-packages.yml33
3 files changed, 50 insertions, 17 deletions
diff --git a/.github/scripts/package-upload.sh b/.github/scripts/package-upload.sh
index e07e78f0e7..fd8a8cda24 100755
--- a/.github/scripts/package-upload.sh
+++ b/.github/scripts/package-upload.sh
@@ -11,7 +11,7 @@ format="${3}"
repo="${4}"
staging="${TMPDIR:-/tmp}/package-staging"
-prefix="/var/www/html/repos/${repo}/"
+prefix="/home/netdatabot/incoming/${repo}/"
packages="$(find artifacts -name "*.${format}")"
diff --git a/.github/workflows/packaging.yml b/.github/workflows/packaging.yml
index 1ce8a69497..ce65c6f7de 100644
--- a/.github/workflows/packaging.yml
+++ b/.github/workflows/packaging.yml
@@ -214,22 +214,10 @@ jobs:
-e VERSION=${{ needs.version-check.outputs.version }} -e DISTRO_VERSION=${{ matrix.version }} \
--platform=${{ matrix.platform }} -v "$PWD":/netdata ${{ matrix.base_image }}:${{ matrix.version }} \
/netdata/.github/scripts/pkg-test.sh
- - name: Upload to PackageCloud
- id: upload
- if: github.event_name == 'workflow_dispatch'
- shell: bash
- env:
- PKG_CLOUD_TOKEN: ${{ secrets.PACKAGE_CLOUD_API_KEY }}
- run: |
- printf "Packages to upload:\n%s" "$(ls artifacts/*.${{ matrix.format }})"
- for pkgfile in artifacts/*.${{ matrix.format }} ; do
- .github/scripts/package_cloud_wrapper.sh yank ${{ needs.version-check.outputs.repo }}/${{ matrix.repo_distro }} \
- "$(basename "${pkgfile}")" || true
- .github/scripts/package_cloud_wrapper.sh push ${{ needs.version-check.outputs.repo }}/${{ matrix.repo_distro }} "${pkgfile}"
- done
- name: SSH setup
id: ssh-setup
if: github.event_name == 'workflow_dispatch'
+ continue-on-error: true
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.NETDATABOT_PACKAGES_SSH_KEY }}
@@ -237,6 +225,7 @@ jobs:
known_hosts: ${{ secrets.PACKAGES_KNOWN_HOSTS }}
- name: Upload to packages.netdata.cloud
id: package-upload
+ continue-on-error: true
if: github.event_name == 'workflow_dispatch'
run: |
.github/scripts/package-upload.sh \
@@ -244,6 +233,19 @@ jobs:
${{ matrix.arch }} \
${{ matrix.format }} \
${{ needs.version-check.outputs.repo }}
+ - name: Upload to PackageCloud
+ id: upload
+ if: github.event_name == 'workflow_dispatch'
+ shell: bash
+ env:
+ PKG_CLOUD_TOKEN: ${{ secrets.PACKAGE_CLOUD_API_KEY }}
+ run: |
+ printf "Packages to upload:\n%s" "$(ls artifacts/*.${{ matrix.format }})"
+ for pkgfile in artifacts/*.${{ matrix.format }} ; do
+ .github/scripts/package_cloud_wrapper.sh yank ${{ needs.version-check.outputs.repo }}/${{ matrix.repo_distro }} \
+ "$(basename "${pkgfile}")" || true
+ .github/scripts/package_cloud_wrapper.sh push ${{ needs.version-check.outputs.repo }}/${{ matrix.repo_distro }} "${pkgfile}"
+ done
- name: Failure Notification
uses: rtCamp/action-slack-notify@v2
env:
@@ -259,9 +261,9 @@ jobs:
Fetch images: ${{ steps.fetch-images.outcome }}
Build: ${{ steps.build.outcome }}
Test: ${{ steps.test.outcome }}
- Publish: ${{ steps.upload.outcome }}
Import SSH Key: ${{ steps.ssh-setup.outcome }}
- Publish: ${{ steps.package-upload.outcome }}
+ Publish to packages.netdata.cloud: ${{ steps.package-upload.outcome }}
+ Publish to PackageCloud: ${{ steps.upload.outcome }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
if: >-
${{
diff --git a/.github/workflows/repoconfig-packages.yml b/.github/workflows/repoconfig-packages.yml
index 4d0e75c48b..4afbc84e11 100644
--- a/.github/workflows/repoconfig-packages.yml
+++ b/.github/workflows/repoconfig-packages.yml
@@ -112,6 +112,35 @@ jobs:
docker run --security-opt seccomp=unconfined -e DISABLE_TELEMETRY=1 --platform ${{ matrix.platform }} \
-v "$PWD":/netdata ${{ matrix.base_image }}:${{ matrix.version }} \
/netdata/packaging/repoconfig/build-${{ matrix.format }}.sh
+ - name: SSH setup
+ id: ssh-setup
+ if: github.event_name == 'workflow_dispatch'
+ continue-on-error: true
+ uses: shimataro/ssh-key-action@v2
+ with:
+ key: ${{ secrets.NETDATABOT_PACKAGES_SSH_KEY }}
+ name: id_ecdsa
+ known_hosts: ${{ secrets.PACKAGES_KNOWN_HOSTS }}
+ - name: Upload to packages.netdata.cloud
+ id: package-upload
+ continue-on-error: true
+ if: github.event_name == 'workflow_dispatch'
+ run: |
+ .github/scripts/package-upload.sh \
+ ${{ matrix.repo_distro }} \
+ ${{ matrix.arch }} \
+ ${{ matrix.format }} \
+ netdata/netdata
+ .github/scripts/package-upload.sh \
+ ${{ matrix.repo_distro }} \
+ ${{ matrix.arch }} \
+ ${{ matrix.format }} \
+ netdata/netdata-edge
+ .github/scripts/package-upload.sh \
+ ${{ matrix.repo_distro }} \
+ ${{ matrix.arch }} \
+ ${{ matrix.format }} \
+ netdata/netdata-repoconfig
- name: Upload Packages
id: publish
if: github.event_name != 'pull_request' && github.repository == 'netdata/netdata'
@@ -145,5 +174,7 @@ jobs:
Checkout: ${{ steps.checkout.outcome }}
Fetch images: ${{ steps.fetch-images.outcome }}
Build: ${{ steps.build.outcome }}
- Publish: ${{ steps.publish.outcome }}
+ Import SSH Key: ${{ steps.ssh-setup.outcome }}
+ Publish to packages.netdata.cloud: ${{ steps.package-upload.outcome }}
+ Publish to PackageCloud: ${{ steps.publish.outcome }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}