Skip to content

Commit

Permalink
Release Candidate 1 (#57)
Browse files Browse the repository at this point in the history
* MessageController in sitemap-menu-index as "contactus"
update my schema sql

* Update README.md (#24)

* Update README.md

* Markdown-plugin composer (#26)

* Markdown-plugin composer

* Shell Test Script

* Tagged release version

* manually registered plugins
use ssh modules

* trusty

* HTTPS for travis workers

* Update .travis.yml

* push build notification

* composer script

* push build notification (#29)

* proxy

* Coverity code scanner

* Coverity scan (#31)

* Coverity code scanner
* in Bash environment, String subsitutions are allowed
* Cache PHP Fatal error:  Uncaught CacheException: Cache engine "_cake_core_" is not properly configured. Ensure required extensions are installed, and credentials/permissions are correct in /home/travis/build/b23prodtm/myphpcms/lib/Cake/Cache/Cache.php:186

* Coverity scan (#32)

* Coverity code scanner

* in Bash environment, String subsitutions are allowed

* Cache PHP Fatal error:  Uncaught CacheException: Cache engine "_cake_core_" is not properly configured. Ensure required extensions are installed, and credentials/permissions are correct in /home/travis/build/b23prodtm/myphpcms/lib/Cake/Cache/Cache.php:186

* default bootstrap

* bootstrap autoconf cache directories

* up

* autoload files

* .

* package

* composer libcurl setup

* module https

* issue-3

bitbucket.org/b23prodtm/php-cms#3

* composer install
https://book.cakephp.org/2.0/en/installation/advanced-installation.html#create-a-cakephp-project

autoloader fix 
https://book.cakephp.org/2.0/en/installation/advanced-installation.html#installing-composer

* Configure scripts

* Script YaML travis

* Cake CORE Include

* Cms package

Naming
Cake package autoloading

* Helpers

* MySQL 5.7

* Fix Scripts prompt

* a commit

* Bootstrap shell (darwin)

* /TravisCI-OSX-PHP/build/ brew php@version

* use dev branch

* .

* Badge

* Use https for gitmodules !

$ git submodule deinit .travis/TravisCI-OSX-PHP/
$ git rm .travis/TravisCI-OSX-PHP/
$ git submodule add --force https://github.com/b23prodtm/TravisCI-OSX-PHP.git .travis/TravisCI-OSX-PHP/

* Feature/travis build patch (#30)

* php core travis-ci osx

* $(which cmd) > /dev/null
./configure.sh -Y -Y -Y -N -p pass -s word

* ./configure.sh -c -d -n -h -p pass -s word travis

* mov composer to configure.sh

* Fix Error : Fatal error: Class 'Index' not found in /home/travis/build/b23prodtm/myphpcms/app/View/Helper/InfoHelper.php on line 19 Error: Database connection "Mysql" is missing, or could not be created.

* Up8 plugin Boot args https://github.com/cakephp/debug_kit

* coverage tests

* .

* Composer script

shell scripts  documentation

* Feature/patch travis composer (#34)

* composer/composer#7797

* Delete composer.phar

* fix syntax error, unexpected '$index'

* fix 'SQL‘ not found
coveralls

* Plugin bootstrap Scripts saved args (set -- $saved)

* php composer.phar

* sql info

* bootstrap test

* Test Workflow

wip : Cannot declare class Tableau, because the name is already in use

* HOW to fix issues Error handling upon first tests

* ./test_cake.sh -p <sql-password> -t

* ERROR 1064 (42000) at line 4 in file: 'app/Config/identities.sql': You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'if not exists 'test'@'localhost'' at line 1

* Readme

* Remote CI : mysql socket
ERROR 1064 (42000) at line 4 in file: 'app/Config/identities.sql': You 
have an error in your SQL syntax; check the manual that corresponds to 
your MySQL server version for the right syntax to use near 'if not 
exists 'test'@'127.0.0.1'' at line 1

* COLLECT_COVERAGE coveralls
php unit bootstrap

* environment variable

* Documentation

* ./Scripts/bootstrap.sh: line 35: ./app/vendor/bin/phpunit: No such file or directory

* style

* errno : 1054 sqlstate : 42S22 error : Unknown column 'image' in 'field list'
Fatal error: CakePHP core could not be found.  Check the value of 
CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php.  It should point to the 
directory containing your /cake core directory and your /vendors root 
directory. in 
/home/travis/build/b23prodtm/myphpcms/app/bootstrap_phpunit.php on line 
86

* Update php_cms

Fatal error: require(): Failed opening required '' (include_path='.:/home/travis/.phpenv/versions/5.6.32/share/pear') in /home/travis/build/b23prodtm/myphpcms/app/webroot/php_cms/e13/include/SQL.php on line 11

* Revert "Feature/patch travis composer (#34)" (#35)

This reverts commit bbdc9f2.

* Feature/patch travis composer (#36)

* composer/composer#7797

* .

* Delete composer.phar

* fix syntax error, unexpected '$index'

* fix 'SQL‘ not found
coveralls

* Plugin bootstrap Scripts saved args (set -- $saved)

* php composer.phar

* sql info

* bootstrap test

* Test Workflow

wip : Cannot declare class Tableau, because the name is already in use

* HOW to fix issues Error handling upon first tests

* ./test_cake.sh -p <sql-password> -t

* ERROR 1064 (42000) at line 4 in file: 'app/Config/identities.sql': You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'if not exists 'test'@'localhost'' at line 1

* Readme

* Remote CI : mysql socket
ERROR 1064 (42000) at line 4 in file: 'app/Config/identities.sql': You 
have an error in your SQL syntax; check the manual that corresponds to 
your MySQL server version for the right syntax to use near 'if not 
exists 'test'@'127.0.0.1'' at line 1

* COLLECT_COVERAGE coveralls
php unit bootstrap

* environment variable

* Documentation

* ./Scripts/bootstrap.sh: line 35: ./app/vendor/bin/phpunit: No such file or directory

* style

* errno : 1054 sqlstate : 42S22 error : Unknown column 'image' in 'field list'
Fatal error: CakePHP core could not be found.  Check the value of 
CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php.  It should point to the 
directory containing your /cake core directory and your /vendors root 
directory. in 
/home/travis/build/b23prodtm/myphpcms/app/bootstrap_phpunit.php on line 
86

* Helper $view links plugin Markdown

Update php_cms -> Index includes fix :
Fatal error: require(): Failed opening required '' 
(include_path='.:/home/travis/.phpenv/versions/5.6.32/share/pear') in 
/home/travis/build/b23prodtm/myphpcms/app/webroot/php_cms/e13/include/SQL.php 
on line 11

* phpunit bootstrap local ok

* test : no coverage

* autoload tests

* travis build stats

* app/webroot/php_cms/e13/etc/: No such file or directory

* Update .travis.yml

* Coverity Scan analysis selected for branch development.

* Update .travis.yml

* Coveralls + Coverity Scan

* mysql Test post commit hook

* Hotfix/s2i openshift (#38)

* database configuration
user passwords

* autoload.php

* post-commit hook issue
lib/cake/cache/Engine/FileEngine
Cache application directory
Cache long persist
file perms

* Markdown-plugin composer

* Merge branch 'feature/b23prodtm-markdown-patch-1' into openshift-publish

* composer

* Shell Test Script

* --openshift arg

*  How to fix up 'Database connection "Mysql" is missing, or could not be created' ?

* ERROR 1044 (42000) at line 1: Access denied for user 'test'@'localhost' 
to database 'cakephp_test2'

* migrate script and socket

* dollar-star shell

* openshift: no mysql identities to import

* usage of blank password

* 'MysqlCms' in 'app/Model/Datasource/Database'

* coverity_scan branch

* Upload working docker image to Hub (#49)

* 1st LAMP 7 on Raspberry PI

Adds: mariadb-intel-nuc pushed to circleci
Adds: mariadb-raspberrypi3 pushed to dockerhub
Adds: mariadb-raspberrypi3-64 pushed to dockerhub
Fixes: unbound variable, syntax errors
Adds: docker_build deployments primary images
Fixes: Invalid parameter: ./migrate-database.sh foo_pass
Fixes: echo 'Failed waiting for Mysql' Adds: CLI Fixes: ./configure.sh: unbound variable Fixes: Can't connect to local MySQL server through socket
Fixes: Error: Please install PHPUnit framework v3.7 (http://www.phpunit.de)
Fixes: Error: Call to undefined function session_id()
Fixes: CircleCI pipelines compose ERROR: Service 'myphpcms' failed to build Fixes: Unknown parameter passed: ./configure.sh pass
Fixes: MissingTableException: Table cake_sessions for model Session was not found in datasource test.
Fixes: ERROR 1046 (3D000) at line 4 in file: 'app/Config/database.sql': No database selected
Updates: Cake 2.10.9 -> 2.10.20 (./Console/cake upgrade all)
Fixes: Error: Plugin Update could not be found
Fixes: MySQL configuration error : 1
Fixes: Fatal error:  Cannot redeclare Adds: Memcached extension Fixes: ENOENT: no such file or directory
Kubernetes kompose script

* Update php_cms

* Fixes: ARM on kompose

* Fixes: ERROR 1130 (HY000): Host 'myphpcms_2182660_1347204.1564784_cake' is not allowed to connect to this MariaDB server

* Fixes: PHP:  syntax error, unexpected '=' in /etc/php/7.2/cli/conf.d/0-session.save_path.ini

* Fixes: templates and .inc files, cannot redeclare function ...

* Fixes: Access denied; you need (at least one of) the CREATE USER privilege(s) for this operation Fixes: Migrating database 'cake schema update' Error: Database connection "MysqlCms" is missing, or could not be created.

* Fixes: Migrating database 'cake schema update' ... Error: Database connection "MysqlCms" is missing, or could not be created.

* Fixes: ERROR 2002 (HY000): Can't connect to MySQL server on 'db' (115)

* Fixes: Balena OS and docker-compose installation Fixes: Networking in containers Deprecated: lsio* image has been deprecated; Use the multi-arch images

* Fixes: Plugin UpdateShell could not be found

* Fixes: Test databases Fixes: Daemon Log file

* Fixes: secondary image mysqldb

* Fixes: SQL connection

Co-authored-by: TR BERRY <b23prodtm@sourceforge.net>

* Update php_cms

* Update TravisCI-OSX-PHP

* Update docker-compose.yml

* Hotfix/mariadb (#50)

* Fixes: Parsing arguments

* Fixes: Circle ci Build

* Fixes: test-cake.sh and libmariadbclient

armhf pushed to balena.io

Fixes: CREATE USER Failed 'username'@'%'

Fixes: ./configure.sh: line 75: DATABASE_USER: unbound variable

Fixes: No Root Password (FROM linxuserver/mariadb)

Fixes: Error: Database connection "MysqlCms" is missing (no quotes !)

Fixes: can't open '/e13/etc/constantes.properties'

* Fixes: ***** Fix PASSWORD, PRIVILEGES and CREATE ${MYSQL_USER}...

* Fixes: Mysql Connection Error: 1 Fixes: Docker socket test (WIP)

* Fixes: .env files and auth_ed25519

* Update README.md

* Apply cakephp to docker-compose and kubernetes (#51)

* Fixes: deplowments (exec ./deploy.sh 1 2) to balena.io

Fixes: docker-compose up startup dependencies

* Fixes: starting myphpcms...

* Fixes: ERROR 1064 (42000)

* Guidelines

* Fixes: E: Unable to locate package php7.3

* Fixes: MariaDB migrate-database on RaspberryPi Fixes: TravisCI : Test CakePHP Built-in Console

* Fixes: CI Tests, Local Built-in CakePHP Server

Fixes: cake_sessions key length

Fixes: Could not open input file: vendor/bin/phpunit

Fixes: satisfiable by [secure]/updateshell

Fixes: unix_socket

Fixes: Bash --version

Fixes: Mysql Unix User ID

Fixes: CI Tests

Fixes: Migrate and CakePHP Test Suite

* Fixes: Datasource class  could not be found.

Fixes: SQLSTATE[HY000] [2006] MySQL server has gone away

Fixes: apache2 -D FOREGROUND: ./migrate-database.sh: No such file or directory

Fixes: "eval git submodule update --init --recursive " failed.

* Fixes: Local and CI Command (Failed Tests for now)

* Fixes: Tests Results Pages

* Fixes: Travis Tests on CI

* Fixes: Log Travis databases

* Fixes: Travis mysql access denied to 'root'@'127.0.0.1'

* Updates README

* Updates README

* Fixes: AH00111: Config variable ${APACHE_RUN_DIR} is not defined

* Fixes:  Ignoring unsupported or unknown compose fields: envFile

* Fixes: Address already in use (0.0.0.0:80) Project Name myphpcms -> acake2php

* Fixes: Log Tests and Container Startup

* Fixes: S6 overlay (with-contenv sh)

* Fixes: deploy circle ci exec format error

* Fixes: deploy arch. environment

* Fixes: [WARNING]: Empty continuation line

* Adds: balena-cloud module

* Fixes: npm update (balena-cloud module)

* Fixes: /usr/local/share/vagrant-shell-scripts/ubuntu.sh: line 1: 404: command not found

* Fixes: balena-cli link

* Fixes: build and compose

* Fixes: Crossbuild # files

* Update package.json

* Updates: primary deployment images

* Fixes: write access to node_modules

* Updates composer submodules

* Fixes: obsolete python2 pip

* Fixes: deployment stack

* Fixes: DIND

* Fixes: SHELLCHECK Fixes: compose tests

* Fixes: balena-cloud

* Removes: balena-cli tests

* Fixes: log_warning_msg

* Fixes: Primary_hub

* Updates: Install.md

* Fixes:  Service 'acake2php' failed to build

* Fixes: logging.sh: line 2: init_functions

* Fixes: s6 overlay

* Update Markdown

* Fixes: circleci build

* Fixes: Alpine Apache PHP

* Fixes: conf-available directory

* Fixes: Enable site on httpd

* Fixes: setup user www-data

* Fixes: base image Alpine Node

* Fixes: ./run: line 4: ./setup: Permission denied

* Fixes: Travis node_js

* Fixes: Httpd directives (keep originals)

Fixes: Hash File

Fixes: TOPDIR directive

Fixes: user www-data

* Fixes: exec $scripts

* Fixes: Httpd bound Address:Port, ServerName and VirtualHost requests

* Fixes: mod_rewrite

* Fixes: travis test build

* Adds: PHP CODE SNIFFER

* Fixes: SHELLCHECK SC1091,SC2086

* armhf pushed ./mysqldb

* Fixes: Apache Startup and IP binding (#52)

* Fixes: DocumentRoot File permissions

* Fixes: ServerRoot

* Fixes: setup config_a2ensite

* Adds: Kubernetes Fixes: Openshift descriptors

* Foxes: optimize Dockerfile

* Fixes: Cake PHP routing from homepage (#53)

* Fixes: Travis ARM Tests unexpected results
awk: fatal: cannot open file `/tmp/tmp.CHBUMqCQUW/pids_before' for 
reading (No such file or directory)

* untracked files on cakeroute: 38e8c14 armhf pushed ./mysqldb

* index on cakeroute: 38e8c14 armhf pushed ./mysqldb

* Remove: code coverage tests

* Travis CI badge Beta Test

* Fixes: balena deploy with Darwin (OSX)

* Fixes: path app/webroot/php-cms

* Fixes: shellcheck

* Updates: submodule php-cms

* Node update

* Updates: nodejs alpine

* armhf pushed ./mysqldb

* armhf pushed ./deployment/images/apache-php7

* Global routing and services (#55)

* Fixes: uninstall balena-cli dependency loops

* Scripts/composer.sh update to version 2.0

* Fixes: VirtualHost a2ensite
Adds: Xdebug

* Fixes: Fatal error: Uncaught CacheException: Cache engine "_cake_core_" is not properly configured

* Fixes: Access denied for user 'maria'@'acake2php_cake' (using password: NO) [enabled] => 1

* Fixes: Error: [MissingViewException] View file "E14/images.ctp" is missing. Exception Attributes: array (   'file' => 'E14/images.ctp', ) Request URL: /e14/images/logo_full.png

* Fixes: Cake Console

* Fixes: Table cake_sessions for model Session was not found in datasource test.

* Fixes: Cake log too long filename

* Fixes: database user privileges

Updates: DebugKit version

* Fixes: Request exceeded the limit of 10 internal redirects Fixes: srand() expects parameter 1 to be int, float given

* Fixes: persistent storage

Fixes: SC2094 Make sure not to read and write the same file in the same
pipeline

* Fixes: .htaccess RewriteRule
Fixes: core patches

* README

* Fixes: Volumes db-config

* Fixes: Can't find application core file

* armhf pushed ./mysqldb

* armhf pushed ./mysqldb

* armhf pushed ./deployment/images/apache-php7

* Delete Core.php.sed

* Create core.php.sed

* Quickstart README.md (#58)

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* feature/article-model (#27)

* Add Article and View it
* Fixes: DocumentRoot File permissions

* Fixes: ServerRoot

* Manage site Contacts/ with MessageController => CakePhp 2 formular view (#28)

* Fixes: DocumentRoot File permissions

* Fixes: ServerRoot

* Merge branch 'development' into issue-4-contacts

* Basic messenger WIP

https://book.cakephp.org/2.0/fr/models/data-validation.html

* CRUD Message > contactus/add,edit,delete,index

* WIP https://book.cakephp.org/2.0/en/tutorials-and-examples/blog-auth-example/auth.html
clientapi and graph sdk

* WIP AuthComponent Client+Motdepasse

* Feature essentials

View
Access scope
Tests

* beta release

* Document PDO errors

* Fixes: The action message is not defined in controller E14Controller

* Fixes: Illegal Instructions 4 (cake)

* Fixes: Table clients for model Client was not found in datasource default

* Adds app/Locale views

* armhf pushed ./mysqldb

* Docker hub Checks

Cross building ARM

* Docker hub apache

Cross building arm

* Switched to balena-cloud-apps

* Moved to standard

* migrate-databases help

* Update php-cms

* Workspace

* Workspace

* ShellCheck
+ DEL Travis

* Fix webroot composer
linter

* Shellcheck

* Fix compose deps restore cached

Co-authored-by: TR BERRY <b23prodtm@sourceforge.net>
  • Loading branch information
b23prodtm and TR BERRY authored Jul 24, 2022
1 parent 863d402 commit 73c2c78
Show file tree
Hide file tree
Showing 267 changed files with 10,551 additions and 3,986 deletions.
Binary file modified .DS_Store
Binary file not shown.
20 changes: 20 additions & 0 deletions .circleci/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env bash
work_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
usage=("" \
"Usage: $0" \
" CircleCI needs a primary image with docker-in-docker backend." \
" To build it use deployment/build.sh script to push to image registry and tag it:" \
" deployment/images/build.sh secondary betothreeprod/cci-mariadb arm64v8-latest" \
"Then you can run composition process: sudo docker-compose up --build" \
"")
[ ! "$(command -v circleci)" ] && curl -fLSs https://circle.ci/cli | bash
# https://github.com/koalaman/shellcheck/wiki/SC2207
# shellcheck source=../deploy.sh
mapfile -t dock < <(find "${work_dir}/../deployment/images" -name "Dockerfile.x86_64")
[ "$#" -lt 1 ] && printf "Usage: %s <repository>" "$0" && exit 0
for d in "${dock[@]}"; do
dir=$(dirname "$d")
docker_build "$dir" "." "$1/$(basename "$dir")" "$(arch)"
done
sed -e "/custom_checkout:/s/\"\"/\"\/tmp\/_circleci_local_build_repo\"/g" "${work_dir}/config.yml" | circleci config process - > "${work_dir}/config-compat.yml"
circleci local execute -c "${work_dir}/config-compat.yml" || echo -e "${usage[0]}"
210 changes: 122 additions & 88 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,94 +1,128 @@
# PHP CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-php/ for more details
#
version: 2
version: 2.1
aliases:
- &deps
run:
name: Install dependencies
command: |
git submodule sync
git submodule update --init --recursive
apk update \
&& apk add \
npm \
php7-session \
&& apk del build-base \
&& rm -rf /var/cache/apk/*
npm ci
npm link balena-cloud-apps
orbs:
shellcheck: circleci/shellcheck@1.3.16
jobs:
build:
docker:
- image: betothreeprod/intel-nuc-node-php7
- image: betothreeprod/mariadb-intel-nuc
environment:
PUID: 0
PGID: 0
TZ: Europe/Paris
MYSQL_ROOT_PASSWORD: mariadb
MYSQL_HOST: localhost
MYSQL_DATABASE: aria_db
MYSQL_USER: maria
MYSQL_PASSWORD: maria-abc
shell: /bin/bash -leo pipefail
environment:
DB: Mysql
# a host alias or IP address
MYSQL_SERVICE_HOST: 192.168.99.100
MYSQL_SERVICE_PORT: 3306
TEST_MYSQL_SERVICE_HOST: 192.168.99.100
TEST_MYSQL_SERVICE_PORT: 3306
DATABASE_NAME: phpcms
DATABASE_SERVICE_NAME: MYSQL
#(optional)
#WEBHOOK_URL: <discordapp-url>
# Persistent connection credentials
DATABASE_USER: root
# overrides docker-compose-alias.sh -p=<password>
DATABASE_PASSWORD: pdocker
# Just add TEST_DATABASE_USER and TEST_DATABASE_PASSWORD
TEST_DATABASE_USER: ubuntu
# overrides docker-compose-alias.sh -t=<password>
TEST_DATABASE_PASSWORD: ptest
# CakePHP generated
#CAKEPHP_SECRET_TOKEN: <secret-token>
#CAKEPHP_SECRET_SALT: <secret-salt>
#CAKEPHP_SECURITY_CIPHER_SEED: <cipher-seed>
# Generated by ./configure.sh -h
GET_HASH_PASSWORD: ${GET_HASH_PASSWORD}
- BASH_ENV: /etc/profile
- DKR_ARCH: x86_64
- MYSQL_HOST: 127.0.0.1
- MYSQL_TCP_PORT: 3306
working_directory: /var/www/html/
steps:
- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package-lock.json" }}
- v1-dependencies-{{ checksum "composer.lock" }}
- setup_remote_docker:
docker_layer_caching: false
- *deps
- save_cache:
key: v1-dependencies-{{ checksum "composer.lock" }}
paths:
- app/Vendor
- webroot/php-cms
- save_cache:
key: v1-dependencies-{{ checksum "package-lock.json" }}
paths:
- $HOME/.npm
- run:
name: Set architecture and Setup Environment Variables
command: |
balena_deploy . $DKR_ARCH --nobuild --exit
- run:
name: Waiting for Mysql to be ready
command: |
set -x
for i in `seq 1 10`;
do
nc -z $MYSQL_HOST $MYSQL_TCP_PORT && echo Success && exit 0
echo -n .
sleep 1
done
echo 'Failed waiting for Mysql' && exit 1
- run:
command: |
set -u
mkdir -p ./app/build/logs
mkdir -p ~/phpunit
./test-cake.sh --circle
. common.env && cat $MYPHPCMS_DIR/e13/etc/constantes.properties | grep PASSWORD_ADMIN | head -c 18
when: always
- persist_to_workspace:
root: app/
paths:
- Config
compose:
docker:
# Specify the version you desire here
- image: circleci/php:7.1-node-browsers
environment:
DOCKER_OS_NAME: linux
DOCKER_PHP_VERSION: 7.1

# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
# Using the RAM variation mitigates I/O contention
# for database intensive operations.
# - image: circleci/mysql:5.7-ram
- image: circleci/mysql:5.7
container_name: mysql
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_ROOT_PASSWORD: 'pdocker'
MYSQL_DATABASE: phpcms

- image: betothreeprod/dind-php7
shell: /bin/bash -leo pipefail
environment:
- BASH_ENV: /etc/profile
- DKR_ARCH: x86_64
steps:
- checkout
- run: git submodule update --init --recursive

- run: sudo apt update # PHP CircleCI 2.0 Configuration File# PHP CircleCI 2.0 Configuration File sudo apt install zlib1g-dev libsqlite3-dev
- run: sudo docker-php-ext-install zip
- run: sudo apt-get install mariadb-client

# Download and cache dependencies
- restore_cache:
keys:
# "composer.lock" can be used if it is committed to the repo
- v1-dependencies-{{ checksum "composer.lock" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-

- run: composer install -n --prefer-dist

- save_cache:
key: v1-dependencies-{{ checksum "composer.lock" }}
paths:
- ./app/Vendor/

- run: ./test-cake.sh -v --docker -p=$DATABASE_PASSWORD -t=$TEST_DATABASE_PASSWORD #| grep Test
# Installing and Using docker-compose
- run:
name: Install Docker Compose
command: |
curl -L https://github.com/docker/compose/releases/download/1.19.0/docker-compose-`uname -s`-`uname -m` > ~/docker-compose
chmod +x ~/docker-compose
sudo mv ~/docker-compose /usr/local/bin/docker-compose
- setup_remote_docker: # (2)
docker_layer_caching: true # (3)

# use a primary image that already has Docker (recommended)
# build and push Docker image
# (4)
- run: |
- checkout
- attach_workspace:
at: app
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package-lock.json" }}
- v1-dependencies-{{ checksum "composer.lock" }}
- setup_remote_docker:
docker_layer_caching: false
- *deps
- run:
name: Set architecture and Setup Environment Variables
command: |
balena_deploy . $DKR_ARCH --nobuild --exit
- run:
command: |
set -u
TAG=0.1.$CIRCLE_BUILD_NUM
./docker-compose-alias.sh -dns=b23prodtm.info -p=$DATABASE_PASSWORD -t=$TEST_DATABASE_PASSWORD up -d --build
docker login -u $DOCKER_USER -p $DOCKER_PASS
docker push b23dkr/myphpcms:$TAG
docker-compose -f docker-compose.$DKR_ARCH build
- store_test_results:
path: ~/phpunit
- store_artifacts:
path: ~/phpunit
workflows:
cleanup:
jobs:
- shellcheck/check:
ignore: 'SC1091,SC2034,SC2096,SC2038'
build-and-compose:
jobs:
- build
- compose:
requires:
- build
context: Info-b23prodtm
version: 2
29 changes: 27 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,25 @@
# User specific & automatically generated files #
#################################################
myphpcms*.zip
.env
*.old
*.armhf
*.aarch64
*.x86_64
Dockerfile.*
!Dockerfile.template
!Dockerfile.armhf
!Dockerfile.x86_64
docker-compose.*
!docker-compose.yml
!docker-compose.x86_64
!docker-compose.armhf
.circleci/config-compat.yml
acake2php*.zip
/app/Config/database.php*
!/app/Config/database.php
/app/Config/database.sql*
/app/Config/Schema/schema.php*
!/app/Config/Schema/schema.php
/app/tmp
/app/Vendor/
!/app/Vendor/autoload.php
Expand All @@ -20,7 +37,13 @@ myphpcms*.zip
/dist
/tags
*.mo
/bin/composer.phar
**/composer*.phar
mysqldb/config/
mysqldb/conf.d/custom.cnf
node_modules
*.log
etc/apache2/conf.d/site.conf
etc/apache2/conf.d/ssl_site.conf

# IDE and editor specific files #
#################################
Expand All @@ -40,3 +63,5 @@ Icon?
ehthumbs.db
Thumbs.db
/nbproject/private/
mysqldb/mysqld/
mysqld/conf.d/custom.cnf
22 changes: 16 additions & 6 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
[submodule "app/webroot/php-cms"]
path = app/webroot/php-cms
url = https://bitbucket.org/b23prodtm/php-cms.git
[submodule "python-wifi-connect"]
path = python-wifi-connect
url = https://github.com/b23prodtm/python-wifi-connect.git
[submodule "cakephp"]
path = cakephp
url = git://github.com/cakephp/cakephp.git
branch = 2.x
[submodule "app/Plugin/Datasources"]
path = app/Plugin/Datasources
url = https://github.com/cakephp/datasources.git
[submodule "app/Plugin/UpdateShell"]
path = app/Plugin/UpdateShell
url = https://github.com/b23prodtm/update.git
[submodule "app/Plugin/Markdown"]
path = app/Plugin/Markdown
url = https://github.com/b23prodtm/markdown-plugin.git
[submodule "app/webroot/php_cms"]
path = app/webroot/php_cms
url = https://bitbucket.org/b23prodtm/php-cms.git
[submodule ".travis/TravisCI-OSX-PHP"]
path = .travis/TravisCI-OSX-PHP
url = https://github.com/b23prodtm/TravisCI-OSX-PHP.git
8 changes: 0 additions & 8 deletions .htaccess

This file was deleted.

1 change: 1 addition & 0 deletions .htaccess
2 changes: 1 addition & 1 deletion .openshift/cron/weekly/chronograph
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash
#!/usr/bin/env bash

echo "`date`: `cat $(dirname \"$0\")/chrono.dat`"
Loading

0 comments on commit 73c2c78

Please sign in to comment.