beacon-node-builds: set entrypoint based on targets

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2020-11-10 15:39:24 +01:00
parent dba111b404
commit 055c74aa52
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
4 changed files with 11 additions and 9 deletions

View File

@ -13,17 +13,17 @@ beacon_node_build_timer_timeout: 1200
beacon_node_builds_branches:
- name: 'devel'
branch: 'devel'
target: 'nimbus_beacon_node_spec_0_12_3 nimbus_signing_process'
targets: ['nimbus_beacon_node_spec_0_12_3', 'nimbus_signing_process']
frequency: '*-*-* 10:00:00'
- name: 'master'
branch: 'master'
target: 'nimbus_beacon_node_spec_0_12_3 nimbus_signing_process'
targets: ['nimbus_beacon_node_spec_0_12_3', 'nimbus_signing_process']
frequency: '*-*-* 02:00:00'
- name: 'libp2p'
branch: 'nim-libp2p-auto-bump'
target: 'nimbus_beacon_node_spec_0_12_3 nimbus_signing_process'
targets: ['nimbus_beacon_node_spec_0_12_3', 'nimbus_signing_process']
frequency: '*-*-* 18:00:00'
- name: 'toledo'
branch: 'devel'
target: 'nimbus_beacon_node nimbus_signing_process'
targets: ['nimbus_beacon_node', 'nimbus_signing_process']
frequency: '*-*-* 20:00:00'

View File

@ -25,8 +25,8 @@
mode: 0755
- name: '{{ item.name }} - Create Dockerfile'
copy:
src: 'Dockerfile'
template:
src: 'Dockerfile.j2'
dest: '{{ beacon_node_builds_path }}/{{ item.name }}/Dockerfile'
owner: '{{ beacon_node_builds_user }}'
group: 'adm'

View File

@ -7,10 +7,12 @@ RUN apt-get -qq update \
&& apt-get -qq clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
COPY repo/build/beacon_node repo/build/signing_process /usr/local/bin/
{% for target in item.targets %}
COPY repo/build/{{ target }} /usr/local/bin/
{% endfor %}
STOPSIGNAL SIGINT
ENTRYPOINT ["/usr/local/bin/beacon_node"]
ENTRYPOINT ["/usr/local/bin/{{ item.targets | first }}"]
CMD ["--help"]

View File

@ -30,7 +30,7 @@ make \
LOG_LEVEL="TRACE" \
MAKEFLAGS="-j$(nproc)" \
NIMFLAGS="-d:insecure -d:testnet_servers_image" \
{{ item.target }}
{{ item.targets | join(" ") }}
popd