Skip to content

Conversation

@VinayakGadad
Copy link
Contributor

@VinayakGadad VinayakGadad commented Jun 22, 2023

Purpose:

Technical overview:

  • Build and package the sift-java project into a distribution zip file.
  • Add SSH keys with specified fingerprints for secure access.
  • Clone the sift-java-integration-app repository, and extract the contents of sift-java-3.10.0.zip directly into the app/libs/ directory.
  • Change to the sift-java-integration-app directory and run the tests using Gradle.

Testing plan:

Deployment plan:

  • Merge the PR.

@VinayakGadad VinayakGadad force-pushed the CI-11587-build-integration-testing-app-into-ci-pipeline branch from 5920d8b to 17d250b Compare June 27, 2023 06:39
@VinayakGadad VinayakGadad changed the title Adding the logic to run the sift-integration-app workflow Adding the sift-integration test for the sift-java workflow Jun 27, 2023
@VinayakGadad VinayakGadad requested a review from a team June 27, 2023 07:16
export GIT_SSH_COMMAND='ssh -i ~/.ssh/id_rsa_4cc71df295873cf6614e465ac82ad7c9'
git clone git@github.com:SiftScience/sift-java-integration-app.git
cd sift-java-integration-app
unzip -j ../build/distributions/sift-java-3.10.0.zip -d app/libs/

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The build shouldn't include hard-coded version of the package that it is building.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed it to dynamically pick the versions from gradle properties.

name: Clone sift-java-integration-app and extract sift-java
command: |
export GIT_SSH_COMMAND='ssh -i ~/.ssh/id_rsa_4cc71df295873cf6614e465ac82ad7c9'
version=$(./gradlew properties -q | grep "version:" | awk '{print $2}')
Copy link

@btusakul-sift btusakul-sift Jun 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest editing the grep to use regex and match ^version: . This way, you won't get multiple matches if there are other property names that have version as a suffix.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I ran the ./gradlew properties -q it had only 1 version variable. It makes sense if there are multiple matches.
I have updated the grep accordingly.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a small change to make the build more robust. Have to think about future-proofing where you can.

Copy link

@mpierotti-sift mpierotti-sift left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

@btusakul-sift btusakul-sift left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@VinayakGadad VinayakGadad merged commit 54eb0a1 into master Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants