Pass in workflow inputs for network and checkpoint_sync (with defaults) all the way down
This commit is contained in:
parent
1a1240a943
commit
7023465d91
|
@ -40,7 +40,10 @@ jobs:
|
|||
run: |
|
||||
gcloud builds submit \
|
||||
--config cloudbuild.yaml \
|
||||
--substitutions SHORT_SHA="$SHORT_SHA",BRANCH_NAME="$BRANCH_NAME"
|
||||
--substitutions SHORT_SHA="$SHORT_SHA",\
|
||||
BRANCH_NAME="$BRANCH_NAME",\
|
||||
_CHECKPOINT_SYNC="${{ github.event.inputs.checkpoint_sync }}",\
|
||||
_NETWORK="${{ github.event.inputs.network }}"
|
||||
|
||||
# Run once: create firewall rule to allow incoming traffic to the node
|
||||
# - name: Create Zcash incoming traffic firewall rule
|
||||
|
|
|
@ -35,8 +35,13 @@ FROM debian:buster-slim AS zebrad-release
|
|||
|
||||
COPY --from=builder /zebra/target/release/zebrad /
|
||||
|
||||
ARG checkpoint_sync=true
|
||||
ARG network=Mainnet
|
||||
|
||||
RUN printf "[consensus]\n" >> /zebrad.toml
|
||||
RUN printf "checkpoint_sync = true\n" >> /zebrad.toml
|
||||
RUN printf "checkpoint_sync = $checkpoint_sync\n" >> /zebrad.toml
|
||||
RUN printf "[network]\n" >> /zebrad.toml
|
||||
RUN printf "network = $network\n" >> /zebrad.toml
|
||||
RUN printf "[state]\n" >> /zebrad.toml
|
||||
RUN printf "cache_dir = '/zebrad-cache'\n" >> /zebrad.toml
|
||||
RUN printf "memory_cache_bytes = 52428800\n" >> /zebrad.toml
|
||||
|
|
|
@ -1,8 +1,22 @@
|
|||
steps:
|
||||
- name: 'gcr.io/cloud-builders/docker'
|
||||
args: ['build', '--target', 'zebra-tests', '-t', 'gcr.io/$PROJECT_ID/zcashfoundation/zebra/tests/$BRANCH_NAME:$SHORT_SHA', '.']
|
||||
args: ['build',
|
||||
'--target',
|
||||
'zebra-tests',
|
||||
'-t',
|
||||
'gcr.io/$PROJECT_ID/zcashfoundation/zebra/tests/$BRANCH_NAME:$SHORT_SHA',
|
||||
'.']
|
||||
- name: 'gcr.io/cloud-builders/docker'
|
||||
args: ['build', '--target', 'zebrad-release', '-t', 'gcr.io/$PROJECT_ID/zcashfoundation/zebra/$BRANCH_NAME:$SHORT_SHA', '.']
|
||||
args: ['build',
|
||||
'--build-arg',
|
||||
'checkpoint_sync=${_CHECKPOINT_SYNC}',
|
||||
'--build-arg',
|
||||
'network=${_NETWORK}',
|
||||
'--target',
|
||||
'zebrad-release',
|
||||
'-t',
|
||||
'gcr.io/$PROJECT_ID/zcashfoundation/zebra/$BRANCH_NAME:$SHORT_SHA',
|
||||
'.']
|
||||
|
||||
images:
|
||||
- 'gcr.io/$PROJECT_ID/zcashfoundation/zebra/tests/$BRANCH_NAME:$SHORT_SHA'
|
||||
|
@ -10,5 +24,6 @@ images:
|
|||
|
||||
options:
|
||||
machineType: 'N1_HIGHCPU_32'
|
||||
substitution_option: 'ALLOW_LOOSE'
|
||||
|
||||
timeout: 1800s # 30 mins
|
||||
|
|
Loading…
Reference in New Issue