Skip to content
Snippets Groups Projects
Commit 39cf9477 authored by ale's avatar ale
Browse files

Run a pre-prod test CI step

parent 19910200
No related branches found
No related tags found
1 merge request!55Run a pre-prod test CI step
include: "https://git.autistici.org/ai3/build-container/raw/master/common.yml"
# test the newly built container before releasing it.
stages:
- build
- test
- release
test:
stage: test
image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/debian:stable
services:
- name: ${IMAGE_TAG}
alias: noblogs
- name: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/mysql:latest
alias: mysql
variables:
APACHE_PORT: 8080
SITE_URL: "http://noblogs:8080"
MYSQL_DATABASE: noblogstest
MYSQL_ROOT_PASSWORD: changeme
script:
- apt -q update
- env DEBIAN_FRONTEND=noninteractive apt -y --no-install-recommends install mariadb-client curl
- curl -v ${SITE_URL}
......@@ -17,3 +17,6 @@ COPY docker/post-upgrade.sh /post-upgrade.sh
RUN /tmp/build.sh && rm /tmp/build.sh
# For testing purposes (8080 is the default port of apache2-php-base).
EXPOSE 8080/tcp
......@@ -4,8 +4,38 @@
* First of all, read our own configuration file.
*
* Store the result in an associative array '$noblogs_config'.
*
* If the configuration file does not exist, start with a testing
* configuration that is meant to work with our CI.
*/
$noblogs_config = json_decode(file_get_contents('/etc/noblogs/config.json'), true);
$noblogs_config = array(
"secrets" => array(
"auth_key" => "testkey",
"secure_auth_key" => "testkey",
"logged_in_key" => "testkey",
"nonce_key" => "testkey",
"auth_salt" => "testkey",
"secure_auth_salt" => "testkey",
"logged_in_salt" => "testkey",
"nonce_salt" => "testkey"
),
"db_config" => array(
"backends" => array(
"default" => array(
"host" => "mysql",
"port" => "3306",
"name" => getenv("MYSQL_DATABASE"),
"user" => "root",
"password" => getenv("MYSQL_ROOT_PASSWORD")
)
)
)
);
$noblogs_config_json = file_get_contents('/etc/noblogs/config.json');
if ($noblogs_config_json) {
$noblogs_config = json_decode($noblogs_config_json, true);
}
/**
* The base configurations of the WordPress.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment