Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tsm-orchestration
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
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
UFZ TSM
tsm-orchestration
Commits
42ebe464
Commit
42ebe464
authored
11 months ago
by
Joost Hemmen
Browse files
Options
Downloads
Plain Diff
Merge branch '91-create-sftp-sync-job' into 'main'
Resolve "create sftp sync job" Closes
#91
See merge request
!141
parents
fc3fd822
ec183e23
No related branches found
No related tags found
1 merge request
!141
Resolve "create sftp sync job"
Pipeline
#378086
passed
11 months ago
Stage: integration
Stage: end-to-end
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
cron/Dockerfile
+1
-1
1 addition, 1 deletion
cron/Dockerfile
cron/cron-entrypoint.sh
+17
-4
17 additions, 4 deletions
cron/cron-entrypoint.sh
cron/requirements.txt
+2
-1
2 additions, 1 deletion
cron/requirements.txt
with
20 additions
and
6 deletions
cron/Dockerfile
+
1
−
1
View file @
42ebe464
...
...
@@ -3,7 +3,7 @@ ARG DEBIAN_IMAGE_TAG
FROM
debian:${DEBIAN_IMAGE_TAG}
RUN
apt-get update
\
&&
apt-get
install
-y
--no-install-recommends
cron tini python3 python3-pip
\
&&
apt-get
install
-y
--no-install-recommends
cron tini python3 python3-pip
inotify-tools
\
&&
rm
-rf
/var/lib/apt/
\
&&
rm
-rf
/etc/cron.
*
/
*
...
...
This diff is collapsed.
Click to expand it.
cron/cron-entrypoint.sh
+
17
−
4
View file @
42ebe464
...
...
@@ -2,13 +2,26 @@
set
-e
if
[
"
$SETUP_SERVICE
"
==
"true"
]
;
then
echo
"SETUP_SERVICE has value '
$SETUP_SERVICE
' - starting cron setup."
# Function to update crontab from crontab.txt
update_crontab
()
{
# prepend environment variables to /tmp/new_crontab.txt
# to be able topass them to cron jobs
(
printenv
;
cat
/tmp/crontab.txt
)
>
/tmp/new_crontab.txt
# use /tmp/new_crontab.txt as crontab
crontab /tmp/new_crontab.txt
}
if
[
"
$SETUP_SERVICE
"
==
"true"
]
;
then
echo
"SETUP_SERVICE has value '
$SETUP_SERVICE
' - starting cron setup."
# Monitor crontab.txt for changes and update crontab if they occurr
# run loop in background to start cron service
while
true
;
do
update_crontab
inotifywait
-e
modify /tmp/crontab.txt
done
&
sleep
1
cron
-f
||
exit
1
echo
"cron setup complete."
else
echo
"SETUP_SERVICE has value '
$SETUP_SERVICE
' - skipping cron setup."
echo
"To start cron setup, set SETUP_SERVICE to 'true' in .env file."
fi
\ No newline at end of file
fi
This diff is collapsed.
Click to expand it.
cron/requirements.txt
+
2
−
1
View file @
42ebe464
psycopg2-binary~=2.9.2
\ No newline at end of file
psycopg2-binary~=2.9.2
python-crontab~=3.0.0
\ No newline at end of file
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