chore(ci): upload to artifactory connectors repository (#4239)
Refs: MON-16173
This commit is contained in:
parent
bdb0c55c06
commit
8fcabfc2c2
|
@ -35,7 +35,17 @@ runs:
|
|||
path: ./*.deb
|
||||
key: ${{ inputs.cache_key }}
|
||||
|
||||
- name: Publish DEBS to Nexus
|
||||
- uses: jfrog/setup-jfrog-cli@v3
|
||||
env:
|
||||
JF_URL: https://centreon.jfrog.io
|
||||
JF_ACCESS_TOKEN: ${{ inputs.artifactory_token }}
|
||||
|
||||
- name: Publish DEBs to artifactory
|
||||
run: |
|
||||
jf rt upload "*.deb" "apt-connectors-${{ inputs.stability }}/pool/" --deb "${{ inputs.distrib }}/main/all"
|
||||
shell: bash
|
||||
|
||||
- name: Publish DEBs to Nexus
|
||||
run: |
|
||||
for MAJOR in "22.04" "22.10"; do
|
||||
echo "Delivering to $MAJOR ${{ inputs.stability }}"
|
||||
|
@ -46,6 +56,5 @@ runs:
|
|||
fi
|
||||
|
||||
find -name "*.deb" -print0 | xargs -0 -t -I % -P 2 curl --fail -v -u "${{ inputs.nexus_username }}":"${{ inputs.nexus_password }}" -H "Content-Type: multipart/form-data" --data-binary "@%" https://apt.centreon.com/repository/$MAJOR$FOLDER_SUFFIX/
|
||||
find -name "*.deb" -print0 | xargs -0 -t -I % -P 2 curl --fail -v -H "Authorization: Bearer ${{ inputs.artifactory_token }}" -X PUT "https://centreon.jfrog.io/artifactory/apt-$MAJOR-${{ inputs.stability }}/pool/%;deb.distribution=${{ inputs.distrib }};deb.component=main;deb.architecture=all" -T "%"
|
||||
done
|
||||
shell: bash
|
||||
|
|
|
@ -44,6 +44,16 @@ runs:
|
|||
path: ./*.rpm
|
||||
key: ${{ inputs.cache_key }}
|
||||
|
||||
- uses: jfrog/setup-jfrog-cli@v3
|
||||
env:
|
||||
JF_URL: https://centreon.jfrog.io
|
||||
JF_ACCESS_TOKEN: ${{ inputs.artifactory_token }}
|
||||
|
||||
- name: Publish RPMs to connectors repository
|
||||
run: |
|
||||
jf rt upload "*.rpm" "rpm-connectors/${{ inputs.distrib }}/${{ inputs.stability }}/noarch/"
|
||||
shell: bash
|
||||
|
||||
- name: Setup awscli
|
||||
run: |
|
||||
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
|
||||
|
@ -51,7 +61,7 @@ runs:
|
|||
sudo ./aws/install
|
||||
shell: bash
|
||||
|
||||
- name: Publish RPMS
|
||||
- name: Publish RPMs to standard repositories
|
||||
run: |
|
||||
FILES="*.rpm"
|
||||
|
||||
|
@ -71,18 +81,12 @@ runs:
|
|||
|
||||
if [ "$REPOTYPE" == "stable" ]; then
|
||||
TARGET="/srv/centreon-yum/yum.centreon.com/$PROJECT_PATH/$MAJOR/$DISTRIB/$REPOTYPE/$ARCH/RPMS"
|
||||
ARTIFACTORY_TARGET="https://centreon.jfrog.io/artifactory/rpm/$PROJECT_PATH/$MAJOR/$DISTRIB/${{ inputs.stability }}/$ARCH"
|
||||
else
|
||||
FOLDER="centreon-$PROJECT-$VERSION-$RELEASE"
|
||||
TARGET="/srv/centreon-yum/yum.centreon.com/$PROJECT_PATH/$MAJOR/$DISTRIB/$REPOTYPE/$ARCH/$PROJECT/$FOLDER"
|
||||
PROJECT_LOCATION="/srv/centreon-yum/yum.centreon.com/$PROJECT_PATH/$MAJOR/$DISTRIB/$REPOTYPE/$ARCH/$PROJECT"
|
||||
ARTIFACTORY_TARGET="https://centreon.jfrog.io/artifactory/rpm/$PROJECT_PATH/$MAJOR/$DISTRIB/${{ inputs.stability }}/$ARCH/$PROJECT/$FOLDER"
|
||||
fi
|
||||
|
||||
for FILE in $FILES; do
|
||||
curl --fail -v -H "Authorization: Bearer ${{ inputs.artifactory_token }}" -X PUT "$ARTIFACTORY_TARGET/$FILE" -T "./$FILE"
|
||||
done
|
||||
|
||||
echo "[DEBUG] - Folder: $FOLDER"
|
||||
echo "[DEBUG] - Project : $PROJECT"
|
||||
echo "[DEBUG] - Target : $TARGET"
|
||||
|
|
Loading…
Reference in New Issue