Skip to content

Experimental: modified version of Kambui Nurse's spectral package#2450

Merged
shykes merged 1 commit into
dagger:mainfrom
shykes:x-spectral
May 18, 2022
Merged

Experimental: modified version of Kambui Nurse's spectral package#2450
shykes merged 1 commit into
dagger:mainfrom
shykes:x-spectral

Conversation

@shykes
Copy link
Copy Markdown
Contributor

@shykes shykes commented May 13, 2022

No description provided.

@shykes shykes requested review from helderco and jpadams as code owners May 13, 2022 22:09
@shykes
Copy link
Copy Markdown
Contributor Author

shykes commented May 13, 2022

cc @Siafu @jpadams

@jpadams
Copy link
Copy Markdown
Contributor

jpadams commented May 13, 2022

@shykes made PR against your repo with lint fix. Let me know if that element is necessary.


// Location of JSON/YAML documents.
// Can be either a file, a glob or fetchable resource(s) on the web.
// Example: ["*.json", "*.yaml", "https://github.com/dagger/dagger/docker-compose.yaml"]
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

note @Siafu I was wrong, spectral supports globs natively, no shell expansion necessary

}
// Ugly hack to override the entrypoint from the default image
// FIXME: how do we tuck this into the scope of the default image?
entrypoint: []
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Any ideas @helderco ?

Copy link
Copy Markdown
Contributor

@helderco helderco May 14, 2022

Choose a reason for hiding this comment

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

You can use docker.#Set to override the default image.

_buildDefaultImage: docker.#Build & {
    steps: [
        docker.#Pull & {
            source: "stoplight/spectral"
        },
        docker.#Set & {
            config: entrypoint: []
        },
    ]
}

Copy link
Copy Markdown
Member

@TomChv TomChv left a comment

Choose a reason for hiding this comment

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

That's a complete package, nice work 🚀

Comment thread pkg/universe.dagger.io/x/solomon@dagger.io/spectral/lint.cue
@shykes
Copy link
Copy Markdown
Contributor Author

shykes commented May 16, 2022

EDIT: I am no longer stuck. There was a glitch in the Github UI which hid the "arrow" to expand the logs around the error. Thanks to everyone who helped me on discord :)

I'm stuck on a cue lint error... I've updated my branch with cue fmt -s everywhere (forgot to lint the tests...) but still getting an error.

  • I can't reproduce the error locally with dagger do lint cue (does anyone use this?)
  • The CI job here offers no detail of the actual error...

So I'm stuck. Any help would be appreciated :)

Signed-off-by: Solomon Hykes <solomon@dagger.io>
@shykes
Copy link
Copy Markdown
Contributor Author

shykes commented May 17, 2022

Spare an approval @jpadams @helderco ? :)

Copy link
Copy Markdown
Contributor

@jpadams jpadams left a comment

Choose a reason for hiding this comment

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

LGTM!

@shykes shykes merged commit 35390b0 into dagger:main May 18, 2022
@shykes
Copy link
Copy Markdown
Contributor Author

shykes commented May 18, 2022

Thanks all!

@jpadams
Copy link
Copy Markdown
Contributor

jpadams commented May 18, 2022

out

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.

4 participants