Skip to content

Commit c3322d4

Browse files
authored
Merge pull request #208 from ruromero/external-api-spec
build: use the openapi data model from a dedicated repository
2 parents 7a9020f + ad5a19e commit c3322d4

File tree

20 files changed

+92
-1205
lines changed

20 files changed

+92
-1205
lines changed

.github/workflows/ci.yaml

Lines changed: 8 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -16,35 +16,15 @@ jobs:
1616
steps:
1717
- name: Checkout
1818
uses: actions/checkout@v3
19-
- name: Set up graalVM
20-
uses: graalvm/setup-graalvm@v1
19+
- name: Setup JDK
20+
uses: actions/setup-java@v3
2121
with:
22-
version: 'latest'
22+
distribution: 'temurin'
2323
java-version: '17'
24-
components: 'native-image'
25-
github-token: ${{ secrets.GITHUB_TOKEN }}
24+
cache: 'maven'
2625
- name: Run integration tests
2726
run: |
28-
./mvnw verify -Pnative
29-
openapi-lint-checks:
30-
runs-on: ubuntu-latest
31-
name: OpenAPI Linter
32-
steps:
33-
- name: Checkout
34-
uses: actions/checkout@v3
35-
- uses: actions/setup-node@v3
36-
with:
37-
node-version: 18
38-
- name: v3 Lint
39-
run: npx @redocly/cli lint api-spec/v3/openapi.yaml
40-
- name: v4 Lint
41-
run: npx @redocly/cli lint api-spec/v4/openapi.yaml
42-
openapi-validation:
43-
runs-on: ubuntu-latest
44-
name: Validate OpenAPI Spec
45-
steps:
46-
- uses: actions/checkout@v3
47-
- name: Validate OpenAPI definition
48-
uses: char0n/swagger-editor-validate@v1
49-
with:
50-
definition-file: api-spec/v3/openapi.yaml
27+
./mvnw -B verify -Pnative
28+
env:
29+
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/cicd.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,11 @@ jobs:
102102
cache: 'maven'
103103

104104
- name: Build Package with Maven
105-
run: mvn verify -Pnative
105+
run: |
106+
./mvnw -B verify -Pnative
107+
env:
108+
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
109+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
106110

107111
- name: Build Image With buildah
108112
id: build-image

.github/workflows/inform-cli.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.

.tekton/exhort-pull-request.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,22 @@ spec:
206206
workspaces:
207207
- name: source
208208
workspace: workspace
209+
- name: copy-settings
210+
runAfter:
211+
- clone-repository
212+
taskSpec:
213+
steps:
214+
- name: copy
215+
image: registry.access.redhat.com/ubi9/ubi-minimal:9.3
216+
script: |
217+
#!/bin/sh
218+
set -x
219+
cp $(workspaces.settings.path)/settings.xml $(workspaces.workspace.path)/source/settings.xml
220+
workspaces:
221+
- name: settings
222+
workspace: mvn-settings
223+
- name: workspace
224+
workspace: workspace
209225
- name: build-container
210226
params:
211227
- name: IMAGE
@@ -224,6 +240,7 @@ spec:
224240
value: $(tasks.clone-repository.results.commit)
225241
runAfter:
226242
- prefetch-dependencies
243+
- copy-settings
227244
taskRef:
228245
params:
229246
- name: name
@@ -374,6 +391,7 @@ spec:
374391
- name: workspace
375392
- name: git-auth
376393
optional: true
394+
- name: mvn-settings
377395
workspaces:
378396
- name: workspace
379397
volumeClaimTemplate:
@@ -389,4 +407,7 @@ spec:
389407
- name: git-auth
390408
secret:
391409
secretName: '{{ git_auth_secret }}'
410+
- name: mvn-settings
411+
secret:
412+
secretName: exhort-mvn-settings
392413
status: {}

.tekton/exhort-push.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,22 @@ spec:
200200
workspaces:
201201
- name: source
202202
workspace: workspace
203+
- name: copy-settings
204+
runAfter:
205+
- clone-repository
206+
taskSpec:
207+
steps:
208+
- name: copy
209+
image: registry.access.redhat.com/ubi9/ubi-minimal:9.3
210+
script: |
211+
#!/bin/sh
212+
set -x
213+
cp $(workspaces.settings.path)/settings.xml $(workspaces.workspace.path)/source/settings.xml
214+
workspaces:
215+
- name: settings
216+
workspace: mvn-settings
217+
- name: workspace
218+
workspace: workspace
203219
- name: build-container
204220
params:
205221
- name: IMAGE
@@ -218,6 +234,7 @@ spec:
218234
value: $(tasks.clone-repository.results.commit)
219235
runAfter:
220236
- prefetch-dependencies
237+
- copy-settings
221238
taskRef:
222239
params:
223240
- name: name
@@ -368,6 +385,7 @@ spec:
368385
- name: workspace
369386
- name: git-auth
370387
optional: true
388+
- name: mvn-settings
371389
workspaces:
372390
- name: workspace
373391
volumeClaimTemplate:
@@ -383,4 +401,7 @@ spec:
383401
- name: git-auth
384402
secret:
385403
secretName: '{{ git_auth_secret }}'
404+
- name: mvn-settings
405+
secret:
406+
secretName: exhort-mvn-settings
386407
status: {}

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@
33
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
44
[![CI](https://github.com/RHEcosystemAppEng/exhort/actions/workflows/ci.yaml/badge.svg?branch=main)](https://github.com/RHEcosystemAppEng/exhort/actions/workflows/ci.yaml)
55

6-
### Third party dependencies
7-
8-
- Snyk API
9-
- OSS Index
10-
116
## Required parameters
127

138
- `api.snyk.token` Snyk API token for default authentication
@@ -38,6 +33,11 @@ The following Package Managers are currently supported:
3833
- Go Modules (`gomodules`)
3934
- Pip (`pip`)
4035

36+
## Exhort API
37+
38+
Here you can find the [Exhort API Specification](https://github.com/RHEcosystemAppEng/exhort-api-spec) together with
39+
the Java and Javascript generated data model.
40+
4141
## Dependency Analysis `/api/v4/analysis`
4242

4343
The expected input data format is a Software Bill of Materials (SBOM) containing the aggregate of all direct and transitive

0 commit comments

Comments
 (0)