diff --git a/ros_buildfarm/templates/snippet/add_distribution_repositories.Dockerfile.em b/ros_buildfarm/templates/snippet/add_distribution_repositories.Dockerfile.em index 13b88a610..8d65d0c79 100644 --- a/ros_buildfarm/templates/snippet/add_distribution_repositories.Dockerfile.em +++ b/ros_buildfarm/templates/snippet/add_distribution_repositories.Dockerfile.em @@ -12,7 +12,7 @@ ubuntu_before_bionic = ( RUN for i in 1 2 3; do apt-get update && apt-get install -q -y gnupg ca-certificates && apt-get clean && break || if [ $i -lt 3 ]; then sleep 5; else false; fi; done @[end if]@ @[for i, key in enumerate(distribution_repository_keys)]@ -RUN echo "@('\\n'.join(key.splitlines()))" > /tmp/keys/@(i).key && apt-key add /tmp/keys/@(i).key +RUN echo "@('\\n'.join(key.splitlines()))" > /tmp/keys/@(i).key@[if key] && apt-key add /tmp/keys/@(i).key@[end if] @[end for]@ @[for url in distribution_repository_urls]@ RUN echo deb @url @os_code_name main | tee -a /etc/apt/sources.list.d/buildfarm.list