tekton-integration
tekton-integration copied to clipboard
project.toml is not being recognized?
so /cnb/lifecycle/creator has the argument
-project-metadata string
path to project-metadata.toml (default "<layers>/project-metadata.toml")
which technically should support the project.toml file if I am not mistaken. Howevery no matter what I do - anything that I put inside this file has no effect on the buildpack. I'm using latest google buildpack builder
gcr.io/buildpacks/gcp/run@sha256:4c7a95e9f39fac91b12357b834c7aab723c14a75ba23b0a92a38ed01a7fb0fc8
my project.toml:
[[build.env]]
name = "GOOGLE_RUNTIME_VERSION"
value = "3.8.2"
yet when I run
/cnb/lifecycle/creator \
-app=/workspace/app/. \
-project-metadata=/workspace/app/project.toml \
-cache-dir=/cache \
-layers=/layers \
-platform=/platform \
-report=/layers/report.toml \
-cache-image="" \
-uid=1000 \
-gid=1000 \
-process-type=web \
-skip-restore=false \
-previous-image=xxx.dkr.ecr.us-west-2.amazonaws.com/vp/prod/backend:prod-b873a22 \
-run-image=xxx.dkr.ecr.us-west-2.amazonaws.com/vp/prod/buildpacks/google/runner:v1 \
xxx.dkr.ecr.us-west-2.amazonaws.com/vp/prod/backend:prod-b873a22
I always get 3.9.5
===> DETECTING
google.python.runtime 0.9.1
google.python.pip 0.9.2
google.config.entrypoint 0.9.0
google.utils.label 0.0.1
===> ANALYZING
Previous image with name "332927762005.dkr.ecr.us-west-2.amazonaws.com/vp/prod/backend:prod-b873a22" not found
===> RESTORING
===> BUILDING
=== Python - Runtime ([email protected]) ===
Installing Python v3.9.5
Upgrading pip to the latest version and installing build tools
I had to create a file in /platform/env/
$ cat /platform/env/GOOGLE_RUNTIME_VERSION
3.8.2
/cnb/lifecycle/creator \
-app=/workspace/app/. \
....
....
===> DETECTING
google.python.runtime 0.9.1
google.python.pip 0.9.2
google.config.entrypoint 0.9.0
google.utils.label 0.0.1
===> ANALYZING
Previous image with name "332927762005.dkr.ecr.us-west-2.amazonaws.com/vp/prod/backend:prod-b873a22" not found
===> RESTORING
===> BUILDING
=== Python - Runtime ([email protected]) ===
Using runtime version from GOOGLE_RUNTIME_VERSION: 3.8.2
Installing Python v3.8.2
Upgrading pip to the latest version and installing build tools
so how to make project.toml supported?
I saw this implementation, but it seems hackish in nature, assuming buildpacks spec if supported.
At this point in time, the project.toml
file is a platform concern meaning it has to be implemented by every platform. In this particular case, we haven't yet added the support for it in Tekton.
A recent relevant conversation: https://github.com/buildpacks/rfcs/pull/182
FWIW, support for project.toml is an extension spec. That means that it's not currently expected to be supported for platforms to be compliant. That said, we're trying to find the best way to expand its support.
We would accept a PR that brings about this support for Tekton as an example 😉.
Any update on this issue?
Was pretty surprised to see that the project.toml
is not supported when using buildpacks through Tekton. All of the docs for paketo/buildpacks show to use this file to update things like python version, etc. Using pack
cli was working and couldn't figure out why it wasn't working when building through Tekton.
Will have to resort to parsing the project.toml and pushing the build envs into the pipeline run..