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

feat: support pkgfile frontend. #315

Merged
merged 1 commit into from
Nov 2, 2023

Conversation

frezbo
Copy link
Member

@frezbo frezbo commented Nov 2, 2023

This supports Pkgfile projects.

Targets can be set as below in .kres.yaml:

---
kind: pkgfile.Build
spec:
  targets:
    - toolchain
  reproducibleTargetName: toolchain
  additionalTargets:
    nonfree:
      - nonfree-kmod-nvidia-pkg

@@ -0,0 +1,83 @@
// This Source Code Form is subject to the terms of the Mozilla Public
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was split from dockerfile to dockerignore

@@ -22,6 +23,10 @@ import (

// DetectGolang checks if project at rootPath is Go-based project.
func (builder *builder) DetectGolang() (bool, error) {
if builder.meta.ContainerImageFrontend != config.ContainerImageFrontendDockerfile {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can short circuit early, also helps adding conditional checks in so many other places

if err != nil {
return false, err
}
list, err := listFilesWithSuffix(builder.rootPath, ".md")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was just cleanup, the previous code was wrapped in {}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it was wrapped for readability, probably unsuccessful attempt to make it more readable 😜

This supports `Pkgfile` projects.

Targets can be set as below in `.kres.yaml`:

```yaml
---
kind: pkgfile.Build
spec:
  targets:
    - toolchain
  reproducibleTargetName: toolchain
  additionalTargets:
    nonfree:
      - nonfree-kmod-nvidia-pkg
```

Signed-off-by: Noel Georgi <[email protected]>
@frezbo frezbo force-pushed the feat/support-pkgfile-frontend branch from 1eacef1 to 32170a7 Compare November 2, 2023 10:17
@frezbo
Copy link
Member Author

frezbo commented Nov 2, 2023

/m

@talos-bot talos-bot merged commit 32170a7 into siderolabs:main Nov 2, 2023
2 checks passed
@frezbo frezbo deleted the feat/support-pkgfile-frontend branch November 2, 2023 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants