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
bcf489ef
Verified
Commit
bcf489ef
authored
5 years ago
by
Guillaume Damiens
Browse files
Options
Downloads
Patches
Plain Diff
suppresion de tableaux associatifs et adaptation pour docker-compose
parent
8936bba7
No related branches found
Branches containing commit
No related tags found
1 merge request
!37
Tx services p19 test
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
pica-wekan-scripts/ids_example.sh
+1
-1
1 addition, 1 deletion
pica-wekan-scripts/ids_example.sh
pica-wekan-scripts/policy.sh
+11
-12
11 additions, 12 deletions
pica-wekan-scripts/policy.sh
pica-wekan-scripts/run.sh
+1
-1
1 addition, 1 deletion
pica-wekan-scripts/run.sh
with
13 additions
and
14 deletions
pica-wekan-scripts/ids_example.sh
+
1
−
1
View file @
bcf489ef
#!/bin/
ba
sh
#!/bin/sh
username
=
"username"
password
=
"password"
This diff is collapsed.
Click to expand it.
pica-wekan-scripts/policy.sh
+
11
−
12
View file @
bcf489ef
#!/bin/
ba
sh
#!/bin/sh
.
ids.sh
# contient $username et $password pour authentification
boardsToDelete[init]
=
false
.
./ids.sh
# contient $username et $password pour authentification
# Paramètres
boardExpirationDurationYears
=
0
# années
boardExpirationDurationMonths
=
12
# mois
boardExpirationDurationDays
=
0
# jours
url
=
https://wekan.test.picasoft.net
boardExpirationDurationYears
=
${
boardExpirationDurationYears
-0
}
# années
boardExpirationDurationMonths
=
${
boardExpirationDurationMonths
-
12
}
# mois
boardExpirationDurationDays
=
${
boardExpirationDurationDays
-0
}
# jours
url
=
${
url
-
"
https://wekan.test.picasoft.net
"
}
# Deadline = somme des durées du dessus
deadlineTimeStamp
=
$(
date
-d
"-"
$boardExpirationDurationYears
"years-"
$boardExpirationDurationMonths
"months-"
$boardExpirationDurationDays
"days"
+%s
)
delete
=
false
...
...
@@ -17,6 +15,7 @@ while getopts "d" option
do
delete
=
true
done
boardsToDelete
=
""
# Récupération du token de connexion
queryPica
=
$(
curl
-s
$url
/users/login
-d
'username='
"
$username
"
'&password='
"
$password
"
''
)
...
...
@@ -60,12 +59,12 @@ do
echo
"Suppresion du board "
$boardTitle
" (_id "
$userBoard
", modifié le "
$lastModificationDate
")"
# Suppression du board si trop ancien
curl
-X
DELETE https://wekan.test.picasoft.net/api/boards/
$userBoard
\
-H
'Authorization: Bearer '
"
$token
"
''
elif
[
$
{
boardsToDelete
[
$userBoard
]
}
=
false
]
#
curl -X DELETE https://wekan.test.picasoft.net/api/boards/$userBoard \
#
-H 'Authorization: Bearer '"$token"''
elif
[
$
(
echo
$
boardsToDelete
|
grep
-c
$userBoard
)
-eq
0
]
then
boardsToDelete[
$userBoard
]=
true
echo
"Board "
$boardTitle
" trop ancien (modifié le "
$lastModificationDate
")"
boardsToDelete
=
$boardsToDelete$userBoard
fi
fi
done
...
...
This diff is collapsed.
Click to expand it.
pica-wekan-scripts/run.sh
+
1
−
1
View file @
bcf489ef
#!/bin/bash
if
[
$DRYRUN
-eq
0]
if
[
$DRYRUN
-eq
0
]
then
./policy.sh
-d
else
...
...
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