mirror of https://github.com/MISP/MISP
commit
83945e4885
|
@ -15,7 +15,13 @@ jobs:
|
|||
# This workflow contains a single job called "build"
|
||||
build:
|
||||
# The type of runner that the job will run on
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest]
|
||||
php: ['7.2', '7.3', '7.4']
|
||||
|
||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||
steps:
|
||||
|
@ -45,21 +51,19 @@ jobs:
|
|||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: '7.4'
|
||||
tools: pecl, composer
|
||||
extensions: mysql, mbstring, json, xml, opcache, readline, redis, gnupg, gd
|
||||
|
||||
php-version: ${{ matrix.php }}
|
||||
extensions: mysql, mbstring, json, xml, opcache, readline, redis, gd
|
||||
|
||||
# Runs a set of commands using the runners shell
|
||||
- name: Install deps
|
||||
env:
|
||||
php_version: ${{ matrix.php }}
|
||||
run: |
|
||||
git submodule update --init --recursive
|
||||
date
|
||||
sudo apt-get -y update
|
||||
sudo apt-get -y install python3 python3-venv virtualenv python3-pip python3-dev python3-nose python3-redis python3-lxml python3-dateutil python3-msgpack libxml2-dev libzmq3-dev zlib1g-dev apache2 curl php7.4-dev php7.4-cli libapache2-mod-php libfuzzy-dev libonig4
|
||||
sudo pip3 install --upgrade pip setuptools requests pyzmq
|
||||
sudo apt-get -y install python3 python3-venv virtualenv python3-pip python3-nose python3-redis python3-lxml apache2 curl libapache2-mod-php libfuzzy-dev
|
||||
sudo pip3 install --upgrade pip setuptools requests pyzmq poetry
|
||||
sudo pip3 install --upgrade -r requirements.txt
|
||||
sudo pip3 install poetry
|
||||
USER=`id -u -n`
|
||||
sudo chown $USER:www-data $HOME/.composer
|
||||
pushd app
|
||||
|
@ -123,6 +127,7 @@ jobs:
|
|||
- name: Configure MISP
|
||||
run: |
|
||||
USER=`id -u -n`
|
||||
sudo -E su $USER -c 'app/Console/cake Admin setSetting "MISP.osuser" $USER'
|
||||
sudo -E su $USER -c 'app/Console/cake Admin runUpdates'
|
||||
sudo -E su $USER -c 'app/Console/cake userInit -q | sudo tee ./key.txt'
|
||||
sudo -E su $USER -c 'app/Console/cake Admin setSetting "Session.autoRegenerate" 0'
|
||||
|
@ -164,8 +169,7 @@ jobs:
|
|||
run: |
|
||||
USER=`id -u -n`
|
||||
sudo chmod +x app/Console/worker/start.sh
|
||||
sudo -E su $USER -c 'app/Console/worker/start.sh &'
|
||||
sleep 10
|
||||
sudo -E su $USER -c 'app/Console/worker/start.sh'
|
||||
|
||||
- name: Python setup
|
||||
run: |
|
||||
|
@ -213,7 +217,6 @@ jobs:
|
|||
./curl_tests_GH.sh $AUTH $HOST
|
||||
popd
|
||||
pushd PyMISP
|
||||
git pull origin main --tags -f
|
||||
poetry install -E fileobjects -E openioc -E virustotal -E docs -E pdfexport
|
||||
poetry run python tests/testlive_comprehensive.py
|
||||
poetry run python tests/test_mispevent.py
|
||||
|
|
|
@ -443,7 +443,6 @@ class ACLComponent extends Component
|
|||
'fetchServersForSG' => array('perm_sharing_group'),
|
||||
'filterEventIndex' => array(),
|
||||
'getApiInfo' => array('*'),
|
||||
'getGit' => array(),
|
||||
'getInstanceUUID' => array('perm_sync'),
|
||||
'getPyMISPVersion' => array('*'),
|
||||
'getRemoteUser' => array(),
|
||||
|
|
|
@ -1824,11 +1824,6 @@ class ServersController extends AppController
|
|||
$this->set('_serialize', 'response');
|
||||
}
|
||||
|
||||
public function getGit()
|
||||
{
|
||||
$status = $this->Server->getCurrentGitStatus();
|
||||
}
|
||||
|
||||
public function checkout()
|
||||
{
|
||||
$result = $this->Server->checkoutMain();
|
||||
|
@ -1839,11 +1834,17 @@ class ServersController extends AppController
|
|||
if ($this->request->is('post')) {
|
||||
$status = $this->Server->getCurrentGitStatus();
|
||||
$raw = array();
|
||||
if (empty($status['branch'])) { // do not try to update if you are not on branch
|
||||
$msg = 'Update failed, you are not on branch';
|
||||
$raw[] = $msg;
|
||||
$update = $msg;
|
||||
} else {
|
||||
$update = $this->Server->update($status, $raw);
|
||||
}
|
||||
if ($this->_isRest()) {
|
||||
return $this->RestResponse->viewData(array('results' => $raw), $this->response->type());
|
||||
} else {
|
||||
return new CakeResponse(array('body'=> $update, 'type' => 'txt'));
|
||||
return new CakeResponse(array('body' => $update, 'type' => 'txt'));
|
||||
}
|
||||
} else {
|
||||
$branch = $this->Server->getCurrentBranch();
|
||||
|
|
|
@ -258,7 +258,7 @@ class PubSubTool
|
|||
// Because setting file contains secrets, it should be readable just by owner. But because in Travis test,
|
||||
// config file is created under one user and then changed under other user, file must be readable and writable
|
||||
// also by group.
|
||||
chmod($settingsFile->pwd(), 0660);
|
||||
@chmod($settingsFile->pwd(), 0660); // hide error if current user is not file owner
|
||||
if (!$settingsFile->write(json_encode($settings))) {
|
||||
throw new Exception("Could not write zmq config file '$settingFilePath'.");
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
?>
|
||||
<legend>Update MISP</legend>
|
||||
<div style="padding-left:5px;padding-right:5px;padding-bottom:5px;">
|
||||
<p><?php echo __('Do you want to pull the latest commit from the <?php echo h($branch); ?> branch? If you have made local changes to MISP the merge will fail.');?></p>
|
||||
<p><?php echo __('Do you want to pull the latest commit from the %s branch? If you have made local changes to MISP the merge will fail.', h($branch));?></p>
|
||||
<table>
|
||||
<tr>
|
||||
<td style="vertical-align:top">
|
||||
|
|
Loading…
Reference in New Issue