Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
GitLab Drupal CI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
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
Docker
GitLab Drupal CI
Commits
f349c5cd
Commit
f349c5cd
authored
5 years ago
by
jurgenhaas
Browse files
Options
Downloads
Patches
Plain Diff
l3d#37
Add phpstan script which runs in its own docker container
parent
f4f79991
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#12152
passed
5 years ago
Stage: build
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bin/phpstan
+4
-0
4 additions, 0 deletions
bin/phpstan
bin/volume.php
+6
-4
6 additions, 4 deletions
bin/volume.php
with
10 additions
and
4 deletions
bin/phpstan
0 → 100755
+
4
−
0
View file @
f349c5cd
#!/bin/bash
export
$(
cat
.env | xargs
)
docker run
--rm
-v
$(
php /usr/local/bin/volume.php /app
)
phpstan/phpstan
"
$@
"
This diff is collapsed.
Click to expand it.
bin/volume.php
+
6
−
4
View file @
f349c5cd
...
...
@@ -16,15 +16,17 @@ function readContainerConfig() {
return
[];
}
function
getDockerMountSource
()
{
function
getDockerMountSource
(
$args
)
{
$currentDir
=
getcwd
();
$destDir
=
(
empty
(
$args
[
1
]))
?
$currentDir
:
$args
[
1
];
$container
=
readContainerConfig
();
foreach
(
$container
[
'Mounts'
]
as
$mount
)
{
if
(
strpos
(
$currentDir
,
$mount
[
'Destination'
])
===
0
)
{
return
$mount
[
'Source'
]
.
':'
.
$mount
[
'Destination'
];
return
$mount
[
'Source'
]
.
':'
.
(
empty
(
$args
[
1
])
?
$mount
[
'Destination'
]
:
$destDir
)
;
}
}
return
$currentDir
.
':'
.
$
curren
tDir
;
return
$currentDir
.
':'
.
$
des
tDir
;
}
print
(
getDockerMountSource
());
print
(
getDockerMountSource
(
$argv
));
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