Skip to content

Commit c4383df

Browse files
authored
Merge pull request #210 from devfile/main
v2.2.2
2 parents 6aa1b83 + 0903393 commit c4383df

File tree

129 files changed

+7391
-1523
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+7391
-1523
lines changed

.clomonitor.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#
2+
# Copyright Red Hat
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
# CLOMonitor metadata file
17+
# This file must be located at the root of the repository
18+
19+
# Checks exemptions
20+
exemptions:
21+
- check: license_scanning # Check identifier (see https://github.com/cncf/clomonitor/blob/main/docs/checks.md#exemptions)
22+
reason: "There are currently no plans moving forward to implement FOSSA or Snyk for scanning purposes." # Justification of this exemption (mandatory, it will be displayed on the UI)
23+
- check: artifacthub_badge
24+
reason: "This repository has no items that should be added to Artifact Hub."

.codecov.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
#
2+
# Copyright Red Hat
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
116
# See http://docs.codecov.io/docs/coverage-configuration
217
coverage:
318
precision: 2 # 2 = xx.xx%, 0 = xx%
@@ -29,6 +44,8 @@ coverage:
2944
- "vendor/*"
3045
- "Makefile"
3146
- ".travis.yml"
47+
- "pkg/devfile/parser/util/mock.go"
48+
- "pkg/util/mock.go"
3249

3350
# See http://docs.codecov.io/docs/pull-request-comments-1
3451
comment:

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,16 @@
55
<!-- _Link to github issue(s)_ -->
66

77
### PR acceptance criteria:
8-
Testing and documentation do not need to be complete in order for this PR to be approved. We just need to ensure tracking issues are opened.
8+
Testing and documentation do not need to be complete in order for this PR to be approved. We just need to ensure tracking issues are opened and linked to this PR, if they are not in the PR scope due to various constraints.
99

