Skip to content

Commit

Permalink
chore: dummy license zips
Browse files Browse the repository at this point in the history
Signed-off-by: MarkAckert <[email protected]>
  • Loading branch information
MarkAckert committed Nov 9, 2023
1 parent bbfdf5c commit d93a709
Showing 1 changed file with 47 additions and 34 deletions.
81 changes: 47 additions & 34 deletions .github/workflows/license-generation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,15 @@ jobs:
echo "CLI_ARTIFACT_NAME=zowe_licenses_cli.zip" >> $GITHUB_OUTPUT
echo "ZOS_ARTIFACT_NAME=zowe_licenses_zos.zip" >> $GITHUB_OUTPUT
fi
- name: Create release artifact path
run: |
echo "FULL_ARTIFACT_PATH=${{ env.ARTIFACT_REPO }}/${{ env.ARTIFACT_PATH }}/${{ env.ARTIFACT_VERSION }}/" >> $GITHUB_OUTPUT
- name: Checkout current repo
uses: actions/checkout@v2

- uses: actions/setup-node@v2
with:
node-version: '16'

- name: 'Install Ansible'
uses: zowe-actions/shared-actions/prepare-workflow@main
- name: '[Zowe Actions] Prepare workflow'
uses: zowe-actions/shared-actions/prepare-workflow@main

Expand All @@ -85,41 +82,57 @@ jobs:
env:
JF_ENV_1: ${{ secrets.JF_ARTIFACTORY_TOKEN }}

- name: Scan Licenses on Branch ${{ env.ZOWE_RELEASE_BRANCH }}
env:
APP_NOTICES_SCAN: true
APP_LICENSE_SCAN: true
ZOWE_MANIFEST_BRANCH: ${{ env.ZOWE_RELEASE_BRANCH }}
- name: '[TEST-ONLY] Dummy scan step'
working-directory: ${{ env.DEPENDENCY_SCAN_HOME }}
run: |
yarn install && yarn build
node lib/index.js
cd build
zip -r logs.zip logs/
zip -r license_reports.zip license_reports/
zip -r notice_reports.zip notice_reports/
cd ..
run: |
mkdir -p zowe_licenses
mkdir -p zowe_cli_licenses
mkdir -p zowe_zos_licenses
cp ../resources/* zowe_licenses/
cp ../resources/* zowe_cli_licenses/
cp ../resources/* zowe_zos_licenses/
echo "HI" >> dummy.txt
cp dummy.txt zowe_licenses
cp dummy.txt zowe_cli_licenses
cp dummy.txt zowe_zos_licenses
# Aggregate
cp build/notice_reports/${{ env.NOTICES_AGGREGATE_FILE }} zowe_licenses/zowe_full_notices.txt
cp build/license_reports/${{ env.MARKDOWN_REPORT_NAME }} zowe_licenses/zowe_full_dependency_list.md
zip -j ${{ env.AGG_ARTIFACT_NAME }} zowe_licenses/*
# CLI
cp build/notice_reports/${{ env.NOTICES_CLI_FILE }} zowe_cli_licenses/zowe_cli_notices.txt
cp build/license_reports/${{ env.MARKDOWN_CLI_REPORT }} zowe_cli_licenses/zowe_cli_dependency_list.md
zip -j ${{ env.CLI_ARTIFACT_NAME }} zowe_cli_licenses/*
# z/OS
cp build/notice_reports/${{ env.NOTICES_ZOS_FILE }} zowe_zos_licenses/zowe_zos_notices.txt
cp build/license_reports/${{ env.MARKDOWN_ZOS_REPORT }} zowe_zos_licenses/zowe_zos_dependency_list.md
zip -j ${{ env.ZOS_ARTIFACT_NAME }} zowe_zos_licenses/*
# - name: Scan Licenses on Branch ${{ env.ZOWE_RELEASE_BRANCH }}
# env:
# APP_NOTICES_SCAN: true
# APP_LICENSE_SCAN: true
# ZOWE_MANIFEST_BRANCH: ${{ env.ZOWE_RELEASE_BRANCH }}
# working-directory: ${{ env.DEPENDENCY_SCAN_HOME }}
# run: |
# yarn install && yarn build
# node lib/index.js
# cd build
# zip -r logs.zip logs/
# zip -r license_reports.zip license_reports/
# zip -r notice_reports.zip notice_reports/
# cd ..
# mkdir -p zowe_licenses
# mkdir -p zowe_cli_licenses
# mkdir -p zowe_zos_licenses
# cp ../resources/* zowe_licenses/
# cp ../resources/* zowe_cli_licenses/
# cp ../resources/* zowe_zos_licenses/

# # Aggregate
# cp build/notice_reports/${{ env.NOTICES_AGGREGATE_FILE }} zowe_licenses/zowe_full_notices.txt
# cp build/license_reports/${{ env.MARKDOWN_REPORT_NAME }} zowe_licenses/zowe_full_dependency_list.md
# zip -j ${{ env.AGG_ARTIFACT_NAME }} zowe_licenses/*

# # CLI
# cp build/notice_reports/${{ env.NOTICES_CLI_FILE }} zowe_cli_licenses/zowe_cli_notices.txt
# cp build/license_reports/${{ env.MARKDOWN_CLI_REPORT }} zowe_cli_licenses/zowe_cli_dependency_list.md
# zip -j ${{ env.CLI_ARTIFACT_NAME }} zowe_cli_licenses/*
# # z/OS
# cp build/notice_reports/${{ env.NOTICES_ZOS_FILE }} zowe_zos_licenses/zowe_zos_notices.txt
# cp build/license_reports/${{ env.MARKDOWN_ZOS_REPORT }} zowe_zos_licenses/zowe_zos_dependency_list.md
# zip -j ${{ env.ZOS_ARTIFACT_NAME }} zowe_zos_licenses/*

- name: Archive Aggregates
uses: actions/upload-artifact@v3
with:
Expand All @@ -134,9 +147,9 @@ jobs:
timeout-minutes: 10
uses: zowe-actions/shared-actions/publish@main
with:
publish-target-path-pattern: ${{ env.FULL_ARTIFACT_PATH }}
publish-target-path-pattern: ${{ env.ARTIFACT_REPO }}/${{ env.ARTIFACT_PATH }}/${{ env.ARTIFACT_VERSION }}/
perform-release: ${{ env.PUBLISH_RELEASE }}
artifacts: |
${{ env.DEPENDENCY_SCAN_HOME }}/${{ env.AGG_ARTIFACT_NAME }}
${{ env.DEPENDENCY_SCAN_HOME }}/${{ env.CLI_ARTIFACT_NAME }}
${{ env.DEPENDENCY_SCAN_HOME }}/${{ env.ZOS_ARTIFACT_NAME }}
${{ env.DEPENDENCY_SCAN_HOME }}/${{ env.ZOS_ARTIFACT_NAME }}

0 comments on commit d93a709

Please sign in to comment.