3838 - ' tests/**'
3939 - ' *.md'
4040 - ' LICENSE'
41- # branches-ignore:
42- # - main
43- # - develop
4441 branches :
45- - ' **' # matches every branch
42+ - main
43+ - develop
44+ - feature/**
45+ - bugfix/**
4646 pull_request :
4747 branches : [ main, develop ]
4848
5656 runFoDOSSScan :
5757 description : ' Carry out OSS scan using OpenText Core Application Security'
5858 required : false
59- default : ' true'
60- deployApp :
61- description : ' Deploy App to Azure'
62- required : false
63- default : ' true'
59+ default : ' true'
6460 runFoDDASTScan :
6561 description : ' Carry out DAST scan using OpenText Core Application Security'
6662 required : false
9490 echo "Running in a branch pipeline ..."
9591 echo "FOD_RELEASE=${{ env.DEFAULT_APP_NAME }}${{ vars.FORTIFY_APP_NAME_POSTFIX }}:${{ github.ref_name }}" >> $GITHUB_OUTPUT
9692 echo "FOD_PARENT_RELEASE=${{ env.DEFAULT_APP_NAME }}${{ vars.FORTIFY_APP_NAME_POSTFIX }}:${{ env.DEFAULT_PARENT_RELEASE_NAME }}" >> $GITHUB_OUTPUT
97- fi
98-
99- Build-And-Unit-Test :
100- runs-on : ubuntu-latest
101- needs : [ Env-Prepare ]
102- steps :
103- - name : Checkout
104- uses : actions/checkout@v4
105- - name : Set up Python
106- uses : actions/setup-python@v5
107- with :
108- python-version : ${{ env.PYTHON_VERSION }}
109- cache : ' pip'
110- - name : Create and start virtual environment
111- run : |
112- python -m venv venv
113- source venv/bin/activate
114- - name : Install dependencies
115- run : |
116- pip install -r requirements.txt
117- pip install pytest pytest-md pytest-emoji
118- - uses : pavelzw/pytest-action@v2
119- with :
120- emoji : false
121- verbose : false
122- job-summary : true
123- # Publish test results
124- # - name: Publish Test Results
125- # uses: EnricoMi/publish-unit-test-result-action@v2
126- # if: always()
127- # with:
128- # files: |
129- # build/test-results/**/*.xml
130- # build/test-results/**/*.trx
131- # build/test-results/**/*.json
132- - name : Upload artifact for deployment jobs
133- uses : actions/upload-artifact@v4
134- with :
135- name : python-app
136- path : |
137- .
138- !venv/
93+ fi
13994
14095 FoD-SAST-Scan :
14196 runs-on : ubuntu-latest
@@ -194,7 +149,7 @@ jobs:
194149 FoD-OSS-Scan :
195150 runs-on : ubuntu-latest
196151 if : ${{ (github.event_name == 'push') || (github.event_name == 'pull_request') || (github.event.inputs.runFoDOSSScan == 'true') }}
197- needs : [ Env-Prepare, FoD-SAST-Scan ] # for creating new FoD release (if required)
152+ needs : [ Env-Prepare ]
198153 env :
199154 FOD_RELEASE : ${{ needs.Env-Prepare.outputs.FOD_RELEASE }}
200155 FOD_PARENT_RELEASE : ${{ needs.Env-Prepare.outputs.FOD_PARENT_RELEASE }}
@@ -227,46 +182,11 @@ jobs:
227182 FOD_CLIENT_SECRET : ${{ secrets.FOD_CLIENT_SECRET }}
228183 PACKAGE_FILE : " fortifypackage.zip"
229184 FOD_RELEASE : ${{ env.FOD_RELEASE }}
230-
231- Deploy-App :
232- permissions :
233- contents : none
234- runs-on : ubuntu-latest
235- needs : [ Build-And-Unit-Test, FoD-SAST-Scan, FoD-OSS-Scan ]
236- environment :
237- name : ' Development'
238- # url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}
239- if : ${{ success() && github.ref_name == github.event.repository.default_branch }}
240- steps :
241- - name : Download artifact from build job
242- uses : actions/download-artifact@v4
243- with :
244- name : python-app
245- path : .
246- # Example deployment to azure web app
247- # This is commented out as it is done in workflows/azure_webapp..yml
248- # - name: 'Deploy to Azure Web App'
249- # id: deploy-to-webapp
250- # uses: azure/webapps-deploy@v3
251- # with:
252- # app-name: ${{ env.AZURE_WEBAPP_NAME }}
253- # publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_94429323A56E479BA44DAB94865DCF4A }}
254-
255- Functional-Test :
256- runs-on : ubuntu-latest
257- if : ${{ always() }}
258- needs : [ Env-Prepare, Deploy-App ]
259- env :
260- FOD_RELEASE : ${{ needs.Env-Prepare.outputs.FOD_RELEASE }}
261- FOD_PARENT_RELEASE : ${{ needs.Env-Prepare.outputs.FOD_PARENT_RELEASE }}
262- steps :
263- - name : Checkout
264- uses : actions/checkout@v4
265-
185+
266186 FoD-DAST-Scan :
267187 runs-on : ubuntu-latest
268188 if : ${{ (github.ref_name == github.event.repository.default_branch) && (github.event.inputs.runFoDDASTScan == 'true') }}
269- needs : [ Env-Prepare, Deploy-App ]
189+ needs : [ Env-Prepare, FoD-SAST-Scan, FoD-OSS-Scan ]
270190 env :
271191 FOD_RELEASE : ${{ needs.Env-Prepare.outputs.FOD_RELEASE }}
272192 FOD_PARENT_RELEASE : ${{ needs.Env-Prepare.outputs.FOD_PARENT_RELEASE }}
@@ -323,13 +243,3 @@ jobs:
323243 FOD_CLIENT_ID : ${{ secrets.FOD_CLIENT_ID }}
324244 FOD_CLIENT_SECRET : ${{ secrets.FOD_CLIENT_SECRET }}
325245 FOD_RELEASE : ${{ env.FOD_RELEASE }}
326-
327- # Release-To-Prod:
328- # runs-on: ubuntu-latest
329- # needs: [ Env-Prepare, Verify-Security-Policy ]
330- # env:
331- # FOD_RELEASE: ${{ needs.Env-Prepare.outputs.FOD_RELEASE }}
332- # FOD_PARENT_RELEASE: ${{ needs.Env-Prepare.outputs.FOD_PARENT_RELEASE }}
333- # steps:
334- # - name: Checkout
335- # uses: actions/checkout@v4
0 commit comments