Skip to content

Instantly share code, notes, and snippets.

@aduzsardi
Forked from prog/.gitlab-ci.yml
Created February 27, 2020 14:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aduzsardi/cf0480f47626e7f3e7a8de45829b988f to your computer and use it in GitHub Desktop.
Save aduzsardi/cf0480f47626e7f3e7a8de45829b988f to your computer and use it in GitHub Desktop.
How to use composer (php) including cache with gitlab-ci
build:install-vendor:
stage: build
image: <any-image-with-composer>
before_script:
- composer config -g cache-dir "$(pwd)/.composer-cache"
script:
- composer install --ignore-platform-reqs --no-dev --optimize-autoloader --no-ansi --no-interaction --no-progress
cache:
paths:
- .composer-cache/
artifacts:
expire_in: 30 min
paths:
- vendor/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment