From 32fb0175b4c7a1360c106bf724d67b483bd17657 Mon Sep 17 00:00:00 2001 From: Tim 'mithro' Ansell Date: Wed, 9 Jan 2019 09:41:01 -0800 Subject: [PATCH 1/3] infra: Support build types. Signed-off-by: Tim 'mithro' Ansell --- Dockerfile | 2 +- cloudbuild.yaml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index d90cf860..e7408a7a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ ARG NUM_PARALLEL_JOBS=1 COPY . /source RUN cd /source && make -j${NUM_PARALLEL_JOBS} --output-sync=target --warn-undefined-variables build && make env -RUN bash -c ". /source/database/artix7/settings.sh; cd /source/fuzzers && make --output-sync=target --warn-undefined-variables" +RUN bash -c ". /source/database/artix7/settings.sh; cd /source/fuzzers && make --output-sync=target --warn-undefined-variables ${BUILD_TYPE}" #RUN find /source/database -mindepth 1 -maxdepth 1 -type d -exec /source/htmlgen/htmlgen.py --settings={}/settings.sh --output=/output/html \; RUN mkdir -p /output/raw && find /source/database -mindepth 1 -maxdepth 1 -type d -exec cp -R {} /output/raw \; diff --git a/cloudbuild.yaml b/cloudbuild.yaml index db3b73ba..6bb48418 100644 --- a/cloudbuild.yaml +++ b/cloudbuild.yaml @@ -6,6 +6,8 @@ steps: - 'DEV_ENV_IMAGE=${_DEV_ENV_IMAGE}' - '--build-arg' - 'NUM_PARALLEL_JOBS=${_NUM_CPUS}' + - '--build-arg' + - 'BUILD_TYPE=${_BUILD_TYPE}' - '-t' - '${_GCR_ZONE}/$PROJECT_ID/${_IMAGE_NAME}:${SHORT_SHA}' - '.' @@ -17,5 +19,6 @@ substitutions: _GCR_ZONE: 'gcr.io' _IMAGE_NAME: 'prjxray-db' _NUM_CPUS: '16' + _BUILD_TYPE: '' images: - '${_GCR_ZONE}/$PROJECT_ID/${_IMAGE_NAME}:${SHORT_SHA}' From 9c51d2f16fe9d83c24e9a6089ece85e081d852ac Mon Sep 17 00:00:00 2001 From: Tim 'mithro' Ansell Date: Wed, 9 Jan 2019 09:38:16 -0800 Subject: [PATCH 2/3] infra: Increase build timeout. Signed-off-by: Tim 'mithro' Ansell --- cloudbuild.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloudbuild.yaml b/cloudbuild.yaml index 6bb48418..6844f869 100644 --- a/cloudbuild.yaml +++ b/cloudbuild.yaml @@ -14,7 +14,7 @@ steps: options: disk_size_gb: 1000 machine_type: N1_HIGHCPU_32 -timeout: '21600s' +timeout: '24h0m0s' substitutions: _GCR_ZONE: 'gcr.io' _IMAGE_NAME: 'prjxray-db' From 8415f94813335bfe65349528da9d0efcf4fab67b Mon Sep 17 00:00:00 2001 From: Tim 'mithro' Ansell Date: Wed, 9 Jan 2019 09:42:54 -0800 Subject: [PATCH 3/3] infra: Move cloudbuild under .github directory. Reduce clutter at top level. Signed-off-by: Tim 'mithro' Ansell --- cloudbuild.yaml => .github/cloudbuild.yaml | 2 ++ Dockerfile => .github/cloudbuild/Dockerfile | 0 2 files changed, 2 insertions(+) rename cloudbuild.yaml => .github/cloudbuild.yaml (92%) rename Dockerfile => .github/cloudbuild/Dockerfile (100%) diff --git a/cloudbuild.yaml b/.github/cloudbuild.yaml similarity index 92% rename from cloudbuild.yaml rename to .github/cloudbuild.yaml index 6844f869..1332d059 100644 --- a/cloudbuild.yaml +++ b/.github/cloudbuild.yaml @@ -10,6 +10,8 @@ steps: - 'BUILD_TYPE=${_BUILD_TYPE}' - '-t' - '${_GCR_ZONE}/$PROJECT_ID/${_IMAGE_NAME}:${SHORT_SHA}' + - '-f' + - '.github/cloudbuild/Dockerfile' - '.' options: disk_size_gb: 1000 diff --git a/Dockerfile b/.github/cloudbuild/Dockerfile similarity index 100% rename from Dockerfile rename to .github/cloudbuild/Dockerfile