Skip to content

Commit

Permalink
Merge branch 'v6' into feat/datetime-picker-custom-slot-v6
Browse files Browse the repository at this point in the history
  • Loading branch information
bualoy-napat authored Dec 6, 2023
2 parents e0d138c + 5cab9bf commit d7b4703
Show file tree
Hide file tree
Showing 8 changed files with 617 additions and 394 deletions.
21 changes: 13 additions & 8 deletions .github/workflows/blackduck_scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ jobs:
name: Blackduck
runs-on: ubuntu-latest
steps:
- name: Context Valdidation
run: |
BRANCH_NAME="${GITHUB_REF#refs/heads/}"
if [[ "${{ inputs.target }}" == "Production" && $BRANCH_NAME != "v6" && $BRANCH_NAME != "v7" ]]; \
then echo "Only v6 & v7 branch can be published as production"; exit 1; \
fi
if [[ -z "${{ vars.BLACKDUCK_APP_ID }}" ]]; then echo "[BLACKDUCK] APP_ID must be set"; exit 1; fi
if [[ -z "${{ vars.BLACKDUCK_PROJECT_ID }}" ]]; then echo "[BLACKDUCK] PROJECT_ID must be set"; exit 1; fi
if [[ -z "${{ secrets.BLACKDUCK_APP_TOKEN }}" ]]; then echo "[BLACKDUCK] BLACKDUCK_APP_TOKEN must be set"; exit 1; fi
echo "Inputs, variables & secrets validation: successful."
- name: Check out repository code
uses: actions/checkout@v3
with:
Expand All @@ -52,14 +62,9 @@ jobs:
mv $DETECT_FILE appsec/
BRANCH_NAME="${GITHUB_REF#refs/heads/}"
if [[ "${{ inputs.target }}" == "Production" && $BRANCH_NAME != "v6" && $BRANCH_NAME != "v7" ]]; \
then echo "Only v6 & v7 branch can be published as production"; exit 1; \
fi
if [[ "${{ inputs.target }}" == "Production" ]]; then export RELEASE_TYPE="PROD"; export VERSION_ID="Release_$BRANCH_NAME"; fi
if [[ "${{ inputs.target }}" != "Production" ]]; then export RELEASE_TYPE="DEV"; export VERSION_ID="${{ inputs.target }}"; fi
if [[ -z "${{ vars.BLACKDUCK_APP_ID }}" ]]; then echo "[BLACKDUCK] APP_ID must be set"; exit 1; fi
if [[ -z "${{ vars.BLACKDUCK_PROJECT_ID }}" ]]; then echo "[BLACKDUCK] PROJECT_ID must be set"; exit 1; fi
if [[ -z "${{ secrets.BLACKDUCK_APP_TOKEN }}" ]]; then echo "[BLACKDUCK] BLACKDUCK_APP_TOKEN must be set"; exit 1; fi
RELEASE_TYPE="DEV"
VERSION_ID="${{ inputs.target }}"
if [[ "${{ inputs.target }}" == "Production" ]]; then RELEASE_TYPE="PROD"; VERSION_ID="Release_${GITHUB_REF#refs/heads/}"; fi
java -jar appsec/$DETECT_FILE \
--detect.project.application.id="${{ vars.BLACKDUCK_APP_ID }}" \
Expand Down
Loading

0 comments on commit d7b4703

Please sign in to comment.