With this change, the work done for local development, and the per-PR netlify preview changes:
It will no longer include the website stuff for versions other than edge, the current working tree.
We thus save us the time, and the flakiness, involved with
- checking if github has release binaries for all the versions
- checking out their sources
- fetching the release binaries to pre-hydrate old versions' live-blocks.
The previously-used, documented make target should still be intact.
Fixes#4379 to some extent, I hope.
* docs/website: remove "latest" binary from opa versions cache
Having a stale binary here -- one called "latest" but not actually
being "latest" -- causes issues like this: when building the website
content for the (real) latest version, the script would take the
old (previous-latest) binary, and fail because that binary didn't
know the latest future keywords.
Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
- Added two more community champions
- Removed enterprise support from community page
- Changed blurry line to solid line
- Updated newsletter signup from Medium to Mailchimp
- add hugo lock to gitignore
Signed-off-by: Peter ONeill <peteroneilljr@gmail.com>
With this change, we should get both a /docs/v0.36.1 and a /docs/latest
in our deployed docs.
Before, the symlink would have made hugo only build a /docs/latest,
but not the other link.
Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
* website: bump hugo, updated templates
For some reason, the "and" trick to step around undefined values no longer
worked. So now, we're wrapping {{ if }} conditionals instead: the outer one
checks that the value is defined, the inner one asserts something on its
value.
* live-blocks/preprocess: add wrapper div, remove newline
Somewhere between 0.55 and the most recent version, Hugo stopped emitting
that div on purpose for languages it didn't know.
Since we depend on it for further processing, we're adding it back.
Also, a trailing newline for code elements was introduced, and that broke
our codemirrors integration -- every code entry would be folllowed by an
empty line. Now, we're removing that in the same preprocess step.
* website: fix info|danger blocks
* website/config: trust markdown to include html
Fixes#3787.
Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
The website deployment takes longer than it has to because we're
checking for binaries we don't really care about: those predating
the website, and those of release candidates.
Now, we'll only curl for those we don't skip.
Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
* website/scripts/load-docs.sh: less verbose output
1. Less output: the tag semver ordering isn't something we work
on daily, so let's silence that.
2. Use 'git archive' and tar, not a checkout:
this way, we don't mess up the working directory or reflog. It
should also be faster, since we don't end up writing all the
vendor files, binary blobs, etc to disk.
3. Make the 'latest' symlink relative.
* scripts/live-blocks/inject: run preprocess with max allowed args
Before, when attempting to do this, I had used
find ... -exec npm run preprocess {} +
and find had determined what the maximum number of allowed command
line args were, and executed that call in batches of those. `npm`,
however, would have prepended the call with its own args, thereby
exceeding the limit.
As a way out, we had used `xargs -n200`, to preprocess the files
in batches of 200 at a time.
Now, we're telling `find` the exact command needed, bypassing the
package.json helper definition.
Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
Changing 4.0.0 -> 4.0.1 of rollup-postcss-plugin, `npm install` reports:
added 6 packages, removed 187 packages, changed 37 packages, and audited 482 packages in 4s
Not bad for a patch release. I think all traces of nth-check 1.x.y in
live-blocks should be gone now.
Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
With more and more version appearing, the argument count passed to the
`npm run` call through the shell glob had increased, too -- to a point
where execution was impossible because it had reached a hard limit.
The obvious fix would have been to use `find [...] -exec cmd {} +` or
`find [...] -print0 | xargs -0 cmd`, however, since the npm call builds
another command line that's executed, we'd step over that limit again.
So instead, we'll now run the npm script on batches of 200 files. It's
below the maximum (unclear what it is, I haven't dug that deep), and
still fast enough (running it file-by-file takes 15+minutes).
Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
golint is deprecated. The author of the code no longer supports the
codebase. golangci-lint is faster than golint, and is in use by other
opa repositories (e.g. Gatekeeper).
This commit changes tools.go to reference golangci (so it ends up in
vendor) and modifies check-lint to use golangci instead.
Breaking API Changes:
- plugins/rest/rest.go: Fix typo "AllowInsureTLS" -> "AllowInsecureTLS"
- storage/errors.go: Removed unused IndexingNotSupportedErr
Signed-off-by: Will Beason <willbeason@google.com>
Should fix annoying dependabot warning.
Live blocks functionality tested with make serve-local and
remotely using Netlify. Both seems to work as before.
Signed-off-by: Anders Eknert <anders@eknert.com>
Using `npm audit fix` update dependencies of the live-blocks tooling.
This corrects all severe ones that can be corrected without pulling
library versions that include breaking changes.
Signed-off-by: Patrick East <east.patrick@gmail.com>
Any release tag with a `rc` string in the the semver
will be ignored for the docs on the website and will _not_ update the
"latest" docker image tag, or "latest" downloads url.
Signed-off-by: Patrick East <east.patrick@gmail.com>
There is a known security issue with the older version. Updating to
the latest mitigates the risk.
Signed-off-by: Patrick East <east.patrick@gmail.com>
This was changed as part of the homepage rework but ended up being
both unused and broken.. so reverting it back to the way it was
before.
The live blocks on the home page are not interactive, so this works
out fine as-is. In the future we may need to revisit.
Signed-off-by: Patrick East <east.patrick@gmail.com>
The playground changed to just return a null result rather than
returning a 4xx error for the response. We need to catch this case
and raise the expected OPAError in the live blocks scripts to keep
the UI behavior the same.
Signed-off-by: Patrick East <east.patrick@gmail.com>
This adds in a the HTML view for the integrations.yaml and by having
hugo generate content at build time. It ends up being at the
`/docs/<version/ecosystem` url and there are links to it on the home
page, introduction page, and nav bar under the Misc category.
In future iterations we can add in sorting/filtering etc. It currently
just shows all of them.
Signed-off-by: Patrick East <east.patrick@gmail.com>
The integration index is a collection of OPA integrations, including
metadata with pointers to code, tutorials, blogs, videos, etc.
This change is a first step in the creation of that integration index.
Signed-off-by: Tim Hinrichs <tim@styra.com>
This changes to no longer download the `edge` release binary (we still
publish one for anyone who wants to use the current master). This way
for PR's and for development we are going to process the `edge`
documentation with the version of OPA that is the current HEAD. For
the live site this will always be the current master branch.
Signed-off-by: Patrick East <east.patrick@gmail.com>
As of now the "edge" docs have a newer standardized format for output.
The preprocessing step for live-blocks needed to be updated to handle
parsing it.
Signed-off-by: Patrick East <east.patrick@gmail.com>
This commit updates the introduction page to focus on Rego and
integrating with OPA (whereas the old introduction content focused on
high-level concepts like policy-decoupling, the data document, etc.)
The new introduction content provides a concise overview of OPA and
then launches into an tour of Rego (by example) that shows the core
concepts in the language. The content ends with an overview of
different ways you can interact with OPA.
The old introduction content has been moved into the Philosophy page
and the How Does OPA Work? page has been removed/replaced by the new
introduction page.
With these changes we can update the frontpage with links to core OPA
introduction and then different use cases (e.g., Kubernetes, Envoy,
etc.)
Signed-off-by: Torin Sandall <torinsandall@gmail.com>
Instead of using url rewriting tricks we will just copy the latest
docs as part of the build process for a "latest" version.
In the version selector code we need to handle this to hide the
version, but overall it simplifies the template code.. so thats nice.
Best part, and main reason for doing this, is that the pretty url
feature will now work on the `/docs/latest/*` urls. It will fix some
weirdness with the relative url links we use in the markdown content
and remove a duplicate search result.
Signed-off-by: Patrick East <east.patrick@gmail.com>
This lets us simplify some of the code and there isn't really a great
reason to keep the older docs up at this point.
Signed-off-by: Patrick East <east.patrick@gmail.com>