From 6c2aa983cdcc2d3d559ca4deaff69683dff8aa68 Mon Sep 17 00:00:00 2001 From: Scott Wittenburg Date: Thu, 2 Mar 2023 10:35:04 -0700 Subject: [PATCH] Add gitlab testing --- .gitlab-ci.yml | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..19ac3bb --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,40 @@ +.pr-refs: + only: + - /^pr[\d]+_.*$/ + variables: + TRAVERSE_DEPTH: 0 + +.merge-queue-refs: + only: + - /^gh-readonly-queue/[^/]+/pr12 / + variables: + TRAVERSE_DEPTH: 1 + +.protected-refs: + only: + - /^main$/ + variables: + TRAVERSE_DEPTH: -1 + +.common-defs: + script: + - uname -a || true + - grep -E 'vendor|model name' /proc/cpuinfo 2>/dev/null | sort -u || head -n10 /proc/cpuinfo 2>/dev/null || true + - nproc || true + - 'echo "Building version: ${BUILDING_VERSION}"' + - 'echo "Traverse depth: ${TRAVERSE_DEPTH}"' + - sleep 300 + - echo "Goodbye" + tags: [ "aws", "public", "x86_64_v2" ] + image: { "name": "ghcr.io/scottwittenburg/python-aws-bash:0.0.3", "entrypoint": [""] } + variables: + BUILDING_VERSION: "${CI_COMMIT_REF_NAME} / ${CI_COMMIT_SHA}" + +pr-job: + extends: [ ".pr-refs", ".common-defs" ] + +merge_queue-job: + extends: [ ".merge-queue-refs", ".common-defs" ] + +protected-job: + extends: [ ".protected-refs", ".common-defs" ]