10-
> - Open new test/doc issues under the [devfile/api](https://github.com/devfile/api/issues) repo
11-
> - Check each criteria if:
12-
> - There is a separate tracking issue. Add the issue link under the criteria
13-
> **or**
14-
> - test/doc updates are made as part of this PR
15-
> - If unchecked, explain why it's not needed
10+
<!--
11+
- Open new test/doc issues under the [devfile/api](https://github.com/devfile/api/issues) repo
12+
- Check each criteria if:
13+
- There is a separate tracking issue. Add the issue link under the criteria
14+
**or**
15+
- test/doc updates are made as part of this PR
16+
- If unchecked, explain why it's not needed
17+
-->
1618

1719

1820
- [ ] Unit/Functional tests
@@ -23,9 +25,9 @@ Testing and documentation do not need to be complete in order for this PR to be
2325

2426
<!-- _Do we need to verify integration with ODO and Openshift console?_ -->
2527

26-
- [ ] Documentation
28+
- [ ] Documentation (READMEs, Product Docs, Blogs, Education Modules, etc.)
2729

28-
<!-- _This includes product docs and READMEs._ -->
30+
<!-- _This includes READMEs, Product Docs, Blogs, Education Modules, etc._ -->
2931

3032
- [ ] Client Impact
3133

.github/workflows/codecov.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,26 @@
1+
#
2+
# Copyright Red Hat
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
115
name: Code Coverage Report
216
on:
317
push:
418
branches:
519
- main
20+
21+
# Declare default permissions as read only.
22+
permissions: read-all
23+
624
jobs:
725
build-and-deploy:
826
runs-on: ubuntu-20.04
@@ -14,7 +32,7 @@ jobs:
1432
- name: Set up Go 1.x
1533
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
1634
with:
17-
go-version: 1.19
35+
go-version-file: 'go.mod'
1836
- name: Run tests
1937
run: make test
2038
- name: Codecov

.github/workflows/go.yml

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
#
2+
# Copyright Red Hat
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
115
name: Validate PRs
216

317
on:
@@ -6,22 +20,29 @@ on:
620
pull_request:
721
branches: [ main ]
822

9-
jobs:
23+
# Declare default permissions as read only.
24+
permissions: read-all
1025

26+
jobs:
27+
1128
build:
1229
name: Build
1330
runs-on: ubuntu-latest
31+
32+
permissions:
33+
security-events: write
34+
1435
steps:
1536

37+
- name: Check out code into the Go module directory
38+
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
39+
1640
- name: Setup Go environment
1741
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
1842
with:
19-
go-version: 1.19
43+
go-version-file: 'go.mod'
2044
id: go
2145

22-
- name: Check out code into the Go module directory
23-
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
24-
2546
- name: Check go mod status
2647
run: |
2748
make gomod_tidy

.github/workflows/proxy-warming.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
#
2+
# Copyright Red Hat
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
115
name: Renew documentation
216

317
on:
@@ -7,6 +21,9 @@ on:
721
tags:
822
- 'v[0-9]+.[0-9]+.[0-9]+'
923

24+
# Declare default permissions as read only.
25+
permissions: read-all
26+
1027
jobs:
1128
build:
1229
name: Renew documentation

.github/workflows/scorecard.yml

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
#
2+
# Copyright Red Hat
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
# This workflow uses actions that are not certified by GitHub. They are provided
17+
# by a third-party and are governed by separate terms of service, privacy
18+
# policy, and support documentation.
19+
20+
name: Scorecard supply-chain security
21+
on:
22+
# For Branch-Protection check. Only the default branch is supported. See
23+
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
24+
branch_protection_rule:
25+
pull_request:
26+
branches: [ "main" ]
27+
28+
# Declare default permissions as read only.
29+
permissions: read-all
30+
31+
jobs:
32+
analysis:
33+
name: Scorecard analysis
34+
runs-on: ubuntu-latest
35+
permissions:
36+
# Needed to upload the results to code-scanning dashboard.
37+
security-events: write
38+
# Needed to publish results and get a badge (see publish_results below).
39+
id-token: write
40+
# Uncomment the permissions below if installing in a private repository.
41+
# contents: read
42+
# actions: read
43+
44+
steps:
45+
- name: "Checkout code"
46+
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
47+
with:
48+
persist-credentials: false
49+
50+
- name: "Run analysis"
51+
uses: ossf/scorecard-action@e38b1902ae4f44df626f11ba0734b14fb91f8f86 # v2.1.2
52+
with:
53+
results_file: results.sarif
54+
results_format: sarif
55+
# (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
56+
# - you want to enable the Branch-Protection check on a *public* repository, or
57+
# - you are installing Scorecard on a *private* repository
58+
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat.
59+
# repo_token: ${{ secrets.SCORECARD_TOKEN }}
60+
61+
# Public repositories:
62+
# - Publish results to OpenSSF REST API for easy access by consumers
63+
# - Allows the repository to include the Scorecard badge.
64+
# - See https://github.com/ossf/scorecard-action#publishing-results.
65+
# For private repositories:
66+
# - `publish_results` will always be set to `false`, regardless
67+
# of the value entered here.
68+
publish_results: true
69+
70+
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
71+
# format to the repository Actions tab.
72+
- name: "Upload artifact"
73+
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0
74+
with:
75+
name: SARIF file
76+
path: results.sarif
77+
retention-days: 5
78+
79+
# Upload the results to GitHub's code scanning dashboard.
80+
- name: "Upload to code-scanning"
81+
uses: github/codeql-action/upload-sarif@17573ee1cc1b9d061760f3a006fc4aac4f944fd5 # v2.2.4
82+
with:
83+
sarif_file: results.sarif

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ main
2424
# File created running tests
2525
tests/**/tmp/
2626
tests/v2/lib-test-coverage.*
27+
*resource.file*
2728

2829

2930
# Mac related files

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ contribution. See the [DCO](./DCO) file for details.
1616
The following are required to work on devfile library:
1717

1818
- Git
19-
- Go 1.15 or later
19+
- Go 1.19 or later
2020

2121
## Code of Conduct
2222
Before contributing to this repository, see [contributor code of conduct](https://github.com/devfile/api/blob/main/CODE_OF_CONDUCT.md#contributor-covenant-code-of-conduct)
@@ -29,7 +29,7 @@ If you spot a problem with devfile library, [search if an issue already exists](
2929

3030
### Writing Code
3131

32-
For writing the code just follow [Go guide](https://go.dev/doc/effective_go), and also test with [tesing](https://pkg.go.dev/testing). Remember to add new unit tests if new features have been introducted, or changes have been made to existing code. If there is something unclear of the style, just look at existing code which might help you to understand it better.
32+
For writing the code just follow [Go guide](https://go.dev/doc/effective_go), and also test with [testing](https://pkg.go.dev/testing). Remember to add new unit tests if new features have been introducted, or changes have been made to existing code. If there is something unclear of the style, just look at existing code which might help you to understand it better.
3333

3434
### Testing Changes
3535
To run unit tests and api tests. Visit [library tests](tests/README.md) to find out more information on tests
@@ -69,6 +69,6 @@ Running the script with no arguments will default to update the latest devfile v
6969

7070
### Releases
7171

72-
Currently devfile library does not have schedule for new releases. A new version is being generated and released on demand.
72+
Currently devfile library publish new releases annually. A new version can also be generated and released on demand.
7373
A new branch is expected to be created for a new release.
7474
To generate a changelog for a new release, execute `./scripts/changelog-script.sh v2.x.y` for all the changes since the release v2.x.y

Makefile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
#
2+
# Copyright Red Hat
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
116
FILES := main
217

318
default: bin

OWNERS

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,12 @@
33
approvers:
44
- amisevsk
55
- elsony
6+
- Jdubrick
67
- michael-valdron
78
- thepetk
8-
- feloy
9-
- rm3l
109

1110
reviewers:
1211
- elsony
12+
- Jdubrick
1313
- michael-valdron
14-
- thepetk
15-
- feloy
16-
- rm3l
14+
- thepetk

0 commit comments

Comments
 (0)