Skip to content

Instantly share code, notes, and snippets.

@simbo1905 simbo1905/config.yml
Last active Dec 2, 2018

Embed
What would you like to do?
compile and test php on circleci using redhat openshift s2i image that matches OCP builds
version: 2.0
jobs:
build:
docker:
- image: "registry.access.redhat.com/rhscl/php-71-rhel7:latest"
steps:
- checkout:
path: /tmp/src/
# Download and cache dependencies
- restore_cache:
keys:
- rhel7-dependencies-{{ checksum "/tmp/src/composer.json" }}
- run:
name: s2i assemble
command: /usr/libexec/s2i/assemble
- save_cache:
paths:
- ./vendor
key: rhel7-dependencies-{{ checksum "composer.json" }}
# run tests!
- run: vendor/bin/phpunit --configuration phpunit.xml
@simbo1905

This comment has been minimized.

Copy link
Owner Author

simbo1905 commented Dec 2, 2018

Note that s2i expects you to checkout into /tmp/src ten runs /usr/libexec/s2i/assemble. The other bits about caching the ./vendor folder is circleci.com specific to speed up your builds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.