|
19 | 19 | name: Secret scanning |
20 | 20 | runs-on: ubuntu-latest |
21 | 21 | # continue-on-error: true |
| 22 | + needs: start-time-capture |
22 | 23 | steps: |
23 | 24 | - name: Checkout Repo |
24 | 25 | uses: actions/checkout@v4 |
@@ -130,62 +131,63 @@ jobs: |
130 | 131 | # }, |
131 | 132 | # ] |
132 | 133 | # } |
133 | | - # compile: |
134 | | - # name: Compile code |
135 | | - # runs-on: ubuntu-latest |
136 | | - # needs: dependency-scanning |
137 | | - # steps: |
138 | | - # - name: Checkout Repo |
139 | | - # uses: actions/checkout@v4 |
140 | | - # - name: Set up JDK |
141 | | - # uses: actions/setup-java@v3 |
142 | | - # with: |
143 | | - # java-version: '11.0.25+9' |
144 | | - # distribution: 'temurin' |
145 | | - # - name: Restore Maven packages |
146 | | - # uses: actions/cache/restore@v4 |
147 | | - # with: |
148 | | - # path: ~/.m2/repository |
149 | | - # key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} |
150 | | - # - name: Compile |
151 | | - # run: mvn clean compile |
152 | | - # - name: Slack notify on failure |
153 | | - # uses: slackapi/slack-github-action@v2.0.0 |
154 | | - # if: failure() |
155 | | - # with: |
156 | | - # webhook: ${{ secrets.SLACK_WEBHOOK_URL }} |
157 | | - # webhook-type: incoming-webhook |
158 | | - # payload: | |
159 | | - # { |
160 | | - # "blocks": [ |
161 | | - # { |
162 | | - # "type": "section", |
163 | | - # "text": { |
164 | | - # "type": "mrkdwn", |
165 | | - # "text": "*Pipeline Alert! :rotating_light: *", |
166 | | - # } |
167 | | - # }, |
168 | | - # { |
169 | | - # "type": "section", |
170 | | - # "text": { |
171 | | - # "type": "mrkdwn", |
172 | | - # "text": ":x: *Job* `${{ github.job }}` in *workflow* `${{ github.workflow }}` has failed" |
173 | | - # } |
174 | | - # }, |
175 | | - # { |
176 | | - # "type": "section", |
177 | | - # "text": { |
178 | | - # "type": "mrkdwn", |
179 | | - # "text": ":bust_in_silhouette: Commit of message `${{ github.event.head_commit.message }}` commited by ${{ github.event.head_commit.author.name }} has resulted in the failure of the job\n*Ref*: <${{ github.event.head_commit.url }}|${{ github.sha }}>" |
180 | | - # } |
181 | | - # }, |
182 | | - # ] |
183 | | - # } |
| 134 | + compile: |
| 135 | + name: Compile code |
| 136 | + runs-on: ubuntu-latest |
| 137 | + # needs: dependency-scanning |
| 138 | + needs: secret-scanning |
| 139 | + steps: |
| 140 | + - name: Checkout Repo |
| 141 | + uses: actions/checkout@v4 |
| 142 | + - name: Set up JDK |
| 143 | + uses: actions/setup-java@v3 |
| 144 | + with: |
| 145 | + java-version: '11.0.25+9' |
| 146 | + distribution: 'temurin' |
| 147 | + - name: Restore Maven packages |
| 148 | + uses: actions/cache/restore@v4 |
| 149 | + with: |
| 150 | + path: ~/.m2/repository |
| 151 | + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} |
| 152 | + - name: Compile |
| 153 | + run: mvn clean compile |
| 154 | + - name: Slack notify on failure |
| 155 | + uses: slackapi/slack-github-action@v2.0.0 |
| 156 | + if: failure() |
| 157 | + with: |
| 158 | + webhook: ${{ secrets.SLACK_WEBHOOK_URL }} |
| 159 | + webhook-type: incoming-webhook |
| 160 | + payload: | |
| 161 | + { |
| 162 | + "blocks": [ |
| 163 | + { |
| 164 | + "type": "section", |
| 165 | + "text": { |
| 166 | + "type": "mrkdwn", |
| 167 | + "text": "*Pipeline Alert! :rotating_light: *", |
| 168 | + } |
| 169 | + }, |
| 170 | + { |
| 171 | + "type": "section", |
| 172 | + "text": { |
| 173 | + "type": "mrkdwn", |
| 174 | + "text": ":x: *Job* `${{ github.job }}` in *workflow* `${{ github.workflow }}` has failed" |
| 175 | + } |
| 176 | + }, |
| 177 | + { |
| 178 | + "type": "section", |
| 179 | + "text": { |
| 180 | + "type": "mrkdwn", |
| 181 | + "text": ":bust_in_silhouette: Commit of message `${{ github.event.head_commit.message }}` commited by ${{ github.event.head_commit.author.name }} has resulted in the failure of the job\n*Ref*: <${{ github.event.head_commit.url }}|${{ github.sha }}>" |
| 182 | + } |
| 183 | + }, |
| 184 | + ] |
| 185 | + } |
184 | 186 | test: |
185 | 187 | name: Unit test and generate code coverage |
186 | 188 | runs-on: ubuntu-latest |
187 | 189 | # needs: |
188 | | - needs: secret-scanning |
| 190 | + needs: compile |
189 | 191 | # continue-on-error: true |
190 | 192 | steps: |
191 | 193 | - name: Checkout Repo |
@@ -492,7 +494,7 @@ jobs: |
492 | 494 | "type": "section", |
493 | 495 | "text": { |
494 | 496 | "type": "mrkdwn", |
495 | | - "text":":watch: *Duration:* ${{ steps.workflow_duration.outputs.MINUTES }} minutes and ${{ steps.workflow_duration.outputs.SECONDS }} seconds." |
| 497 | + "text":":watch: *Duration:* ${{ steps.workflow_duration.outputs.MINUTES }} min and ${{ steps.workflow_duration.outputs.SECONDS }} sec." |
496 | 498 | } |
497 | 499 | }, |
498 | 500 | ] |
|
0 commit comments