Skip to content

Commit

Permalink
update grakn distribution file name + add client-java-e2e into the Ci…
Browse files Browse the repository at this point in the history
…rcleCI workflow (#2937)

* Why is this PR needed?
The distribution file name is called grakn-dist-$version, which could be better. On the other hand, we found that the client-java-e2e test wasn't added to the CircleCI workflow.

* What does the PR do?
1. Update the distribution file name to grakn-core-$version, eg., grakn-core-1.4.0.
2. Add the client-java-e2e to the CircelCI workflow
  • Loading branch information
lolski committed Aug 8, 2018
1 parent 3b2968c commit 1306b82
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 16 deletions.
23 changes: 13 additions & 10 deletions .circleci/config.yml
Expand Up @@ -44,7 +44,7 @@ jobs:
key: grakn-cache-m2-version-8
- run: mvn versions:set -DnewVersion=test -DgenerateBackupPoms=false
- run: mvn --batch-mode install -T 2.5C -DskipTests=true
- run: tar -xf grakn-dist/target/grakn-dist-test.tar.gz -C grakn-dist/target/
- run: tar -xf grakn-dist/target/grakn-core-test.tar.gz -C grakn-dist/target/
- save_cache:
name: Save maven m2 cache
paths:
Expand Down Expand Up @@ -263,9 +263,9 @@ jobs:
- restore_cache:
name: Restore maven m2 cache
key: grakn-cache-m2-version-8
- run: nohup grakn-dist/target/grakn-dist-test/grakn server start
- run: PATH=$PATH:./grakn-test/test-snb/src/main/bash:./grakn-test/test-integration/src/test/bash:./grakn-dist/target/grakn-dist-test PACKAGE=./grakn-dist/target/grakn-dist-test WORKSPACE=. ./grakn-test/test-snb/src/main/bash/load.sh
- run: PATH=$PATH:./grakn-test/test-snb/src/main/bash:./grakn-test/test-integration/src/test/bash:./grakn-dist/target/grakn-dist-test PACKAGE=./grakn-dist/target/grakn-dist-test WORKSPACE=. ./grakn-test/test-snb/src/main/bash/validate.sh
- run: nohup grakn-dist/target/grakn-core-test/grakn server start
- run: PATH=$PATH:./grakn-test/test-snb/src/main/bash:./grakn-test/test-integration/src/test/bash:./grakn-dist/target/grakn-core-test PACKAGE=./grakn-dist/target/grakn-core-test WORKSPACE=. ./grakn-test/test-snb/src/main/bash/load.sh
- run: PATH=$PATH:./grakn-test/test-snb/src/main/bash:./grakn-test/test-integration/src/test/bash:./grakn-dist/target/grakn-core-test PACKAGE=./grakn-dist/target/grakn-core-test WORKSPACE=. ./grakn-test/test-snb/src/main/bash/validate.sh

biomed-e2e:
machine: true
Expand All @@ -276,9 +276,9 @@ jobs:
- restore_cache:
name: Restore maven m2 cache
key: grakn-cache-m2-version-8
- run: nohup grakn-dist/target/grakn-dist-test/grakn server start
- run: PATH=$PATH:./grakn-dist/target/grakn-dist-test ./grakn-test/test-biomed/load.sh
- run: PATH=$PATH:./grakn-dist/target/grakn-dist-test ./grakn-test/test-biomed/validate.sh
- run: nohup grakn-dist/target/grakn-core-test/grakn server start
- run: PATH=$PATH:./grakn-dist/target/grakn-core-test ./grakn-test/test-biomed/load.sh
- run: PATH=$PATH:./grakn-dist/target/grakn-core-test ./grakn-test/test-biomed/validate.sh

client-nodejs-e2e:
machine: true
Expand Down Expand Up @@ -309,8 +309,8 @@ jobs:
- run:
name: Install yarn
command: sudo apt-get -y install yarn
- run: nohup grakn-dist/target/grakn-dist-test/grakn server start
- run: cd grakn-dist/target/grakn-dist-test/ && ./graql console -f ./examples/basic-genealogy.gql -k gene
- run: nohup grakn-dist/target/grakn-core-test/grakn server start
- run: cd grakn-dist/target/grakn-core-test/ && ./graql console -f ./examples/basic-genealogy.gql -k gene
- run: cd client-nodejs && yarn install && yarn run test

client-python-e2e:
Expand All @@ -328,7 +328,7 @@ jobs:
- run:
name: Install protobuf and grpc
command: pip install protobuf grpcio grpcio-tools --user
- run: nohup grakn-dist/target/grakn-dist-test/grakn server start
- run: nohup grakn-dist/target/grakn-core-test/grakn server start
- run: cd client-python && make protobuf
- run: cd client-python && python -m unittest discover ./tests/integration/ -v

Expand Down Expand Up @@ -360,3 +360,6 @@ workflows:
- client-python-e2e:
requires:
- build
- client-java-e2e:
requires:
- build
1 change: 1 addition & 0 deletions grakn-dist/pom.xml
Expand Up @@ -118,6 +118,7 @@
</execution>
</executions>
<configuration>
<finalName>grakn-core-${project.version}</finalName>
<tarLongFileMode>gnu</tarLongFileMode>
<descriptors>
<descriptor>${project.basedir}/src/dist.xml</descriptor>
Expand Down
Expand Up @@ -14,11 +14,11 @@

public class ClientJavaE2EConstants {
// path of grakn zip files
public static final String ZIP_FILENAME = "grakn-dist-" + GraknVersion.VERSION + ".zip";
public static final String ZIP_FILENAME = "grakn-core-" + GraknVersion.VERSION + ".zip";
public static final Path GRAKN_BASE_DIRECTORY = Paths.get(System.getProperty("main.basedir"));
public static final Path GRAKN_TARGET_DIRECTORY = Paths.get(GRAKN_BASE_DIRECTORY.toString(), "grakn-dist", "target");
public static final Path ZIP_FULLPATH = Paths.get(GRAKN_TARGET_DIRECTORY.toString(), ZIP_FILENAME);
public static final Path GRAKN_UNZIPPED_DIRECTORY = Paths.get(GRAKN_TARGET_DIRECTORY.toString(), "distribution test", "grakn-dist-" + GraknVersion.VERSION);
public static final Path GRAKN_UNZIPPED_DIRECTORY = Paths.get(GRAKN_TARGET_DIRECTORY.toString(), "distribution test", "grakn-core-" + GraknVersion.VERSION);

public static void assertGraknRunning() {
assertThat("assertGraknRunning() failed because /tmp/grakn-engine.pid is not found", Paths.get("/tmp/grakn-engine.pid").toFile().exists(), equalTo(true));
Expand Down
Expand Up @@ -32,11 +32,11 @@

public class DistributionE2EConstants {
// path of grakn zip files
public static final String ZIP_FILENAME = "grakn-dist-" + GraknVersion.VERSION + ".zip";
public static final String ZIP_FILENAME = "grakn-core-" + GraknVersion.VERSION + ".zip";
public static final Path GRAKN_BASE_DIRECTORY = Paths.get(System.getProperty("main.basedir"));
public static final Path GRAKN_TARGET_DIRECTORY = Paths.get(GRAKN_BASE_DIRECTORY.toString(), "grakn-dist", "target");
public static final Path ZIP_FULLPATH = Paths.get(GRAKN_TARGET_DIRECTORY.toString(), ZIP_FILENAME);
public static final Path GRAKN_UNZIPPED_DIRECTORY = Paths.get(GRAKN_TARGET_DIRECTORY.toString(), "distribution test", "grakn-dist-" + GraknVersion.VERSION);
public static final Path GRAKN_UNZIPPED_DIRECTORY = Paths.get(GRAKN_TARGET_DIRECTORY.toString(), "distribution test", "grakn-core-" + GraknVersion.VERSION);

public static void assertGraknRunning() {
assertThat("assertGraknRunning() failed because /tmp/grakn-engine.pid is not found", Paths.get("/tmp/grakn-engine.pid").toFile().exists(), equalTo(true));
Expand Down
Expand Up @@ -60,11 +60,11 @@ public class DistributionContext extends CompositeTestRule {

public static final Logger LOG = LoggerFactory.getLogger(DistributionContext.class);

private static final String ZIP_FILENAME = "grakn-dist-" + GraknVersion.VERSION + ".zip";
private static final String ZIP_FILENAME = "grakn-core-" + GraknVersion.VERSION + ".zip";
private static final Path GRAKN_BASE_DIRECTORY = Paths.get(GraknSystemProperty.PROJECT_RELATIVE_DIR.value());
private static final Path TARGET_DIRECTORY = Paths.get(GRAKN_BASE_DIRECTORY.toString(), "grakn-dist", "target");
private static final Path ZIP_FULLPATH = Paths.get(TARGET_DIRECTORY.toString(), ZIP_FILENAME);
private static final Path EXTRACTED_DISTRIBUTION_DIRECTORY = Paths.get(TARGET_DIRECTORY.toString(), "grakn-dist-" + GraknVersion.VERSION);
private static final Path EXTRACTED_DISTRIBUTION_DIRECTORY = Paths.get(TARGET_DIRECTORY.toString(), "grakn-core-" + GraknVersion.VERSION);

private Process engineProcess;
private int port = 4567;
Expand Down

0 comments on commit 1306b82

Please sign in to comment.