forked from esimonetti/SugarDockerized
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Decoupled Images for PHP8.0 * Added sugar12 and commons to GH Actions * Fixed strategy run for local build only
- Loading branch information
1 parent
2ca8dd4
commit 2e3a501
Showing
17 changed files
with
253 additions
and
48 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: ci-commons | ||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
# branches: [ master, dev ] | ||
# pull_request: | ||
# branches: [ master ] | ||
jobs: | ||
docker: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- dockercontext: ./images/permissions | ||
image: sugarcrmdevelopers/sugardockerized | ||
prefix: permissions- | ||
- dockercontext: ./images/testsmtp | ||
image: sugarcrmdevelopers/sugardockerized | ||
prefix: testsmtp- | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- name: Login to DockerHub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: ${{ matrix.image }} | ||
flavor: | | ||
latest=true | ||
prefix=${{ matrix.prefix }},onlatest=true | ||
- name: Build and push | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: ${{ matrix.dockercontext }} | ||
push: true | ||
platforms: 'linux/amd64,linux/arm64' | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,65 @@ | ||
name: | ||
name: ci-v12 | ||
on: | ||
#push: | ||
# branches: [ master, dev ] | ||
pull_request: | ||
branches: [ master ] | ||
push: | ||
tags: | ||
- 'v*' | ||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
run: ['stacks/sugar12/php80.yml', 'stacks/sugar12/php80-local-build.yml'] | ||
run: ['stacks/sugar12/php80-local-build.yml'] | ||
steps: | ||
- run: sudo sysctl -w vm.max_map_count=262144 | ||
- run: echo '127.0.0.1 docker.local' | sudo tee -a /etc/hosts | ||
- uses: actions/checkout@v1 | ||
- run: cp -r ./tests/web_tests ./data/app/sugar/ | ||
- run: ./tests/start.sh ${{ matrix.run }} | ||
- run: ./tests/web_tests.sh ${{ matrix.run }} 11.0 7.4 | ||
- run: ./tests/web_tests.sh ${{ matrix.run }} 12.0 8.0 | ||
- run: ./tests/stop.sh ${{ matrix.run }} | ||
|
||
docker: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- dockercontext: ./images/php/80/apache | ||
image: sugarcrmdevelopers/sugardockerized | ||
prefix: php8.0-apache- | ||
- dockercontext: ./images/php/80/cron | ||
image: sugarcrmdevelopers/sugardockerized | ||
prefix: php8.0-cron- | ||
- dockercontext: ./images/mysql/80 | ||
image: sugarcrmdevelopers/sugardockerized | ||
prefix: mysql8.0- | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- name: Login to DockerHub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: ${{ matrix.image }} | ||
flavor: | | ||
latest=true | ||
prefix=${{ matrix.prefix }},onlatest=true | ||
- name: Build and push | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: ${{ matrix.dockercontext }} | ||
push: true | ||
platforms: 'linux/amd64,linux/arm64' | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
data | ||
backups | ||
.DS_Store |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
date.timezone = GMT | ||
error_reporting = E_ALL \& ~E_NOTICE \& ~E_STRICT \& ~E_DEPRECATED | ||
error_log = /var/log/apache2/error.log | ||
log_errors = On | ||
display_errors = Off | ||
memory_limit = 1024M | ||
post_max_size = 100M | ||
upload_max_filesize = 100M | ||
max_execution_time = 600 | ||
max_input_time = 600 | ||
realpath_cache_size = 512k | ||
realpath_cache_ttl = 600 | ||
mbstring.func_overload = 0 | ||
session.use_cookies = 1 | ||
session.cookie_httponly = 1 | ||
session.use_trans_sid = 0 | ||
session.save_handler = redis | ||
session.save_path = "tcp://sugar-redis:6379" | ||
auto_prepend_file = "/usr/local/php/prepend.php" |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
date.timezone = GMT | ||
error_reporting = E_ALL \& ~E_WARNING \& ~E_NOTICE \& ~E_STRICT \& ~E_DEPRECATED | ||
error_log = /proc/1/fd/1 | ||
log_errors = On | ||
display_errors = Off | ||
memory_limit = -1 | ||
max_execution_time = -1 | ||
realpath_cache_size = 512k | ||
realpath_cache_ttl = 600 | ||
mbstring.func_overload = 0 | ||
auto_prepend_file = "/usr/local/php/prepend.php" |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"require": { | ||
"guzzlehttp/guzzle": "6.5.6" | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<?php | ||
echo 'ok'; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
session_start(); | ||
$ok = 'ok'; | ||
|
||
$_SESSION[$ok] = $ok; | ||
|
||
if ($_SESSION[$ok] == $ok) { | ||
echo $ok; | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
$ok = 'ok'; | ||
|
||
$redis = new Redis(); | ||
$redis->connect('sugar-redis', 6379); | ||
$redis->set($ok, $ok); | ||
|
||
if ($redis->get($ok) == $ok) { | ||
echo $ok; | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
$ok = 'ok'; | ||
|
||
$conn = new mysqli('sugar-mysql', 'root', 'root'); | ||
if ($conn->connect_error) { | ||
die('Connection failed: ' . $conn->connect_error); | ||
} | ||
|
||
$sql = 'CREATE DATABASE dockertest'; | ||
if ($conn->query($sql) === TRUE) { | ||
$conn->select_db('dockertest'); | ||
$sql = 'CREATE TABLE test ( id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY, name VARCHAR(255) NOT NULL )'; | ||
if ($conn->query($sql) === TRUE) { | ||
echo $ok; | ||
} | ||
$sql = 'DROP DATABASE dockertest'; | ||
$conn->query($sql); | ||
} | ||
|
||
$conn->close(); |
Oops, something went wrong.