Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release Candidate 1 #57

Merged
merged 64 commits into from
Jul 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
5d2d5c5
MessageController in sitemap-menu-index as "contactus"
b23prodtm Nov 8, 2017
3aac2e8
.
b23prodtm Apr 11, 2018
12befa4
Update README.md (#24)
b23prodtm Apr 28, 2018
0924181
Markdown-plugin composer (#26)
b23prodtm Aug 20, 2018
08767f8
push build notification
b23prodtm Aug 20, 2018
2e73cb5
composer script
b23prodtm Aug 21, 2018
6e8639b
push build notification (#29)
b23prodtm Aug 21, 2018
372f2ee
proxy
b23prodtm Aug 21, 2018
1e42b75
Merge branch 'master-2' into feature/travis-build-patch
b23prodtm Sep 22, 2018
5dbb043
Coverity code scanner
b23prodtm Sep 22, 2018
44b4ca5
Coverity scan (#31)
b23prodtm Sep 23, 2018
2276911
Coverity scan (#32)
b23prodtm Nov 10, 2018
31967b6
a commit
b23prodtm Nov 10, 2018
44afc4e
Merge branch 'feature/travis-build-patch' of https://github.com/b23pr…
b23prodtm Nov 10, 2018
c14a29c
Bootstrap shell (darwin)
b23prodtm Nov 11, 2018
497feba
/TravisCI-OSX-PHP/build/ brew php@version
b23prodtm Nov 11, 2018
c0680aa
use dev branch
b23prodtm Nov 11, 2018
f97c4f9
.
b23prodtm Nov 11, 2018
6714e3a
Merge branch 'feature/travis-build-patch' into development
b23prodtm Nov 11, 2018
4297504
Badge
b23prodtm Nov 11, 2018
247d117
Use https for gitmodules !
b23prodtm Nov 11, 2018
65082ea
Feature/travis build patch (#30)
b23prodtm Nov 19, 2018
212a987
Merge branch 'development' into issue-4-contacts
b23prodtm Nov 19, 2018
bbdc9f2
Feature/patch travis composer (#34)
b23prodtm Nov 25, 2018
410fa14
Revert "Feature/patch travis composer (#34)" (#35)
b23prodtm Nov 25, 2018
cc53c1f
Feature/patch travis composer (#36)
b23prodtm Nov 25, 2018
3bf4053
Merge branch 'issue-4-contacts' into development
b23prodtm Nov 25, 2018
3f3a0ae
travis build stats
b23prodtm Nov 25, 2018
137c01a
app/webroot/php_cms/e13/etc/: No such file or directory
b23prodtm Nov 26, 2018
e94c362
Update .travis.yml
b23prodtm Nov 27, 2018
4bbb1df
Coverity Scan analysis selected for branch development.
b23prodtm Nov 27, 2018
7c94d43
Update .travis.yml
b23prodtm Nov 28, 2018
d72f271
Coveralls + Coverity Scan
b23prodtm Nov 28, 2018
68796be
mysql Test post commit hook
b23prodtm Nov 30, 2018
a4aac33
Hotfix/s2i openshift (#38)
b23prodtm Dec 3, 2018
15f44e3
Upload working docker image to Hub (#49)
b23prodtm Apr 30, 2020
a27c71e
Update php_cms
b23prodtm May 2, 2020
514551c
Update TravisCI-OSX-PHP
b23prodtm May 2, 2020
a1eef15
Update docker-compose.yml
b23prodtm May 6, 2020
2edbcdc
Hotfix/mariadb (#50)
b23prodtm May 6, 2020
3b99049
Fixes: .env files and auth_ed25519
b23prodtm May 6, 2020
b93c4b4
Update README.md
b23prodtm May 17, 2020
9db52df
Apply cakephp to docker-compose and kubernetes (#51)
b23prodtm Jul 2, 2020
38e8c14
armhf pushed ./mysqldb
b23prodtm Jul 8, 2020
889253a
Fixes: Apache Startup and IP binding (#52)
b23prodtm Feb 2, 2021
38dbe52
Fixes: Cake PHP routing from homepage (#53)
b23prodtm Feb 7, 2021
8c05453
Global routing and services (#55)
b23prodtm Jul 11, 2021
404b988
Quickstart README.md (#58)
b23prodtm Jul 11, 2021
61f682e
feature/article-model (#27)
b23prodtm Jul 11, 2021
79ce27e
Manage site Contacts/ with MessageController => CakePhp 2 formular vi…
b23prodtm Jul 11, 2021
1bd2543
Docker hub Checks
b23prodtm Jul 14, 2021
9a39643
Docker hub apache
b23prodtm Jul 14, 2021
87891a4
Switched to balena-cloud-apps
b23prodtm Jul 24, 2022
8886d1b
Merge remote-tracking branch 'origin/master' into development
b23prodtm Jul 24, 2022
1e350f1
Moved to standard
b23prodtm Jul 24, 2022
ace300c
migrate-databases help
b23prodtm Jul 24, 2022
b54f754
Update php-cms
b23prodtm Jul 24, 2022
0da4893
Workspace
b23prodtm Jul 24, 2022
df51dde
Workspace
b23prodtm Jul 24, 2022
d5f2696
Merge branch 'development' of https://github.com/b23prodtm/acake2php …
b23prodtm Jul 24, 2022
a7786fc
ShellCheck
b23prodtm Jul 24, 2022
8efe316
Fix webroot composer
b23prodtm Jul 24, 2022
eb37c39
Shellcheck
b23prodtm Jul 24, 2022
f3d67b4
Fix compose deps restore cached
b23prodtm Jul 24, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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