Skip to content

Commit a5e3711

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

File tree

1 file changed

+77
-0
lines changed

1 file changed

+77
-0
lines changed

.github/workflows/blossom-ci.yml

+77
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
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+
- name: Run blossom action
31+
uses: NVIDIA/blossom-action@main
32+
env:
33+
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34+
REPO_KEY_DATA: ${{ secrets.BLOSSOM_KEY }}
35+
with:
36+
args1: ${{ fromJson(needs.Authorization.outputs.args).args1 }}
37+
args2: ${{ fromJson(needs.Authorization.outputs.args).args2 }}
38+
args3: ${{ fromJson(needs.Authorization.outputs.args).args3 }}
39+
# repo specific steps
40+
#- name: Setup java
41+
# uses: actions/setup-java@v1
42+
# with:
43+
# java-version: 1.8
44+
45+
# add blackduck properties https://synopsys.atlassian.net/wiki/spaces/INTDOCS/pages/631308372/Methods+for+Configuring+Analysis#Using-a-configuration-file
46+
#- name: Setup blackduck properties
47+
# run: |
48+
# PROJECTS=$(mvn -am dependency:tree | grep maven-dependency-plugin | awk '{ out="com.nvidia:"$(NF-1);print out }' | grep rapids | xargs | sed -e 's/ /,/g')
49+
# echo detect.maven.build.command="-pl=$PROJECTS -am" >> application.properties
50+
# echo detect.maven.included.scopes=compile >> application.properties
51+
52+
53+
54+
Job-trigger:
55+
name: Start ci job
56+
needs: [Authorization]
57+
runs-on: blossom
58+
steps:
59+
- name: Start ci job
60+
run: blossom-ci
61+
env:
62+
OPERATION: 'START-CI-JOB'
63+
CI_SERVER: ${{ secrets.CI_SERVER }}
64+
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
65+
66+
Upload-Log:
67+
name: Upload log
68+
runs-on: blossom
69+
if : github.event_name == 'workflow_dispatch'
70+
steps:
71+
- name: Jenkins log for pull request ${{ fromJson(github.event.inputs.args).pr }} (click here)
72+
run: blossom-ci
73+
env:
74+
OPERATION: 'POST-PROCESSING'
75+
CI_SERVER: ${{ secrets.CI_SERVER }}
76+
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
77+

0 commit comments

Comments
 (0)