File tree Expand file tree Collapse file tree 1 file changed +30
-3
lines changed Expand file tree Collapse file tree 1 file changed +30
-3
lines changed Original file line number Diff line number Diff line change @@ -616,6 +616,24 @@ jobs:
616616 poetry export --without-hashes --with dev -o requirements_dev.txt
617617 cat requirements_dev.txt
618618 fi
619+ - name : Setup UCC
620+ run : |
621+ if [ -f "requirements_ucc.txt" ]; then
622+ python${{ env.PYTHON_VERSION }} -m venv .ucc_venv
623+ echo "Found requirements_ucc.txt. Installing UCC dependencies in an isolated environment"
624+ ./.ucc_venv/bin/python -m pip install -r requirements_ucc.txt
625+ export UCC_GEN="$PWD/.ucc_venv/bin/ucc-gen"
626+
627+ if [ ! -f "$UCC_GEN" ]; then
628+ echo "ucc-gen not found after installing requirements from requirements_ucc.txt"
629+ exit 1
630+ fi
631+
632+ echo "UCC_GEN=$UCC_GEN" >> "$GITHUB_ENV"
633+ else
634+ echo "No UCC requirements file found, skipping UCC setup"
635+ echo "Consider adding a requirements_ucc.txt file and place UCC requirement there, to avoid dependency conflicts"
636+ fi
619637 - name : Get pip cache dir
620638 id : pip-cache
621639 run : |
@@ -694,9 +712,18 @@ jobs:
694712 cp -f THIRDPARTY package/THIRDPARTY || echo "THIRDPARTY file not found (allowed for PR and schedule)"
695713 - name : Build Package
696714 id : uccgen
697- uses : splunk/addonfactory-ucc-generator-action@v2
698- with :
699- version : ${{ steps.BuildVersion.outputs.VERSION }}
715+ run : |
716+ "${UCC_GEN:-ucc-gen}" build --ta-version ${{ steps.BuildVersion.outputs.VERSION }}
717+ if [ -f package.json ]
718+ then
719+ yarn
720+ if [ -n ${{ steps.BuildVersion.outputs.VERSION }} ]
721+ then
722+ yarn version --new-version ${{ steps.BuildVersion.outputs.VERSION }} --no-git-tag-version
723+ fi
724+ yarn run build
725+ fi
726+ echo "OUTPUT=output/$(ls output/)" >> "$GITHUB_OUTPUT"
700727 - name : Slim Package
701728 id : slim
702729 run : |
You can’t perform that action at this time.
0 commit comments