Skip to content

[patch] digest for May catalog #6907

[patch] digest for May catalog

[patch] digest for May catalog #6907

Workflow file for this run

name: Build Ansible Collection
on:
push:
branches:
- '**'
tags-ignore:
- '**'
jobs:
ansible-build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2.3.1
# Without this option, we don't get the tag information
with:
fetch-depth: 0
- name: Initialise the build system
run: |
chmod u+x $GITHUB_WORKSPACE/build/bin/*.sh
$GITHUB_WORKSPACE/build/bin/initbuild.sh
source $GITHUB_WORKSPACE/build/bin/.functions.sh
python -m pip install -q ansible==2.10.3 yamllint
# Note: Use "--format standard" to ensure filenames and line numbers are in the output
# https://gitanswer.com/yamllint-missing-filenames-and-line-numbers-in-github-action-output-python-794550803
- name: Validate that the ansible collection lints successfully
run: |
yamllint --format standard -c $GITHUB_WORKSPACE/yamllint.yaml $GITHUB_WORKSPACE/ibm/mas_devops
- name: Build the Ansible collection
run: |
$GITHUB_WORKSPACE/build/bin/build-collection.sh
- name: Upload Ansible Collection to Github Actions
uses: actions/upload-artifact@v2
with:
name: ibm-mas_devops-${{ env.VERSION }}.tar.gz
path: ${{ github.workspace }}/ibm/mas_devops/ibm-mas_devops-${{ env.VERSION }}.tar.gz
retention-days: 30
- name: Upload Ansible Collection to Artifactory
env:
ARTIFACTORY_GENERIC_RELEASE_URL: ${{ secrets.ARTIFACTORY_GENERIC_RELEASE_URL }}
ARTIFACTORY_TOKEN: ${{ secrets.ARTIFACTORY_TOKEN }}
run: |
echo "Copying $GITHUB_WORKSPACE/ibm/mas_devops/ibm-mas_devops-${{ env.VERSION }}.tar.gz to $GITHUB_WORKSPACE/ibm/mas_devops/ibm-mas_devops.tar.gz..."
cp $GITHUB_WORKSPACE/ibm/mas_devops/ibm-mas_devops-${{ env.VERSION }}.tar.gz $GITHUB_WORKSPACE/ibm/mas_devops/ibm-mas_devops.tar.gz
$GITHUB_WORKSPACE/build/bin/artifactory-release.sh $GITHUB_WORKSPACE/ibm/mas_devops/ibm-mas_devops.tar.gz
- name: Trigger ibm-mas/cli rebuild on Ansible Collection master build
if: github.ref == 'refs/heads/master'
run: |
curl -XPOST https://api.github.com/repos/ibm-mas/cli/actions/workflows/build-cli.yml/dispatches \
-H "Accept: application/vnd.github.everest-preview+json" -H "Content-Type: application/json" \
-u ${{ secrets.ACTIONS_KEY }} \
--data '{"ref": "master"}'
- uses: actions/checkout@v3
- name: Perform dependency check
uses: dependency-check/Dependency-Check_Action@main
id: owasp-depcheck
with:
project: 'ansible-devops'
path: '.'
format: 'HTML'
args: >
--failOnCVSS 7
--enableRetired
- name: Upload dependency check results
uses: actions/upload-artifact@v2
with:
name: OWASP dependency check report
path: ${{github.workspace}}/reports
retention-days: 30