Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Dockerfiles
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Picasoft
Technique
Dockerfiles
Commits
11f52311
Verified
Commit
11f52311
authored
4 years ago
by
Quentin Duchemin
Browse files
Options
Downloads
Patches
Plain Diff
[docker_test.sh] Add logic for new services
parent
52c0d18d
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docker_test.sh
+28
-18
28 additions, 18 deletions
docker_test.sh
with
28 additions
and
18 deletions
docker_test.sh
+
28
−
18
View file @
11f52311
...
...
@@ -24,29 +24,21 @@ if [[ $# -ne 1 ]]; then
usage
fi
if
[[
!
-d
"
$1
"
]]
;
then
echo
"ERROR : directory does not exist (
$1
)"
usage
fi
# Go to the folder of the service which will be tested
cd
"
$1
"
echo
-e
"Starting procedure for
\0
33[31m
$1
\e
[0m..."
if
[[
-d
secrets
]]
;
then
cd
secrets
echo
-e
"
\n
==== Create dumb secret files ===="
for
f
in
*
.secrets.example
;
do
echo
-e
"
\t
File
$1
/secrets/
$(
basename
--
"
$f
"
.secrets.example
)
.secrets created"
cp
--
"
$f
"
"
$(
basename
--
"
$f
"
.secrets.example
)
.secrets"
done
# In case the Docker Compose changed since latest local commit,
# we need to set all down before pulling
if
[[
-d
"
$1
"
]]
;
then
# Go to the folder of the service which will be tested
cd
"
$1
"
echo
-e
"
\n
==== Stop and remove existing containers ===="
docker-compose down
cd
..
else
echo
"WARNING : directory does not exist (
$1
) ; will try to pull"
fi
echo
-e
"
\n
==== Stop and remove existing containers ===="
docker-compose down
echo
-e
"
\n
==== RESET HARD and pull Dockerfiles repository ===="
echo
-e
"Using branch
\0
33[31m
$(
git rev-parse
--abbrev-ref
HEAD
)
\e
[0m, is this correct ? [y/N]"
read
ans
...
...
@@ -59,6 +51,24 @@ else
exit
0
fi
if
[[
-d
"
$1
"
]]
;
then
echo
"ERROR : directory does not exist (
$1
)"
usage
exit
1
fi
cd
"
$1
"
if
[[
-d
secrets
]]
;
then
cd
secrets
echo
-e
"
\n
==== Create dumb secret files ===="
for
f
in
*
.secrets.example
;
do
echo
-e
"
\t
File
$1
/secrets/
$(
basename
--
"
$f
"
.secrets.example
)
.secrets created"
cp
--
"
$f
"
"
$(
basename
--
"
$f
"
.secrets.example
)
.secrets"
done
cd
..
fi
echo
-e
"
\n
==== Replace production URL with testing URL in all files ===="
for
f
in
$(
grep
-l
-r
".picasoft.net"
.
)
;
do
echo
-e
"
\t
Found in"
${
f
}
...
...
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