Skip to content

Commit

Permalink
fix(ci): fix gorgone veracode inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
kduret committed Jul 5, 2024
1 parent 684b0f3 commit c9c4699
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/gorgone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,13 @@ jobs:
module_name: centreon-gorgone
major_version: ${{ needs.get-version.outputs.major_version }}
minor_version: ${{ needs.get-version.outputs.minor_version }}
stability: ${{ needs.get-version.outputs.stability }}
is_perl_project: true
img_version: ${{ needs.get-version.outputs.img_version }}
secrets:
veracode_api_id: ${{ secrets.VERACODE_API_ID_GORG }}
veracode_api_key: ${{ secrets.VERACODE_API_KEY_GORG }}
veracode_srcclr_token: ${{ secrets.VERACODE_SRCCLR_TOKEN }}
jira_base_url: ${{ secrets.JIRA_BASE_URL }}
jira_user_email: ${{ secrets.XRAY_JIRA_USER_EMAIL }}
jira_api_token: ${{ secrets.XRAY_JIRA_TOKEN }}
docker_registry_id: ${{ secrets.DOCKER_REGISTRY_ID }}
docker_registry_passwd: ${{ secrets.DOCKER_REGISTRY_PASSWD }}

package:
needs: [get-version]
Expand Down
16 changes: 13 additions & 3 deletions .github/workflows/veracode-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
on:
workflow_call:
inputs:
module_directory:
required: false
type: string
module_name:
required: true
type: string
Expand Down Expand Up @@ -63,7 +66,8 @@ jobs:
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4

- name: Compiling Cpp sources
- if: ${{ inputs.module_name == 'centreon-collect' }}
name: Compiling Cpp sources
run: |
mv /root/.cache /github/home
export VCPKG_ROOT=/vcpkg
Expand Down Expand Up @@ -101,12 +105,18 @@ jobs:
echo "[DEBUG] - Build size"
du -sh $(find build/{broker,engine,clib,connectors,common} -name "*.so" -type f) | sort -rh
- name: Binary preparation
- if: ${{ inputs.module_name == 'centreon-collect' }}
name: Preserve centreon-collect binaries from cleaning
run: |
echo "[INFO] - Keeping only compiled files"
# preserve binaries from cleaning
find build -type f -not \( -name "*.so" -or -name "cbd" -or -name "centengine" -or -name "cbwd" -or -name "centreon_connector_*" \) -delete
- name: Binary preparation of ${{ inputs.module_name }}
run: |
if [ -n "${{ inputs.module_directory }}" ]; then
cd ${{ inputs.module_directory }}
fi
echo "[INFO] - Removing veracode exclusions"
if [[ -f ".veracode-exclusions" ]]; then
for LINE in $( cat .veracode-exclusions | sed 's/[^a-zA-Z0-9_./-]//g' | sed -r 's/\.\./\./g' ); do
Expand Down

0 comments on commit c9c4699

Please sign in to comment.