Last active
December 2, 2018 15:34
-
-
Save simbo1905/056d193328c81250a54b7c68f8a9e77b to your computer and use it in GitHub Desktop.
compile and test php on circleci using redhat openshift s2i image that matches OCP builds
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.