version: 2
jobs:
build:
docker:
- image: circleci/php:7.3.9
- image: circleci/postgres:11.6-postgis -e POSTGRES_PASSWORD=testpwd
steps:
- checkout
- run:
name: Update RELEASE Environment Variable
command: |
echo 'export RELEASE=$(lsb-release -cs)' >> $BASH_ENV
source $BASH_ENV
echo $RELEASE
- run: sudo apt install -y wget
- run: wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
- run:
name: Update Repository
command: |
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ ${RELEASE}-pgdg main" >> /etc/apt/sources.list.d/pgdg.list'
cat /etc/apt/sources.list.d/pgdg.list
- run: sudo apt update && sudo apt -y upgrade
- run: sudo apt install -y postgresql-client-11 php-pgsql
- run: sudo docker-php-ext-install zip
- run: sudo docker-php-ext-install php-pgsql
- run: sudo composer self-update
- restore_cache: # special step to restore the dependency cache if `composer.lock` does not change
keys:
- composer-v1-{{ checksum "composer.lock" }}
# fallback to using the latest cache if no exact match is found (See https://circleci.com/docs/2.0/caching/)
- composer-v1-
- run: composer install -n --prefer-dist
- save_cache: # special step to save the dependency cache with the `composer.lock` cache key template
key: composer-v1-{{ checksum "composer.lock" }}
paths:
- vendor
- restore_cache: # special step to restore the dependency cache if `package-lock.json` does not change
keys:
- node-v1-{{ checksum "package-lock.json" }}
# fallback to using the latest cache if no exact match is found (See https://circleci.com/docs/2.0/caching/)
- node-v1-
- run: npm install
- save_cache: # special step to save the dependency cache with the `package-lock.json` cache key template
key: node-v1-{{ checksum "package-lock.json" }}
paths:
- node_modules
- run: ./composer test
For the life of me, I am unable to figure out how to get lsb_release (or lsb-release … seems two different formats?) installed. How should I approach this?
Thank you!