Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
Zipr Toolchain
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Open Source Software
Zipr Toolchain
Commits
67fa8486
Commit
67fa8486
authored
6 years ago
by
Matthew McGill
Browse files
Options
Downloads
Patches
Plain Diff
thanos integration
Former-commit-id: 31c1fbc8b61872857a33414592816697300a424b
parent
9cbcf9b9
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/ps_analyze.sh
+30
-13
30 additions, 13 deletions
tools/ps_analyze.sh
with
30 additions
and
13 deletions
tools/ps_analyze.sh
+
30
−
13
View file @
67fa8486
...
...
@@ -551,8 +551,22 @@ perform_step()
$command
2>&1 |
tee
$logfile
command_exit
=
${
PIPESTATUS
[0]
}
# this funkiness gets the exit code of $command, not tee
else
$command
>
$logfile
2>&1
command_exit
=
$?
echo
"
$command
"
|grep
"
\.
/lib
$step
\.
so "
>
/dev/null
grep_res
=
$?
if
[
$grep_res
-eq
0
]
;
then
echo
"
$user_critical_steps
"
|egrep
"
$step
"
>
/dev/null
grep_res
=
$?
if
[
$grep_res
-eq
0
]
;
then
echo
"EXECUTE_STEP CRITICAL
$command
"
>
$input_pipe
else
echo
"EXECUTE_STEP OPTIONAL
$command
"
>
$input_pipe
fi
read
-r
thanos_res <
$output_pipe
echo
"Response was
$thanos_res
"
else
$command
>
$logfile
2>&1
command_exit
=
$?
fi
fi
endtime
=
`
$PS_DATE
`
...
...
@@ -670,6 +684,8 @@ do_plugins()
perform_step
$stepname
none
$plugin_path
/
$stepname
.exe
$cloneid
$value
elif
[
-x
$plugin_path
/
$stepname
.sh
]
;
then
perform_step
$stepname
none
$plugin_path
/
$stepname
.sh
$cloneid
$value
elif
[
-x
$plugin_path
/lib
$stepname
.so
]
;
then
perform_step
$stepname
none ./lib
$stepname
.so
$cloneid
$value
else
echo
"*********************************************************"
echo
"*********************************************************"
...
...
@@ -994,17 +1010,18 @@ input_pipe="thanos_input"
output_pipe
=
"thanos_output"
[
-p
$output_pipe
]
||
mkfifo
$output_pipe
$SECURITY_TRANSFORMS_HOME
/plugins_install/transform_step_plugins/thanos.exe
$input_pipe
$output_pipe
&
# test thanos (DELETE ME)
printf
"TEST"
>
$input_pipe
sleep
5
read
-r
cmd <
$output_pipe
if
[
"
$cmd
"
]
;
then
printf
'Response was %s \n'
"
$cmd
"
fi
printf
"THANOS_DONE"
>
$input_pipe
sleep
5
$SECURITY_TRANSFORMS_HOME
/plugins_install/thanos.exe
$input_pipe
$output_pipe
&
thanos_pid
=
$!
# Make sure thanos is always exited
function
exit_thanos
{
# will do the job for emergency exits
kill
$thanos_pid
wait
$thanos_pid
2>/dev/null
rm
-f
$input_pipe
rm
-f
$output_pipe
}
trap
exit_thanos EXIT
#
# copy the .so files for this exe into a working directory.
...
...
@@ -1056,7 +1073,7 @@ if [ $record_stats -eq 1 ]; then
fi
# build basic IR
perform_step fill_in_cfg mandatory
$SECURITY_TRANSFORMS_HOME
/bin/
fill_in_cfg.
exe
$varid
$step_options_fill_in_cfg
perform_step fill_in_cfg mandatory
./lib
fill_in_cfg.
so
$varid
$step_options_fill_in_cfg
perform_step fill_in_safefr mandatory
$SECURITY_TRANSFORMS_HOME
/bin/fill_in_safefr.exe
$varid
perform_step fill_in_indtargs mandatory
$SECURITY_TRANSFORMS_HOME
/bin/fill_in_indtargs.exe
$varid
$step_options_fill_in_indtargs
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment