Skip to content

Commit e518ad9

Browse files
committed
Add blosson ci file
Initial onboarding for Blossom CI/CD infra
1 parent f7b9745 commit e518ad9

File tree

1 file changed

+76
-0
lines changed

1 file changed

+76
-0
lines changed

.github/workflows/blossom-ci.yml

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Blossom-CI
2+
on:
3+
push:
4+
branches: [master]
5+
pull_request:
6+
branches: [master]
7+
issue_comment:
8+
types: [created]
9+
workflow_dispatch:
10+
inputs:
11+
platform:
12+
description: 'runs-on argument'
13+
required: false
14+
args:
15+
description: 'argument'
16+
required: false
17+
jobs:
18+
Authorization:
19+
name: Authorization
20+
runs-on: blossom
21+
outputs:
22+
args: ${{ env.args }}
23+
steps:
24+
- name: Check if comment is issued by authorized person
25+
run: blossom-ci
26+
env:
27+
OPERATION: 'AUTH'
28+
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
REPO_KEY_DATA: ${{ secrets.BLOSSOM_KEY }}
30+
# repo specific steps
31+
#- name: Setup java
32+
# uses: actions/setup-java@v1
33+
# with:
34+
# java-version: 1.8
35+
36+
# add blackduck properties https://synopsys.atlassian.net/wiki/spaces/INTDOCS/pages/631308372/Methods+for+Configuring+Analysis#Using-a-configuration-file
37+
#- name: Setup blackduck properties
38+
# run: |
39+
# PROJECTS=$(mvn -am dependency:tree | grep maven-dependency-plugin | awk '{ out="com.nvidia:"$(NF-1);print out }' | grep rapids | xargs | sed -e 's/ /,/g')
40+
# echo detect.maven.build.command="-pl=$PROJECTS -am" >> application.properties
41+
# echo detect.maven.included.scopes=compile >> application.properties
42+
43+
- name: Run blossom action
44+
uses: NVIDIA/blossom-action@main
45+
env:
46+
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47+
REPO_KEY_DATA: ${{ secrets.BLOSSOM_KEY }}
48+
with:
49+
args1: ${{ fromJson(needs.Authorization.outputs.args).args1 }}
50+
args2: ${{ fromJson(needs.Authorization.outputs.args).args2 }}
51+
args3: ${{ fromJson(needs.Authorization.outputs.args).args3 }}
52+
53+
Job-trigger:
54+
name: Start ci job
55+
needs: [Authorization]
56+
runs-on: blossom
57+
steps:
58+
- name: Start ci job
59+
run: blossom-ci
60+
env:
61+
OPERATION: 'START-CI-JOB'
62+
CI_SERVER: ${{ secrets.CI_SERVER }}
63+
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
64+
65+
Upload-Log:
66+
name: Upload log
67+
runs-on: blossom
68+
if : github.event_name == 'workflow_dispatch'
69+
steps:
70+
- name: Jenkins log for pull request ${{ fromJson(github.event.inputs.args).pr }} (click here)
71+
run: blossom-ci
72+
env:
73+
OPERATION: 'POST-PROCESSING'
74+
CI_SERVER: ${{ secrets.CI_SERVER }}
75+
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
76+

0 commit comments

Comments
 (0)