Create paketo builder based on another - spring-boot

Spring boot maven plugin is using paketo builder to build images.
gcr.io/paketo-buildpacks/builder:base-platform-api-0.3
What I would like to do is to add another step to what is being done by this builder.
I've created my own buildpack and tried to create builder with base buildpacks included.
builder.toml
...
...
[[buildpacks]]
image = "my-own-buildpack"
[[buildpacks]]
image = "gcr.io/paketo-buildpacks/builder:base-platform-api-0.3"
...
First problem that I'm having is this error when trying to create a builder out of builder.toml:
ERROR: failed to add buildpacks to builder: extracting buildpacks from gcr.io/paketo-buildpacks/builder:base-platform-api-0.3: could not find label io.buildpacks.buildpackage.metadata
Another problem is that even if that worked I guess I would still have to specify all order.group from paketo:base.
Is there actually a way to create a builder out of paketo-buildpacks/builder without going into details of what is happening inside?

At the moment, I do not believe there's a way to "extend" a builder. There is a Github issue open against the buildpacks spec though to add a feature like this. See here.
One option is to fully copy the builder.toml for the builder that you wish to extend. Then edit/modify it and create a new builder. This can be tricky as the builder.toml's are not, at the time I write this, published anywhere that's easy to find and copy them.
One alternative, which is probably closer to what you want anyway, is to make use of meta CNBs (a meta CNB is a collection of buildpacks). If you reference a meta CNB in the buildpacks section of your builder.toml, it will pull in all referenced buildpacks. You can then define your own custom order.
Ex:
[[buildpacks]]
id = "paketo-buildpacks/node-engine"
image = "gcr.io/paketo-buildpacks/node-engine:0.1.1"
[[buildpacks]]
id = "paketo-buildpacks/java"
image = "gcr.io/paketo-buildpacks/java:3.1.0"
[[order]]
[[order.group]]
id = "paketo-buildpacks/node-engine"
version = "0.1.1"
[[order.group]]
id = "paketo-buildpacks/java"
version = "3.1.0"
[stack]
id = "io.buildpacks.stacks.bionic"
build-image = "gcr.io/paketo-buildpacks/build:base-cnb"
run-image = "gcr.io/paketo-buildpacks/run:base-cnb"
This example would add the node-engine CNB and make it run before the Java meta CNB. You could alternatively make it run after the Java meta CNB, or even define a custom order as you can reference the buildpack id/version of buildpacks included by your version of the meta CNB in the order groups.

Related

How to add gradle dependency when buildFeature.compose = true?

Each time when a module needs enabled compose I have to do the following steps:
android.buildFeatures.compose = true
add a set of dependencies androidx.compose.xxx
I have a common build script and now I want to simplify usage of compose in my modules.
I would like to simplify that process by automatically add all compose dependencies if child module enables compose by android.buildFeatures.compose = true
How can I do it?
Something like this is done in the Now in android example app. They are using gradle plugins to do that, you can see common logic for all jetpack compose modules here: AndroidCompose.kt. There is a readme that explains it pretty well.

FilePond A11Y questions

I know that FilePond advertises itself as accessible, and I see some aria attributes on the underlying that is created...but I can't see quite how to add any additional a11y-related props (e.g., aria-invalid), nor how to control what is added automatically (e.g., having aria-labelledby reference any label or error information that might be a part of my implementation of a file upload field).
I have tried passing additional props to the existing React adapter, as well as making a copy of the existing React adapter locally in my project and trying to set additional properties on the rendered input (which I assume means that somewhere in the bowels of the more generic FilePond project, it really just uses that input field as a reference, and then creates its own instead?).
I would love to learn that I am just missing something existing in the API - but alternately I have also filed an issue on the project github in case this is just an issue with the existing implementation (or possibly even morphs into a feature request).
From the project owner:
"Hi, Yes all internals are managed by FilePond and there's currently no way to dynamically add custom attributes to internal fields (apart from id / class)."

How to add prefix in URI while loading XQuery file using ml-gradle

I am using gradle 6.8 and MarkLogic version is 10.0-5.2,
My XQuery code is in directory \ml-gradle\src\main\common. When I run the command mlLoadModules to load XQuery into the modules database it loads with default URI /common/test.xqy.
I want to add some prefix to the URIs e.g. /rsc/common/test.xqy. How can I achieve that?
Note: I don't want to create an extra folder in my source for prefix "rsc".
It's not supported, though you could write a custom Gradle task to change the URI to whatever you like.
Why do you not want to create an "rsc" folder above "common"? I think other developers would find it much more intuitive that "rsc/common/test.xqy" becomes "/rsc/common/test.xqy" when loaded, rather than "common/test.xqy" becomes "rsc/common/test.xqy", which begs the question - where is "rsc" coming from? And then that developer would need to understand what property / custom code is adding that "rsc".

rails generate ckeditor:install --orm=active_record --backend=active_storag not worked Rails 5

I want to use in my project ckeditor with active storage, but when I generate to install ckeditor using orm active record and active storage, it create an initializer but not create any migration file.
Running via Spring preloader in process 23128
create config/initializers/ckeditor.rb
route mount Ckeditor::Engine => '/ckeditor'
Could not find "active_record/active_storage/ckeditor/asset.rb" in
any of your source paths. Your current source paths are:
/home/arif/Development/Test
Project/cable_test/lib/templates/ckeditor/install
/home/arif/.rvm/gems/ruby-2.4.2/gems/ckeditor-
4.1.3/lib/generators/ckeditor/templates
So I ran into this as well, and after poking around the code I figured I'd just run the generator without the flags like the docs. If you run into this problem just run the generator with no flags rails g ckeditor:install. Also, you'll need to look at these files and make sure your models match.
https://github.com/galetahub/ckeditor/tree/master/lib/generators/ckeditor/templates/active_record/active_storage/ckeditor
EDIT: It looks like active_storage is only available on the master branch as of this post.

Is it possible to get parameters of an unpublished plugin without querying the database directly?

Is there a Joomla 2.5.x API that would allow for retrieval of a plugin information(i.e. parameters) if the desired plugin is unpublished?
Why: We have a few plugins that are only enabled in production and I'm looking for a way to get at some of the parameters programmatically and without querying the database directly.
Try something like
$userPlugin = JPluginHelper::getPlugin('user', 'joomla'); // group, specific - optional
$userPluginParams = new JRegistry();
$userPluginParams->loadString($userPlugin->params); //get the string as a jregistry
$useStrongEncryption = $userPluginParams->get('strong_passwords', 0); // get the one you want.
Here's a workaround to make it not run but still able to get:
Okay how about this for a trick/workaround. Did you realize plugins have access levels? Why don't you create an access level with no one in it and assign to the plugin as the only level it runs for. Then you can publish it but it won't run.

Resources