Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2.2.2 #210

Merged
merged 60 commits into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from 59 commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
f25d666
Update PR template
maysunfaisal Sep 5, 2023
36607c5
Merge pull request #180 from maysunfaisal/update-pr-template-1
maysunfaisal Oct 19, 2023
3d5e045
Add test cases highlighting the issue and expectations
rm3l Oct 24, 2023
fd5fccb
Do not make any assumption on the file name when parsing
rm3l Oct 24, 2023
b2cc784
Clarify and test the `DevfileObj.WriteYamlDevfile` behavior
rm3l Oct 24, 2023
5d30522
Clarify the README doc
rm3l Oct 24, 2023
b03c9af
Revert "Do not make any assumption on the file name when parsing"
rm3l Oct 31, 2023
4fa9a83
For backward compatibility, make sure to handle the case where a cont…
rm3l Oct 31, 2023
523a229
Enhance parser unit tests to check which file was parsed
rm3l Oct 31, 2023
a03659a
Add more test cases to check the priority order when searching for de…
rm3l Oct 31, 2023
728befe
Clarify the documentation of `ParserArgs.Path`
rm3l Oct 31, 2023
57a7da8
Make the parser able to parse any file (including files with .yml ext…
rm3l Nov 2, 2023
1ecedb3
typo fix
Jdubrick Nov 6, 2023
be9dafe
Merge pull request #188 from Jdubrick/typo-fixes
Jdubrick Nov 6, 2023
11c85d0
Update k8s.io and sigs.k8s.io direct dependencies (#187)
thepetk Nov 7, 2023
208f9d6
Implement Interface definition for DownloadInMemory
maysunfaisal Nov 17, 2023
ab4c336
Add tests and token support for YAML parser from URL
maysunfaisal Nov 20, 2023
f5ed8c8
Update README and document how to use devfile utils client
maysunfaisal Nov 20, 2023
f978ca4
Update Test log
maysunfaisal Nov 20, 2023
e80b7a6
update owners (#190)
michael-valdron Nov 23, 2023
59df524
Format README
maysunfaisal Nov 27, 2023
38de98b
Merge pull request #189 from maysunfaisal/1221-1
maysunfaisal Nov 27, 2023
6d21f37
Add ability to use mock without passing in arguments
maysunfaisal Nov 28, 2023
0f5ade0
If no token is passed, dont mock output
maysunfaisal Nov 29, 2023
b1f8465
Update test to call mock func without mock data
maysunfaisal Nov 30, 2023
c1944d6
Use a Github URL in test to test mock implementation condition
maysunfaisal Nov 30, 2023
20a0c91
Merge pull request #191 from maysunfaisal/update-devfile-mock-util-1
maysunfaisal Nov 30, 2023
c36a9fa
Update mock to test devfile with private parent
maysunfaisal Dec 5, 2023
10a737a
Add tests for the mock implementation
maysunfaisal Dec 5, 2023
705f00d
Merge pull request #192 from maysunfaisal/update-mock-2
maysunfaisal Dec 6, 2023
2d911ec
update release schedule
yangcao77 Dec 12, 2023
9a4f78b
Merge pull request #193 from yangcao77/update-contributing-guide
yangcao77 Dec 12, 2023
1dd5569
add exemption list and best practices badge
Jdubrick Dec 22, 2023
4821a63
Merge pull request #194 from Jdubrick/cncf-cleaner-tasks
Jdubrick Dec 22, 2023
5d0e5e5
Introduce err code for user error in devfile
maysunfaisal Jan 5, 2024
1cf624e
add openssf scorecard workflow
Jdubrick Jan 2, 2024
a29857a
update checkout version and set pr trigger
Jdubrick Jan 3, 2024
f93c894
Merge pull request #195 from devfile/Jdubrick-cleaner-tasks
Jdubrick Jan 5, 2024
f7f6ae7
add badge to readme
Jdubrick Jan 8, 2024
91a1eb2
Add new tests to increase coverage
maysunfaisal Jan 8, 2024
3d259fa
Merge pull request #196 from maysunfaisal/update-err-codes-1
maysunfaisal Jan 8, 2024
2a1d045
Merge pull request #197 from Jdubrick/scorecard-addition
Jdubrick Jan 8, 2024
eefdbd3
Add Functionality For Multiple Devfile Name Variations (#198)
Jdubrick Feb 22, 2024
9b0873b
Implement SECURITY-Insights.md (#199)
thepetk Mar 1, 2024
002b102
Add distribution-points to security-insights (#200)
thepetk Mar 5, 2024
440e9bd
go 1.19
michael-valdron Mar 7, 2024
19de388
use go version under go.mod for setting up go in workflows
michael-valdron Mar 7, 2024
a72c445
refactor out ioutil package
michael-valdron Mar 8, 2024
1cb7d3d
update license headers
michael-valdron Mar 8, 2024
acac033
update github.com/spf13/afero dependency
michael-valdron Mar 8, 2024
0444b09
address security alerts
michael-valdron Mar 8, 2024
d7335ee
add TestIsValidProjectDir
michael-valdron Mar 8, 2024
1507864
update docs
michael-valdron Mar 8, 2024
d6f74c0
Merge pull request #203 from michael-valdron/golang-1-19
michael-valdron Mar 11, 2024
9877575
Bump github.com/go-git/go-git/v5 from 5.4.2 to 5.11.0 (#202)
dependabot[bot] Mar 11, 2024
80c2c92
Bump github.com/docker/docker from 20.10.11+incompatible to 25.0.1+in…
dependabot[bot] Mar 11, 2024
d3c2770
Bump github.com/cloudflare/circl from 1.3.3 to 1.3.7 (#207)
dependabot[bot] Mar 11, 2024
44ca18d
add support for 2.2.1 and 2.2.2 schema versions (#208)
Jdubrick Mar 15, 2024
1d563eb
Prepare for v2.2.2 release (#209)
Jdubrick Mar 28, 2024
0903393
add write permission for sarif file (#211)
Jdubrick Apr 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .clomonitor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#
# Copyright Red Hat
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# CLOMonitor metadata file
# This file must be located at the root of the repository

# Checks exemptions
exemptions:
- check: license_scanning # Check identifier (see https://github.com/cncf/clomonitor/blob/main/docs/checks.md#exemptions)
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)
- check: artifacthub_badge
reason: "This repository has no items that should be added to Artifact Hub."
17 changes: 17 additions & 0 deletions .codecov.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
#
# Copyright Red Hat
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# See http://docs.codecov.io/docs/coverage-configuration
coverage:
precision: 2 # 2 = xx.xx%, 0 = xx%
Expand Down Expand Up @@ -29,6 +44,8 @@ coverage:
- "vendor/*"
- "Makefile"
- ".travis.yml"
- "pkg/devfile/parser/util/mock.go"
- "pkg/util/mock.go"

# See http://docs.codecov.io/docs/pull-request-comments-1
comment:
Expand Down
20 changes: 11 additions & 9 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@
<!-- _Link to github issue(s)_ -->

### PR acceptance criteria:
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.
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.

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


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

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

- [ ] Documentation
- [ ] Documentation (READMEs, Product Docs, Blogs, Education Modules, etc.)

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

- [ ] Client Impact

Expand Down
20 changes: 19 additions & 1 deletion .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,26 @@
#
# Copyright Red Hat
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Code Coverage Report
on:
push:
branches:
- main

# Declare default permissions as read only.
permissions: read-all

jobs:
build-and-deploy:
runs-on: ubuntu-20.04
Expand All @@ -14,7 +32,7 @@ jobs:
- name: Set up Go 1.x
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version: 1.19
go-version-file: 'go.mod'
- name: Run tests
run: make test
- name: Codecov
Expand Down
25 changes: 21 additions & 4 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
#
# Copyright Red Hat
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Validate PRs

on:
Expand All @@ -6,22 +20,25 @@ on:
pull_request:
branches: [ main ]

# Declare default permissions as read only.
permissions: read-all

jobs:

build:
name: Build
runs-on: ubuntu-latest
steps:

- name: Check out code into the Go module directory
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3

- name: Setup Go environment
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version: 1.19
go-version-file: 'go.mod'
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3

- name: Check go mod status
run: |
make gomod_tidy
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/proxy-warming.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
#
# Copyright Red Hat
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Renew documentation

on:
Expand All @@ -7,6 +21,9 @@ on:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'

# Declare default permissions as read only.
permissions: read-all

jobs:
build:
name: Renew documentation
Expand Down
83 changes: 83 additions & 0 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
#
# Copyright Red Hat
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# This workflow uses actions that are not certified by GitHub. They are provided
# by a third-party and are governed by separate terms of service, privacy
# policy, and support documentation.

name: Scorecard supply-chain security
on:
# For Branch-Protection check. Only the default branch is supported. See
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
branch_protection_rule:
pull_request:
branches: [ "main" ]

# Declare default permissions as read only.
permissions: read-all

jobs:
analysis:
name: Scorecard analysis
runs-on: ubuntu-latest
permissions:
# Needed to upload the results to code-scanning dashboard.
security-events: write
# Needed to publish results and get a badge (see publish_results below).
id-token: write
# Uncomment the permissions below if installing in a private repository.
# contents: read
# actions: read

steps:
- name: "Checkout code"
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
with:
persist-credentials: false

- name: "Run analysis"
uses: ossf/scorecard-action@e38b1902ae4f44df626f11ba0734b14fb91f8f86 # v2.1.2
with:
results_file: results.sarif
results_format: sarif
# (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
# - you want to enable the Branch-Protection check on a *public* repository, or
# - you are installing Scorecard on a *private* repository
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat.
# repo_token: ${{ secrets.SCORECARD_TOKEN }}

# Public repositories:
# - Publish results to OpenSSF REST API for easy access by consumers
# - Allows the repository to include the Scorecard badge.
# - See https://github.com/ossf/scorecard-action#publishing-results.
# For private repositories:
# - `publish_results` will always be set to `false`, regardless
# of the value entered here.
publish_results: true

# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0
with:
name: SARIF file
path: results.sarif
retention-days: 5

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@17573ee1cc1b9d061760f3a006fc4aac4f944fd5 # v2.2.4
with:
sarif_file: results.sarif
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ main
# File created running tests
tests/**/tmp/
tests/v2/lib-test-coverage.*
*resource.file*


# Mac related files
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ contribution. See the [DCO](./DCO) file for details.
The following are required to work on devfile library:

- Git
- Go 1.15 or later
- Go 1.19 or later

## Code of Conduct
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)
Expand All @@ -29,7 +29,7 @@ If you spot a problem with devfile library, [search if an issue already exists](

### Writing Code

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.
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.

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

### Releases

Currently devfile library does not have schedule for new releases. A new version is being generated and released on demand.
Currently devfile library publish new releases annually. A new version can also be generated and released on demand.
A new branch is expected to be created for a new release.
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
15 changes: 15 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
#
# Copyright Red Hat
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

FILES := main

default: bin
Expand Down
8 changes: 3 additions & 5 deletions OWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@
approvers:
- amisevsk
- elsony
- Jdubrick
- michael-valdron
- thepetk
- feloy
- rm3l

reviewers:
- elsony
- Jdubrick
- michael-valdron
- thepetk
- feloy
- rm3l
- thepetk
Loading
Loading