From e805426209e5ff23523edc28b5311ed29059878f Mon Sep 17 00:00:00 2001 From: vindard <17693119+vindard@users.noreply.github.com> Date: Mon, 27 Nov 2023 15:50:31 -0400 Subject: [PATCH 1/2] build: refactor integration pipeline to run 'legacy' tests --- ci/pipeline.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ci/pipeline.yml b/ci/pipeline.yml index d4d6a3920d..50f56b7060 100644 --- a/ci/pipeline.yml +++ b/ci/pipeline.yml @@ -73,7 +73,7 @@ groups: - name: galoy jobs: - buck-test - - integration-tests + - legacy-integration-tests - bats-tests - legacy-bats-tests - build-edge-image @@ -114,8 +114,8 @@ jobs: BUCK_CMD: test run: path: pipeline-tasks/ci/apps/tasks/buck-task.sh - - name: integration-tests - #@ container = "integration-tests" + - name: legacy-integration-tests + #@ container = "legacy-integration-tests" #@ params = {} #@ params["REPO_PATH"] = data.values.gh_repository + "-" + container #@ params["GOOGLE_CREDENTIALS"] = "((staging-gcp-creds.creds_json))" @@ -123,7 +123,7 @@ jobs: #@ params["SSH_PUB_KEY"] = "((staging-ssh.ssh_public_key))" #@ params["JEST_TIMEOUT"] = 90000 #@ params["PACKAGE_DIR"] = "core/api" - #@ params["CMD"] = "make integration-in-ci" + #@ params["CMD"] = "make legacy-integration-in-ci" serial: true plan: - { put: docker-host, params: { acquire: true } } @@ -629,7 +629,7 @@ jobs: trigger: true passed: - buck-test - - integration-tests + - legacy-integration-tests - legacy-bats-tests - bats-tests - build-debug-edge-image From 45bf8220d90e71fe4de19797574c93c7596f6033 Mon Sep 17 00:00:00 2001 From: vindard <17693119+vindard@users.noreply.github.com> Date: Mon, 27 Nov 2023 17:11:17 -0400 Subject: [PATCH 2/2] build: add core tilt integration pipeline container --- ci/pipeline.yml | 65 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/ci/pipeline.yml b/ci/pipeline.yml index 50f56b7060..4228fa2f0e 100644 --- a/ci/pipeline.yml +++ b/ci/pipeline.yml @@ -69,6 +69,34 @@ source: repository: #@ galoy_dev_image() #@ end +#@ def tilt_integration_test_name(container): +#@ return "tilt-" + container +#@ end + +#@ def core_src_resource_name(app): +#@ return app + "-src" +#@ end + +#@ def core_src_resource(app): +name: #@ core_src_resource_name(app) +type: git +source: + paths: + - #@ "core/" + app + - #@ "core/" + app + "/*" + - #@ "core/" + app + "/**/*" + - flake.nix + - flake.lock + - toolchains/ + - toolchains/* + - toolchains/**/* + - pnpm-lock.yaml + fetch_tags: true + uri: #@ data.values.git_uri + branch: #@ data.values.git_branch + private_key: #@ data.values.github_private_key +#@ end + groups: - name: galoy jobs: @@ -114,6 +142,43 @@ jobs: BUCK_CMD: test run: path: pipeline-tasks/ci/apps/tasks/buck-task.sh + + - name: integration-tests + #@ container = "integration-tests" + #@ sub_core = "api" + #@ params = {} + #@ params["REPO_PATH"] = data.values.gh_repository + "-" + container + #@ params["GOOGLE_CREDENTIALS"] = "((staging-gcp-creds.creds_json))" + #@ params["SSH_PRIVATE_KEY"] = "((staging-ssh.ssh_private_key))" + #@ params["SSH_PUB_KEY"] = "((staging-ssh.ssh_public_key))" + #@ params["CMD"] = "tilt --file dev/Tiltfile ci -- --test " + "core" + serial: true + plan: + - { put: nix-host, params: { acquire: true } } + - in_parallel: + - { get: repo, trigger: true } + - { get: pipeline-tasks } + - task: #@ tilt_integration_test_name(container) + attempts: 2 + timeout: 18m + tags: ["galoy-staging"] + config: + platform: linux + image_resource: #@ galoy_dev_image_config() + inputs: + - name: pipeline-tasks + - name: docker-host + path: nix-host + - name: #@ core_src_resource_name(sub_core) + path: #@ data.values.gh_repository + "-" + container + params: #@ params + run: + path: pipeline-tasks/ci/apps/tasks/run-on-nix-host.sh + ensure: + put: docker-host + params: + release: docker-host + - name: legacy-integration-tests #@ container = "legacy-integration-tests" #@ params = {}