Skip to content

Commit

Permalink
enh(ci): rebuild yum metadata only one time (#463)
Browse files Browse the repository at this point in the history
  • Loading branch information
kduret committed Dec 9, 2022
1 parent 29fc71d commit 0e355ab
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/actions/delivery/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ runs:
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"
METADATAS="/srv/centreon-yum/yum.centreon.com/$PROJECT_PATH/$MAJOR/$DISTRIB/$REPOTYPE/$ARCH"
echo "[DEBUG] - Folder: $FOLDER"
echo "[DEBUG] - Project : $PROJECT"
Expand All @@ -135,12 +134,14 @@ runs:
ssh -o StrictHostKeyChecking=no "${{ inputs.yum_repo_address }}" mkdir -p "$TARGET" 2>&-
scp -o StrictHostKeyChecking=no "$FILE" "${{ inputs.yum_repo_address }}:$TARGET" 2>&-
#ssh -o StrictHostKeyChecking=no "${{ inputs.yum_repo_address }}" "ls -drc $PROJECT_LOCATION/* 2>&- | head -n -6 | xargs rm -rf"
ssh -o StrictHostKeyChecking=no "${{ inputs.yum_repo_address }}" "sh "${{ inputs.update_repo_path }}" $METADATAS" 2>&-
fi
done
# run this only for rpm
if [[ "${{ env.extfile }}" == "rpm" ]] ; then
METADATAS="/srv/centreon-yum/yum.centreon.com/$PROJECT_PATH/$MAJOR/$DISTRIB/$REPOTYPE/$ARCH"
ssh -o StrictHostKeyChecking=no "${{ inputs.yum_repo_address }}" "sh "${{ inputs.update_repo_path }}" $METADATAS" 2>&-
ID="${{ inputs.cloudfront_id }}"
PATHS="/$PROJECT_PATH/$MAJOR/$DISTRIB/$REPOTYPE/$ARCH/*"
ITERATIONS=1
Expand Down

0 comments on commit 0e355ab

Please sign in to comment.