No description, website, or topics provided.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config/checkstyle
gradle/wrapper
src
.gitignore
.travis.yml
LICENSE
README.md
build.gradle
gradlew
gradlew.bat

README.md

maintainer
MadsNielsen

License Build Status Release

CLI generator for Eiffel messages

Note! This repo is still work in progress

This is a wrapper around tracey-eiffel-protocol Allows to extract data from different sources and generate corresponding Eiffel messages

Usage

On Github Releases we push the jar-file we build from Travis when we decide to release it.

If you have a jvm you can simple download this jar-file and run it:

java -jar tracey-protocol-eiffel-cli-generator.jar -h

Supported messages

EiffelSourceChangeCreatedEvent

message will be generated from the current commit, more options to come.

Example command EiffelSourceChangeCreatedEvent -p Praqma/tracey-protocol-eiffel-cli-generator -c HEAD~1

Output

{
  "meta": {
    "id": "f8a8bca7-cbc1-4f4a-904a-226acbd66208",
    "type": "EiffelSourceChangeCreatedEvent",
    "time": "1469130192472",
    "source": {
      "host": "Andreys-MacBook-Pro.local",
      "name": "Eiffel command line generator",
      "uri": "https://github.com/Praqma/tracey-protocol-eiffel-cli-generator",
      "serializer": {
        "groupId": "net.praqma.tracey.protocol.eiffel.cli",
        "artifactId": "tracey-protocol-eiffel-cli-generator",
        "version": "drop1-10-gc7704af.dirty"
      }
    }
  },
  "links": [{
    "type": "PREVIOUS_VERSION",
    "id": "de3b7468-67b1-4f46-8ecc-a8ac251845f6"
  }, {
    "type": "CAUSE",
    "id": "a0e42d9d-0ccc-4a79-a2b3-676a40632018"
  }],
  "data": {
    "author": {
      "name": "Andrey Devyatkin",
      "email": "andrey.a.devyatkin@gmail.com"
    },
    "issues": [{
      "id": "7",
      "transition": "RESOLVED",
      "uri": "http://github.com/Praqma/tracey-protocol-eiffel-cli-generator/issues/7",
      "trackerType": "GitHub"
    }],
    "change": {
      "insertions": 28,
      "deletions": 6,
      "files": ["MODIFY .travis.yml", "MODIFY build.gradle", "ADD config/checkstyle/checkstyle.xml", "MODIFY src/main/java/net/praqma/tracey/protocol/eiffel/cli/Main.java"]
    },
    "gitIdentifier": {
      "commitId": "c2bb5a9f7dbfabdcdba9957128ce5387963e32c1",
      "branch": "master",
      "repoName": "tracey-protocol-eiffel-cli-generator",
      "repoUri": "https://github.com/Praqma/tracey-protocol-eiffel-cli-generator.git"
    }
  }
}

EiffelSourceChangeSubmittedEvent

This message will be generated from the current commit. We're about to publish (push) this change to a repository.

Can take an argument -j which allows you to link this source change submitted event with the correct link from the output generated by the associated EiffelSourceChangeCreatedEvent.

Example command EiffelSourceChangeSubmittedEvent -j change.json

Output

{
  "meta": {
    "id": "c6c76226-80a6-4e82-95f7-fcb7f8d64334",
    "type": "EiffelSourceChangeSubmittedEvent",
    "time": "1507099021948",
    "source": {
      "host": "mads-UX302LG",
      "name": "Eiffel command line generator",
      "uri": "https://github.com/Praqma/tracey-protocol-eiffel-cli-generator",
      "serializer": {
        "groupId": "com.sun",
        "artifactId": "Java Runtime Environment",
        "version": "1.8.0_131"
      }
    }
  },
  "links": [{
    "type": "CHANGE",
    "id": "b347abb5-5d18-4518-b274-336b6f81d7e6"
  }],
  "data": {
    "submitter": {
      "name": "Mads Nielsen",
      "email": "man@praqma.net"
    },
    "gitIdentifier": {
      "commitId": "030ec7166d5ca96ca57391e3026a55584755e66e",
      "branch": "master",
      "repoName": "tracey-protocol-eiffel-cli-generator",
      "repoUri": "git@github.com:Praqma/tracey-protocol-eiffel-cli-generator.git"
    }
  }
}

EiffelCompositionDefinedEvent

Example command tracey-protocol-eiffel-cli-generator.jar EiffelCompositionDefinedEvent -n Composition_A -l CAUSE:8a718a03-f473-4e61-9bae-e986885fee18

Output

{
  "meta": {
    "id": "d2f20d54-5a8e-4a69-a7d1-5a11b6d89bf2",
    "type": "EiffelCompositionDefinedEvent",
    "time": "1469533752898",
    "source": {
      "host": "mads-notebook",
      "name": "Eiffel command line generator",
      "uri": "https://github.com/Praqma/tracey-protocol-eiffel-cli-generator",
      "serializer": {
        "groupId": "net.praqma.tracey.protocol.eiffel.cli",
        "artifactId": "tracey-protocol-eiffel-cli-generator",
        "version": "drop1-19-gdd2bbde"
      }
    }
  },
  "links": [{
    "type": "CAUSE",
    "id": "8a718a03-f473-4e61-9bae-e986885fee18"
  }],
  "data": {
    "name": "Compsition_A"
  }
}

