tektoncd / catalog

Catalog of shared Tasks and Pipelines.
Apache License 2.0
666 stars 575 forks source link

caching dependencies does not work #912

Closed tisaiful31 closed 2 years ago

tisaiful31 commented 2 years ago

Hello , I am trying to build docker image with buildah in a pipeline. also use --layer=true for caching . but ,the problem is : when I run build process , dependencies downloaded every time and stored in PV. this build process does not use dependencies cache from PV . command :

buildah ${CERT_DIR_FLAG} --storage-driver=$(params.STORAGE_DRIVER) bud \
        $(params.BUILD_EXTRA_ARGS) --format=$(params.FORMAT) --layers=true  \
        --tls-verify=$(params.TLSVERIFY) \
        -f $(params.DOCKERFILE) -t $(params.IMAGE) $(params.CONTEXT)

build process:

[buildah-build : build] STEP 1: FROM php:8.0.5
[buildah-build : build] STEP 2: RUN apt-get update -y && apt-get install -y openssl zip unzip git
[buildah-build : build] --> Using cache df28153fd14e0009da9129f1c7e866db3b8186a34e93a2e9e101e962bdc1a248
[buildah-build : build] --> df28153fd14
[buildah-build : build] STEP 3: RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
[buildah-build : build] --> Using cache 2d97ade3ecb6f82b75a9ee3967da40d35da97a7fe428990b36520d81f3517734
[buildah-build : build] --> 2d97ade3ecb
[buildah-build : build] STEP 4: RUN docker-php-ext-install pdo
[buildah-build : build] --> Using cache 74fdc43c9fc0367d782401891e01a7c6c7eefd2c4f630bc8f5d52057740d184e
[buildah-build : build] --> 74fdc43c9fc
[buildah-build : build] STEP 5: WORKDIR /app
[buildah-build : build] --> Using cache bea8130f8af27c769f6e697ae7fafa72ed2b16eda80dacbd6bd2cc7c390ad0c6
[buildah-build : build] --> bea8130f8af
[buildah-build : build] STEP 6: COPY . /app
[buildah-build : build] --> fc451d4e106
[buildah-build : build] STEP 7: RUN composer install --ignore-platform-reqs
[buildah-build : build] Do not run Composer as root/super user! See https://getcomposer.org/root for details
[buildah-build : build] Installing dependencies from lock file (including require-dev)
[buildah-build : build] Verifying lock file contents can be installed on current platform.
[buildah-build : build] Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. It is recommended that you run `composer update` or `composer update <package name>`.
[buildah-build : build] Package operations: 88 installs, 0 updates, 0 removals
[buildah-build : build]   - Downloading doctrine/inflector (2.0.3)
[buildah-build : build]   - Downloading doctrine/lexer (1.2.1)
[buildah-build : build]   - Downloading dragonmantank/cron-expression (v2.3.1)
[buildah-build : build]   - Downloading symfony/polyfill-php80 (v1.22.1)
[buildah-build : build]   - Downloading symfony/polyfill-php72 (v1.22.1)
[buildah-build : build]   - Downloading symfony/polyfill-mbstring (v1.22.1)
[buildah-build : build]   - Downloading symfony/var-dumper (v4.4.22)
[buildah-build : build]   - Downloading psr/container (1.1.1)
[buildah-build : build]   - Downloading symfony/service-contracts (v1.1.9)
[buildah-build : build]   - Downloading symfony/polyfill-php73 (v1.22.1)
[buildah-build : build]   - Downloading symfony/console (v4.4.22)
[buildah-build : build]   - Downloading scrivo/highlight.php (v9.16.2.0)
[buildah-build : build]   - Downloading psr/log (1.1.4)
[buildah-build : build]   - Downloading monolog/monolog (2.2.0)
[buildah-build : build]   - Downloading symfony/polyfill-ctype (v1.22.1)
[buildah-build : build]   - Downloading phpoption/phpoption (1.7.5)
[buildah-build : build]   - Downloading vlucas/phpdotenv (v3.6.8)
[buildah-build : build]   - Downloading symfony/css-selector (v4.4.22)
[buildah-build : build]   - Downloading tijsverkoyen/css-to-inline-styles (2.2.3)
tekton-robot commented 2 years ago

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale with a justification. Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with /close with a justification. If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/lifecycle stale

Send feedback to tektoncd/plumbing.

tekton-robot commented 2 years ago

Stale issues rot after 30d of inactivity. Mark the issue as fresh with /remove-lifecycle rotten with a justification. Rotten issues close after an additional 30d of inactivity. If this issue is safe to close now please do so with /close with a justification. If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/lifecycle rotten

Send feedback to tektoncd/plumbing.

tekton-robot commented 2 years ago

Rotten issues close after 30d of inactivity. Reopen the issue with /reopen with a justification. Mark the issue as fresh with /remove-lifecycle rotten with a justification. If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/close

Send feedback to tektoncd/plumbing.

tekton-robot commented 2 years ago

@tekton-robot: Closing this issue.

In response to [this](https://github.com/tektoncd/catalog/issues/912#issuecomment-1162883722): >Rotten issues close after 30d of inactivity. >Reopen the issue with `/reopen` with a justification. >Mark the issue as fresh with `/remove-lifecycle rotten` with a justification. >If this issue should be exempted, mark the issue as frozen with `/lifecycle frozen` with a justification. > >/close > >Send feedback to [tektoncd/plumbing](https://github.com/tektoncd/plumbing). Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.