-
Notifications
You must be signed in to change notification settings - Fork 2
62 lines (60 loc) · 2.67 KB
/
dependency-check.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Dependency Check
on:
push:
branches: [develop]
paths:
- "core-customize/hybris/bin/custom/sapcxtools/**/*.java"
- "core-customize/hybris/bin/custom/sapcxtools/**/*-beans.xml"
- "core-customize/hybris/bin/custom/sapcxtools/**/*-items.xml"
- "core-customize/hybris/bin/custom/sapcxtools/**/extensioninfo.xml"
- "core-customize/hybris/bin/custom/sapcxtools/**/external-dependencies.xml"
pull_request:
branches: [main, develop]
workflow_dispatch:
jobs:
dependency-check:
runs-on: ubuntu-latest
strategy:
matrix:
extension: ["sapcommercetoolkit", "sapcxbackoffice", "sapcxreporting", "sapcxsearch", "sapcxenvconfig", "sapcxsinglesignon"]
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: "adopt"
java-version: "17"
cache: "gradle"
- name: Validate Gradle wrapper
uses: gradle/actions/wrapper-validation@v3
- name: Set up cache for SAP artifacts
uses: actions/cache@v4
with:
key: sap-artifacts-cache-${{ hashFiles('core-customize/manifest.json') }}
path: dependencies
- name: SAP download config
env:
SAPCX_ARTEFACT_BASEURL: ${{ secrets.SAPCX_ARTEFACT_BASEURL }}
SAPCX_ARTEFACT_USER: ${{ secrets.SAPCX_ARTEFACT_USER }}
SAPCX_ARTEFACT_PASSWORD: ${{ secrets.SAPCX_ARTEFACT_PASSWORD }}
shell: bash
run: |
mkdir -p ${HOME}/.gradle
echo "GRADLE_USER_HOME=${HOME}/.gradle" >> $GITHUB_ENV
echo "SAPCX_ARTEFACT_BASEURL=${SAPCX_ARTEFACT_BASEURL}" >> ${HOME}/.gradle/gradle.properties
echo "SAPCX_ARTEFACT_USER=${SAPCX_ARTEFACT_USER}" >> ${HOME}/.gradle/gradle.properties
echo "SAPCX_ARTEFACT_PASSWORD=${SAPCX_ARTEFACT_PASSWORD}" >> ${HOME}/.gradle/gradle.properties
- name: SAP Commerce environment
run: |
echo "HYBRIS_OPT_CONFIG_DIR=$GITHUB_WORKSPACE/core-customize/hybris/config/local-config" >> $GITHUB_ENV
echo "HYBRIS_BIN_DIR=$GITHUB_WORKSPACE/core-customize/hybris/bin" >> $GITHUB_ENV
echo "HYBRIS_CONF_DIR=$GITHUB_WORKSPACE/core-customize/hybris/config" >> $GITHUB_ENV
echo "HYBRIS_LOG_DIR=$GITHUB_WORKSPACE/core-customize/hybris/log" >> $GITHUB_ENV
- name: Configure extension
run: |
cp -f ci/config/localextensions-template.xml $HYBRIS_CONF_DIR/localextensions.xml
sed -i 's/EXTENSIONNAME/${{ matrix.extension }}/' $HYBRIS_CONF_DIR/localextensions.xml
- name: Bootstrap platform
run: ./gradlew setupLocalDevelopment
- name: Build platform
run: ./gradlew yall