From 597a2120535a3b59c6e9df041c7b0fd1b0524bfb Mon Sep 17 00:00:00 2001 From: Jean Christophe Roques Date: Fri, 19 Jul 2024 14:11:19 +0200 Subject: [PATCH] add collect package --- .../workflows/windows-agent-robot-test.yml | 48 +++++++++++-------- 1 file changed, 28 insertions(+), 20 deletions(-) diff --git a/.github/workflows/windows-agent-robot-test.yml b/.github/workflows/windows-agent-robot-test.yml index 8bcc8185bb9..6fbf2e0877f 100644 --- a/.github/workflows/windows-agent-robot-test.yml +++ b/.github/workflows/windows-agent-robot-test.yml @@ -13,8 +13,27 @@ jobs: with: version_file: CMakeLists.txt - build-agent: + build-collect: needs: [get-version] + runs-on: [self-hosted, collect] + steps: + - name: compile and package collect + uses: ./.github/actions/compile-package + with: + major_version: ${{ needs.get-version.outputs.major_version }} + minor_version: ${{ needs.get-version.outputs.minor_version }} + distrib: bullseye + package_extension: deb + arch: amd64 + release: ${{ needs.get-version.outputs.release }} + commit_hash: ${{ github.sha }} + stability: ${{ needs.get-version.outputs.stability }} + rpm_gpg_key: ${{ secrets.RPM_GPG_SIGNING_KEY }} + rpm_gpg_signing_key_id: ${{ secrets.RPM_GPG_SIGNING_KEY_ID }} + rpm_gpg_signing_passphrase: ${{ secrets.RPM_GPG_SIGNING_PASSPHRASE }} + + build-agent: + needs: [build-collect] runs-on: windows-latest steps: - name: distrib availables @@ -50,25 +69,9 @@ jobs: run: | $current_dir = (pwd).Path $wsl_path = "/mnt/" + $current_dir.SubString(0,1).ToLower() + "/" + $current_dir.SubString(3).replace('\','/') - [System.Environment]::SetEnvironmentVariable("WSL_COLLECT_DIR", $wsl_path) - Write-Host "collect is there: " $env:WSL_COLLECT_DIR + Write-Host "collect is there: " $wsl_path Write-Host "install mariadb" - wsl cd $env:WSL_COLLECT_DIR `&`& .github/scripts/collect-setup-database.sh - - - name: compile and package collect - uses: ./.github/actions/compile-package - with: - major_version: ${{ needs.get-version.outputs.major_version }} - minor_version: ${{ needs.get-version.outputs.minor_version }} - distrib: bullseye - package_extension: deb - arch: amd64 - release: ${{ needs.get-version.outputs.release }} - commit_hash: ${{ github.sha }} - stability: ${{ needs.get-version.outputs.stability }} - rpm_gpg_key: ${{ secrets.RPM_GPG_SIGNING_KEY }} - rpm_gpg_signing_key_id: ${{ secrets.RPM_GPG_SIGNING_KEY_ID }} - rpm_gpg_signing_passphrase: ${{ secrets.RPM_GPG_SIGNING_PASSPHRASE }} + wsl cd $wsl_path `&`& .github/scripts/collect-setup-database.sh - name: Restore packages uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 @@ -76,4 +79,9 @@ jobs: path: ./*.deb key: ${{ github.run_id }}-${{ github.sha }}-deb-centreon-collect-bullseye-amd64-${{ github.head_ref || github.ref_name }} fail-on-cache-miss: true - \ No newline at end of file + + - name: list packages + run: | + $current_dir = (pwd).Path + $wsl_path = "/mnt/" + $current_dir.SubString(0,1).ToLower() + "/" + + wsl -ls -l $wsl_path