EiffelArtifactCreatedEvent

Creates an artifact created event. Use with the -m option to point to a pom file for parsing maven projects.

Example command: EiffelArtifactCreatedEvent -l CAUSE:8a718a03-f473-4e61-9bae-e986885fee18 -c "mvn clean package" -a artifact-one -w 1.0 -g artifact-group

Output


{
  "meta": {
    "id": "f49c5ecc-e48f-42ad-b870-465ddd1c6292",
    "type": "EiffelArtifactCreatedEvent",
    "time": "1469536428257",
    "source": {
      "host": "mads-notebook",
      "name": "Eiffel command line generator",
      "uri": "https://github.com/Praqma/tracey-protocol-eiffel-cli-generator",
      "serializer": {
        "groupId": "org.eclipse.jgit",
        "artifactId": "slf4j-log4j12",
        "version": "1.7.21"
      }
    }
  },
  "links": [{
    "type": "CAUSE",
    "id": "8a718a03-f473-4e61-9bae-e986885fee18"
  }],
  "data": {
    "gav": {
      "groupId": "artifact-group",
      "artifactId": "artifact-one",
      "version": "1.0"
    },
    "buildCommand": "mvn clean package"
  }
}

EiffelArtifactPublishedEvent

Create a message that indicates that a created artifact has been created. Use -j switch to point to the contents of an EiffelArtifactCreatedEvent to link to the meta id of that artifact and use the -k switch to point to where the artifact was published.

Example command: EiffelArtifactPublishedEvent -k ARTIFACTORY:http://my.repo.org -j artifactCreatedEvent.json

Output

{
  "meta": {
    "id": "8ffa0c7e-2140-413b-8c03-bb96ed1f79d7",
    "type": "EiffelArtifactPublishedEvent",
    "time": "1507104632273",
    "source": {
      "host": "mads-UX302LG",
      "name": "Eiffel command line generator",
      "uri": "https://github.com/Praqma/tracey-protocol-eiffel-cli-generator",
      "serializer": {
        "groupId": "com.sun",
        "artifactId": "Java Runtime Environment",
        "version": "1.8.0_131"
      }
    }
  },
  "links": [{
    "type": "ARTIFACT",
    "id": "b1cd0c8b-bcc7-4c09-9e7c-c722b2d1b145"
  }],
  "data": {
    "locations": [{
      "type": "ARTIFACTORY",
      "uri": "http//my.repo.org"
    }]
  }
}

EiffelArtifactReusedEvent

Create this event when you want to use a published artifact.

Requires that the event has 2 links, one of type REUSED_ARTIFACT and one of type COMPOSITION

Has two optional switches. One -n which should point to an EiffelArtifactPublishedEvent.json and another switch -c which you can use to point to a json file with an EiffelCompositionDefinedEvent.

Example command: EiffelArtifactReusedEvent -n ArtP.json -l COMPOSITION:187dd61a-3104-4494-8e8c-8029c5918311

Example command: EiffelArtifactReusedEvent -n ArtP.json -l COMPOSITION:187dd61a-3104-4494-8e8c-8029c5918311

Example command: EiffelArtifactReusedEvent -n ArtP.json -l COMPOSITION:187dd61a-3104-4494-8e8c-8029c5918311 -l REUSED_ARTIFACT:187dd61a-3104-4494-8e8c-8029c5914311

{
  "meta": {
    "id": "46c17a91-693c-4e7c-9320-af612378f959",
    "type": "EiffelArtifactReusedEvent",
    "time": "1507122525856",
    "source": {
      "host": "mads-UX302LG",
      "name": "Eiffel command line generator",
      "uri": "https://github.com/Praqma/tracey-protocol-eiffel-cli-generator",
      "serializer": {
        "groupId": "com.sun",
        "artifactId": "Java Runtime Environment",
        "version": "1.8.0_131"
      }
    }
  },
  "links": [{
    "type": "COMPOSITION",
    "id": "187dd61a-3104-4494-8e8c-8029c5918311"
  }, {
    "type": "REUSED_ARTIFACT",
    "id": "b1cd0c8b-bcc7-4c09-9e7c-c722b2d1b145"
  }]
}

Releasing

To release a new version of this CLI on Github release you need to tag the commit to release. This will be picked up by Travis CI.

Github auth for Travis release

Release is done a ReleasePraqma user and was securely created using travis setup releases

$ travis setup releases
Detected repository as Praqma/tracey-protocol-eiffel-cli-generator, is this correct? |yes| yes
Username: ReleasePraqma
Password for ReleasePraqma: **********
File to Upload: build/libs/tracey-protocol-eiffel-cli-generator.jar
Deploy only from Praqma/tracey-protocol-eiffel-cli-generator? |yes| yes
Encrypt API key? |yes| yes