Skip to content

Commit

Permalink
dry run
Browse files Browse the repository at this point in the history
  • Loading branch information
kduret committed Oct 6, 2023
1 parent ee7c4ac commit 17a1824
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/actions/deb-delivery-legacy/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@ runs:
DISTRIB=$(echo $FILE | cut -d '_' -f2 | cut -d '-' -f2)
ARCH=$(echo $FILE | cut -d '_' -f3 | cut -d '.' -f1)
jf rt upload "$FILE" "apt-standard-${{ inputs.major_version }}-${{ inputs.stability }}/pool/${{ inputs.module_name }}/" --deb "${{ inputs.distrib }}/main/$ARCH"
jf rt upload --dry-run "$FILE" "apt-standard-${{ inputs.major_version }}-${{ inputs.stability }}/pool/${{ inputs.module_name }}/" --deb "${{ inputs.distrib }}/main/$ARCH"
done
shell: bash
2 changes: 1 addition & 1 deletion .github/actions/deb-delivery/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ runs:
DISTRIB=$(echo $FILE | cut -d '_' -f2 | cut -d '-' -f2)
ARCH=$(echo $FILE | cut -d '_' -f3 | cut -d '.' -f1)
jf rt upload "$FILE" "apt-plugins-${{ inputs.stability }}/pool/${{ inputs.module_name }}/" --deb "${{ inputs.distrib }}/main/$ARCH"
jf rt upload --dry-run "$FILE" "apt-plugins-${{ inputs.stability }}/pool/${{ inputs.module_name }}/" --deb "${{ inputs.distrib }}/main/$ARCH"
done
shell: bash
18 changes: 9 additions & 9 deletions .github/actions/release-sources/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ runs:
sudo ./aws/install
shell: bash

- run: |
SRC_FILE="${{ inputs.module_name }}-${{ inputs.version }}.tar.gz"
# - run: |
# SRC_FILE="${{ inputs.module_name }}-${{ inputs.version }}.tar.gz"

mv "${{ inputs.module_directory }}" "${{ inputs.module_name }}-${{ inputs.version }}"
tar czf $SRC_FILE "${{ inputs.module_name }}-${{ inputs.version }}"
# mv "${{ inputs.module_directory }}" "${{ inputs.module_name }}-${{ inputs.version }}"
# tar czf $SRC_FILE "${{ inputs.module_name }}-${{ inputs.version }}"

SRC_HASH=$(md5sum $SRC_FILE | cut -d ' ' -f 1)
SRC_SIZE=$(stat -c '%s' $SRC_FILE)
# SRC_HASH=$(md5sum $SRC_FILE | cut -d ' ' -f 1)
# SRC_SIZE=$(stat -c '%s' $SRC_FILE)

aws s3 cp --acl public-read "$SRC_FILE" "s3://centreon-download/public/${{ inputs.bucket_directory }}/$SRC_FILE"
curl --fail "https://download.centreon.com/api/?token=${{ inputs.token_download_centreon_com }}&product=${{ inputs.module_name }}&release=${{ inputs.release }}&version=${{ inputs.version }}&extension=tar.gz&md5=$SRC_HASH&size=$SRC_SIZE&ddos=0&dryrun=0"
shell: bash
# aws s3 cp --acl public-read "$SRC_FILE" "s3://centreon-download/public/${{ inputs.bucket_directory }}/$SRC_FILE"
# curl --fail "https://download.centreon.com/api/?token=${{ inputs.token_download_centreon_com }}&product=${{ inputs.module_name }}&release=${{ inputs.release }}&version=${{ inputs.version }}&extension=tar.gz&md5=$SRC_HASH&size=$SRC_SIZE&ddos=0&dryrun=0"
# shell: bash
4 changes: 2 additions & 2 deletions .github/actions/rpm-delivery-legacy/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ runs:
for ARCH in "noarch" "x86_64"; do
if [ "$(ls -A $ARCH)" ]; then
if [ "${{ inputs.stability }}" == "stable" ]; then
jf rt upload "$ARCH/*.rpm" "rpm-standard/${{ inputs.major_version }}/${{ inputs.distrib }}/${{ inputs.stability }}/$ARCH/RPMS/${{ inputs.module_name }}/" --flat
jf rt upload --dry-run "$ARCH/*.rpm" "rpm-standard/${{ inputs.major_version }}/${{ inputs.distrib }}/${{ inputs.stability }}/$ARCH/RPMS/${{ inputs.module_name }}/" --flat
else
jf rt upload "$ARCH/*.rpm" "rpm-standard/${{ inputs.major_version }}/${{ inputs.distrib }}/${{ inputs.stability }}/$ARCH/${{ inputs.module_name }}/" --flat
jf rt upload --dry-run "$ARCH/*.rpm" "rpm-standard/${{ inputs.major_version }}/${{ inputs.distrib }}/${{ inputs.stability }}/$ARCH/${{ inputs.module_name }}/" --flat
fi
fi
done
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/rpm-delivery/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ runs:
for ARCH in "noarch" "x86_64"; do
if [ "$(ls -A $ARCH)" ]; then
if [ "${{ inputs.stability }}" == "stable" ]; then
jf rt upload "$ARCH/*.rpm" "rpm-plugins/${{ inputs.distrib }}/${{ inputs.stability }}/$ARCH/RPMS/${{ inputs.module_name }}/" --flat
jf rt --dry-run upload "$ARCH/*.rpm" "rpm-plugins/${{ inputs.distrib }}/${{ inputs.stability }}/$ARCH/RPMS/${{ inputs.module_name }}/" --flat
else
jf rt upload "$ARCH/*.rpm" "rpm-plugins/${{ inputs.distrib }}/${{ inputs.stability }}/$ARCH/${{ inputs.module_name }}/" --flat
jf rt --dry-run upload "$ARCH/*.rpm" "rpm-plugins/${{ inputs.distrib }}/${{ inputs.stability }}/$ARCH/${{ inputs.module_name }}/" --flat
fi
fi
done
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/get-environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
STABILITY="stable"
;;
*)
STABILITY="canary"
STABILITY="unstable"
;;
esac
Expand Down

0 comments on commit 17a1824

Please sign in to comment.