-
Notifications
You must be signed in to change notification settings - Fork 100
/
Copy pathrelease_create_trigger_task.Dockerfile.em
61 lines (50 loc) · 1.48 KB
/
release_create_trigger_task.Dockerfile.em
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# generated from @template_name
@{os_code_name = 'focal'}@
FROM ubuntu:@os_code_name
VOLUME ["/var/cache/apt/archives"]
ENV DEBIAN_FRONTEND noninteractive
@(TEMPLATE(
'snippet/setup_locale.Dockerfile.em',
timezone=timezone,
))@
RUN useradd -u @uid -l -m buildfarm
@(TEMPLATE(
'snippet/add_distribution_repositories.Dockerfile.em',
distribution_repository_keys=distribution_repository_keys,
distribution_repository_urls=distribution_repository_urls,
os_name='ubuntu',
os_code_name=os_code_name,
add_source=False,
))@
@(TEMPLATE(
'snippet/add_wrapper_scripts.Dockerfile.em',
wrapper_scripts=wrapper_scripts,
))@
# automatic invalidation once every day
RUN echo "@today_str"
@(TEMPLATE(
'snippet/install_python3.Dockerfile.em',
os_name='ubuntu',
os_code_name=os_code_name,
))@
RUN python3 -u /tmp/wrapper_scripts/apt.py update-install-clean -q -y python3-empy python3-pip python3-rosdistro-modules python3-yaml
RUN pip3 install jenkinsapi
USER buildfarm
ENTRYPOINT ["sh", "-c"]
@{
cmd = \
'PYTHONPATH=/tmp/ros_buildfarm:$PYTHONPATH python3 -u' + \
' /tmp/ros_buildfarm/scripts/release/trigger_jobs.py' + \
' ' + config_url + \
' ' + rosdistro_name + \
' ' + release_build_name + \
' --groovy-script ' + groovy_script + \
' --cache-dir ' + cache_dir
if missing_only:
cmd += ' --missing-only'
if source_only:
cmd += ' --source-only'
if not_failed_only:
cmd += ' --not-failed-only'
}@
CMD ["@(cmd.replace('"', '\\"'))"]