From 7fdefa9c76135661faa4c252a4b404e6b8405f70 Mon Sep 17 00:00:00 2001 From: Komali612 <82115137+Komali612@users.noreply.github.com> Date: Thu, 27 Aug 2026 08:16:02 -0700 Subject: [PATCH 1/4] ci: add generated CI pipeline From dfebcabe293432b86e97046a1802dd2c326b188a Mon Sep 17 00:00:00 2001 From: Komali612 <82115137+Komali612@users.noreply.github.com> Date: Thu, 27 Aug 2026 09:16:20 -0700 Subject: [PATCH 2/4] ci: add generated CI pipeline From 698bebffcc0e6ca013f7cf035c2913af3c757bec Mon Sep 17 00:00:00 2001 From: Komali612 <82115137+Komali612@users.noreply.github.com> Date: Thu, 27 Aug 2026 09:32:33 -0700 Subject: [PATCH 3/4] ci: add generated CI pipeline From 74ae4371077f7c57f37d0997977d90de573b70d1 Mon Sep 17 00:00:00 2001 From: Komali612 <82115137+Komali612@users.noreply.github.com> Date: Sun, 30 Aug 2026 09:06:42 -0700 Subject: [PATCH 4/4] ci: add generated CI pipeline --- .github/workflows/NetcoreSampleApp-ci.yml | 114 +++++++--------------- 1 file changed, 36 insertions(+), 78 deletions(-) diff --git a/.github/workflows/NetcoreSampleApp-ci.yml b/.github/workflows/NetcoreSampleApp-ci.yml index 4052d42..54e2f4f 100644 --- a/.github/workflows/NetcoreSampleApp-ci.yml +++ b/.github/workflows/NetcoreSampleApp-ci.yml @@ -23,8 +23,11 @@ env: REGISTRY_URL: ${{ secrets.REGISTRY_URL }} jobs: - build: + ci: runs-on: ubuntu-latest + permissions: + contents: read + packages: write steps: - name: Checkout code uses: actions/checkout@v4 @@ -38,34 +41,12 @@ jobs: dotnet restore "tests/SampleApi.Tests/SampleApi.Tests.csproj" dotnet build "src/SampleApi/SampleApi.csproj" --configuration Release --no-restore dotnet build "tests/SampleApi.Tests/SampleApi.Tests.csproj" --configuration Release --no-restore - - test: - needs: build - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - name: 'Set up .NET' - uses: actions/setup-dotnet@v4 - with: - dotnet-version: '8.0.x' - name: 'Run unit tests' run: | cat > coverlet.runsettings <<'EOF' opencover EOF dotnet test "tests/SampleApi.Tests/SampleApi.Tests.csproj" --configuration Release --verbosity normal --collect:"XPlat Code Coverage" --settings coverlet.runsettings --results-directory ./TestResults - - sonarqube: - needs: test - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - name: 'Set up .NET' - uses: actions/setup-dotnet@v4 - with: - dotnet-version: '8.0.x' - name: 'Sonar: set up JDK' uses: actions/setup-java@v4 with: @@ -84,65 +65,42 @@ jobs: - name: 'Sonar scan end' run: | dotnet-sonarscanner end /d:sonar.token="$SONAR_TOKEN" - - security: - needs: test - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Run SAST (Fortify) - run: echo "SAST analysis via Fortify integration (placeholder)" - - - name: Run SCA (Sonatype) - run: echo "SCA analysis via Sonatype integration (placeholder)" - - # DAST stage disabled in configuration - # needs: build - # runs-on: ubuntu-latest - # steps: - # - name: Run DAST (Fortify WebInspect) - # run: echo 'DAST analysis via Fortify WebInspect (placeholder)' - - container: - needs: security - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - steps: - - name: Checkout code - uses: actions/checkout@v4 - - name: Log in to GHCR + # SAST - not selected in the orchestrator UI + # - name: 'Run SAST (not selected)' + # run: | + # echo "SAST analysis via not selected (placeholder)" + # SCA - not selected in the orchestrator UI + # - name: 'Run SCA (not selected)' + # run: | + # echo "SCA analysis via not selected (placeholder)" + # DAST - not selected in the orchestrator UI + # - name: 'Run DAST (not selected)' + # run: | + # echo "DAST analysis via not selected (placeholder)" + # IMGSCAN - not selected in the orchestrator UI + # - name: 'Scan container image (not selected)' + # run: | + # echo "Container image scan via not selected (placeholder)" + # ARTIFACT - not selected in the orchestrator UI + # - name: 'Publish artifacts (not selected)' + # run: | + # echo "Publish build artifacts to not selected (placeholder)" + - name: 'Log in to registry (GHCR)' uses: docker/login-action@v3 with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - name: Build and push image + registry: 'ghcr.io' + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - name: 'Build and push image' run: | REPO=$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]') IMAGE=ghcr.io/$REPO:${{ github.sha }} docker build -t "$IMAGE" . docker push "$IMAGE" - - name: Generate SBOM - run: echo 'SBOM generation (placeholder — e.g. Trivy/Syft)' - - helm: - needs: container - runs-on: ubuntu-latest - steps: - - name: Update Helm Chart - run: echo 'Update Helm chart (placeholder)' - - notify: - needs: [build, test, sonarqube, security] - runs-on: ubuntu-latest - if: always() - steps: - - name: Notify Dynatrace - run: echo "Send build metrics to Dynatrace (placeholder)" - - - name: Notify Splunk - run: echo "Send execution logs to Splunk (placeholder)" + - name: 'Generate SBOM' + run: | + echo "SBOM generation (placeholder - e.g. Trivy/Syft)" + # MONITORING - not selected in the orchestrator UI + # - name: 'Send telemetry (not selected)' + # run: | + # echo "Send build metrics/logs to not selected (placeholder)"