Revert "Copy the repo before running any tests."
This reverts commit edae9ebd0e
.
This commit is contained in:
parent
3ef7c1a34e
commit
3dc44b4e1c
|
@ -3,4 +3,4 @@ variables:
|
||||||
|
|
||||||
test:
|
test:
|
||||||
script:
|
script:
|
||||||
- docker run --rm -h pandorafms -t -v "$CI_PROJECT_DIR:$CI_PROJECT_DIR" -e CI_PROJECT_DIR="$CI_PROJECT_DIR" pandorafms/pandorafms-base /tmp/pandorafms/tests/test.sh
|
- docker run --rm -h pandorafms -t -v "$CI_PROJECT_DIR:/tmp/pandorafms" pandorafms/pandorafms-base /tmp/pandorafms/tests/test.sh
|
||||||
|
|
|
@ -1,11 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
SOURCE_DIR="/tmp/pandorafms"
|
SOURCE_DIR="/tmp/pandorafms"
|
||||||
|
|
||||||
# Work on a clean directory when using GitLab CI.
|
|
||||||
if [ "$CI_PROJECT_DIR" != "" ]; then
|
|
||||||
cp -r "$CI_PROJECT_DIR" "$SOURCE_DIR"
|
|
||||||
fi
|
|
||||||
|
|
||||||
################################################
|
################################################
|
||||||
# Check the exit status of the last run command.
|
# Check the exit status of the last run command.
|
||||||
# Exits if it different from 0.
|
# Exits if it different from 0.
|
||||||
|
@ -28,24 +23,24 @@ service httpd start
|
||||||
check "Starting the Apache Web Server" $?
|
check "Starting the Apache Web Server" $?
|
||||||
|
|
||||||
# Install the Pandora FMS Console.
|
# Install the Pandora FMS Console.
|
||||||
cd $SOURCE_DIR/pandora_console && chmod +x pandora_console_install && yes | ./pandora_console_install --install
|
cd /tmp/pandorafms/pandora_console && chmod +x pandora_console_install && yes | ./pandora_console_install --install
|
||||||
check "Installing the Pandora FMS Console" $?
|
check "Installing the Pandora FMS Console" $?
|
||||||
|
|
||||||
# Create the Pandora FMS database.
|
# Create the Pandora FMS database.
|
||||||
cd $SOURCE_DIR/tests && chmod +x install_console.py && ./install_console.py
|
cd /tmp/pandorafms/tests && chmod +x install_console.py && ./install_console.py
|
||||||
check "Creating the Pandora FMS Database" $?
|
check "Creating the Pandora FMS Database" $?
|
||||||
|
|
||||||
# Build and install the Pandora FMS Server.
|
# Build and install the Pandora FMS Server.
|
||||||
cd $SOURCE_DIR/pandora_server && perl Makefile.PL && make # Do not run make test now. Some tests need files created by pandora_server_installer.
|
cd /tmp/pandorafms/pandora_server && perl Makefile.PL && make # Do not run make test now. Some tests need files created by pandora_server_installer.
|
||||||
check "Building the Pandora FMS Server" $?
|
check "Building the Pandora FMS Server" $?
|
||||||
cd $SOURCE_DIR/pandora_server && chmod +x pandora_server_installer && ./pandora_server_installer --install
|
cd /tmp/pandorafms/pandora_server && chmod +x pandora_server_installer && ./pandora_server_installer --install
|
||||||
check "Installing the Pandora FMS Server" $?
|
check "Installing the Pandora FMS Server" $?
|
||||||
sed -i -e 's/^dbuser.*/dbuser root/' /etc/pandora/pandora_server.conf
|
sed -i -e 's/^dbuser.*/dbuser root/' /etc/pandora/pandora_server.conf
|
||||||
cd $SOURCE_DIR/pandora_server && make test
|
cd /tmp/pandorafms/pandora_server && make test
|
||||||
check "Running tests for the Pandora FMS Server" $?
|
check "Running tests for the Pandora FMS Server" $?
|
||||||
|
|
||||||
# Install the Pandora FMS Agent.
|
# Install the Pandora FMS Agent.
|
||||||
cd $SOURCE_DIR/pandora_agents/unix && chmod +x pandora_agent_installer && ./pandora_agent_installer --install
|
cd /tmp/pandorafms/pandora_agents/unix && chmod +x pandora_agent_installer && ./pandora_agent_installer --install
|
||||||
check "Installing the Pandora FMS Agent" $?
|
check "Installing the Pandora FMS Agent" $?
|
||||||
|
|
||||||
# Start Pandora FMS services.
|
# Start Pandora FMS services.
|
||||||
|
|
Loading…
Reference in New Issue