Skip to content

Commit

Permalink
test RunMdaScript.php in real MDA not tested EduGainRunMdaScript.php
Browse files Browse the repository at this point in the history
  • Loading branch information
temaotl committed Sep 26, 2024
1 parent be07d8a commit c96266a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/Jobs/EduGainRunMdaScript.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function handle(): void
$realScriptPath = realpath($scriptPath);

try {
$file = escapeshellarg($folderName).'.xml';
$file = config('storageCfg.mdaConfigFolder').'/'. escapeshellarg($folderName).'.xml';
$pipeline = 'main';
$command = 'sh '.escapeshellarg($realScriptPath).' '.$file.' '.$pipeline;

Expand Down
6 changes: 2 additions & 4 deletions app/Jobs/RunMdaScript.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,10 @@ public function handle(): void
try {

foreach ($filterArray as $filter) {
$file = escapeshellarg($filter).'.xml';
$file = config('storageCfg.mdaConfigFolder').'/'.escapeshellarg($filter).'.xml';
$pipeline = 'main';
$command = 'sh '.escapeshellarg($realScriptPath).' '.$file.' '.$pipeline;

$res = shell_exec($command);
dump($res);
shell_exec($command);
}

} catch (Exception $e) {
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ services:
volumes:
- '.:/var/www/html'
- '/home/artem/Desktop/cesnet/metadata/testdata/mda:/home/artem/Desktop/cesnet/metadata/testdata/mda'
- '/home/artem/Desktop/cesnet/mda:/home/artem/Desktop/cesnet/mda'
- '/home/artem/Desktop/cesnet/metadata:/home/artem/Desktop/cesnet/metadata'
networks:
- sail
depends_on:
Expand Down
7 changes: 7 additions & 0 deletions docker/8.1/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@ RUN chown -R sail /home/sail/.ssh \
&& chmod go= /home/sail/.ssh/id_ed25519*
RUN chmod +x /usr/local/bin/start-container

RUN apt-get update && \
apt-get install -y openjdk-17-jdk && \
apt-get clean;
ENV JAVA_HOME /usr/lib/jvm/java-17-openjdk-amd64
ENV PATH $JAVA_HOME/bin:$PATH
RUN java -version

EXPOSE 8000

ENTRYPOINT ["start-container"]

0 comments on commit c96266a

Please sign in to comment.