From be0d9ffbcc4367fd6d151c15f30f5d3736392aa7 Mon Sep 17 00:00:00 2001 From: David Griffin Date: Wed, 6 Nov 2024 14:10:42 -0800 Subject: [PATCH 1/3] Add AWS Lambda tests to Pipeline. --- concourse/pipeline.yml | 56 +++++++++++++++++++++++++++++++----------- 1 file changed, 42 insertions(+), 14 deletions(-) diff --git a/concourse/pipeline.yml b/concourse/pipeline.yml index de245487..15c74109 100644 --- a/concourse/pipeline.yml +++ b/concourse/pipeline.yml @@ -34,6 +34,21 @@ resources: uri: git@github.com:fauna/fauna-jvm.git branch: gh-pages private_key: ((github-ssh-key)) + - name: testtools-repo + type: git + icon: github + source: + uri: git@github.com/fauna/testtools.git + branch: main + private_key: ((github-ssh-key)) + - name: testtools-image + type: registry-image + icon: docker + source: + repository: devex-dx-drivers-platform-tests + aws_access_key_id: ((prod-images-aws-access-key-id)) + aws_secret_access_key: ((prod-images-aws-secret-key)) + aws_region: us-east-2 - name: perf-notify type: slack-notification @@ -55,7 +70,7 @@ jobs: - set_pipeline: self file: repo.git/concourse/pipeline.yml - - name: perf-tests-dev + - name: tests-dev serial: true public: false plan: @@ -63,19 +78,32 @@ jobs: trigger: true - get: repo.git - - - task: run-perf - file: repo.git/concourse/tasks/perf.yml - params: - FAUNA_ENDPOINT: https://db.fauna-dev.com - FAUNA_SECRET: ((dev-driver-perf-test-key)) - FAUNA_ENVIRONMENT: dev - CONCOURSE_URL: http://concourse.faunadb.net/teams/$BUILD_TEAM_NAME/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME - on_success: - put: perf-notify - params: - text_file: slack-message/perf-stats - + - get: testtools-repo + - get: testtools-image + + - in_parallel: + fail_fast: false + steps: + - task: run-perf + file: repo.git/concourse/tasks/perf.yml + params: + FAUNA_ENDPOINT: https://db.fauna-dev.com + FAUNA_SECRET: ((dev-driver-perf-test-key)) + FAUNA_ENVIRONMENT: dev + CONCOURSE_URL: http://concourse.faunadb.net/teams/$BUILD_TEAM_NAME/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME + on_success: + put: perf-notify + params: + text_file: slack-message/perf-stats + - task: aws-lambda-tests + image: testtools-image + file: testtools-repo/fauna-driver-platform-tests/concourse/tasks/java-aws-lambda-tests.yml + params: + GIT_COMMIT: ((.:git-commit)) + FAUNA_SECRET: ((drivers-platform-tests/fauna-secret)) + AWS_LAMBDA_ROLE_ARN: ((drivers-platform-tests/aws-lambda-role-arn)) + AWS_ACCESS_KEY_ID: ((drivers-platform-tests/aws-access-key-id)) + AWS_SECRET_ACCESS_KEY: ((drivers-platform-tests/aws-secret-key)) - name: release serial: true public: false From 7c7a35e640ce05c21a0aae3a50b70deba8ae5445 Mon Sep 17 00:00:00 2001 From: David Griffin Date: Thu, 7 Nov 2024 15:14:13 -0800 Subject: [PATCH 2/3] Ensure packageJar compiles, and output to build/distributions/fauna-jvm-package.zip. --- build.gradle | 2 ++ concourse/pipeline.yml | 3 +++ 2 files changed, 5 insertions(+) diff --git a/build.gradle b/build.gradle index e9599676..37a3acbc 100644 --- a/build.gradle +++ b/build.gradle @@ -111,6 +111,7 @@ tasks.register('packageJar', Zip) { from(tasks.jar) from(configurations.runtimeClasspath) } + archiveFileName = 'fauna-jvm-package.zip' } checkstyle { @@ -125,5 +126,6 @@ tasks.withType(Checkstyle).configureEach { } } +packageJar.dependsOn(compileJava) processResources.dependsOn(writeProps) sourcesJar.dependsOn(writeProps) diff --git a/concourse/pipeline.yml b/concourse/pipeline.yml index 15c74109..c7c98531 100644 --- a/concourse/pipeline.yml +++ b/concourse/pipeline.yml @@ -98,8 +98,11 @@ jobs: - task: aws-lambda-tests image: testtools-image file: testtools-repo/fauna-driver-platform-tests/concourse/tasks/java-aws-lambda-tests.yml + input_mapping: + driver-repo: repo.git params: GIT_COMMIT: ((.:git-commit)) + FAUNA_JVM: repo.git FAUNA_SECRET: ((drivers-platform-tests/fauna-secret)) AWS_LAMBDA_ROLE_ARN: ((drivers-platform-tests/aws-lambda-role-arn)) AWS_ACCESS_KEY_ID: ((drivers-platform-tests/aws-access-key-id)) From 88f17e85fd9985947dfeaeea4e2583eacf05c1c1 Mon Sep 17 00:00:00 2001 From: David Griffin Date: Mon, 11 Nov 2024 10:19:21 -0800 Subject: [PATCH 3/3] PR feedback: Remove unuse GIT_COMMIT env var. --- concourse/pipeline.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/concourse/pipeline.yml b/concourse/pipeline.yml index c7c98531..86c7c187 100644 --- a/concourse/pipeline.yml +++ b/concourse/pipeline.yml @@ -101,7 +101,6 @@ jobs: input_mapping: driver-repo: repo.git params: - GIT_COMMIT: ((.:git-commit)) FAUNA_JVM: repo.git FAUNA_SECRET: ((drivers-platform-tests/fauna-secret)) AWS_LAMBDA_ROLE_ARN: ((drivers-platform-tests/aws-lambda-role-arn))