Skip to content

Publishing a build

sbaogang edited this page Dec 5, 2016 · 5 revisions

Publishing builds to Teletraan

Publishing builds to Teletraan requires passing a build artifact url along with other identifying information in a POST request. An example call to publish a build looks like this :

    curl --silent -k -H "Authorization: token insertTokenHere" -H "Content-Type: application/json" -X POST --data
          '{"name":"'"$BUILD_NAME"'",
            "repo":"'"$REPO"'",
            "branch":"'"$BRANCH"'",
            "commit":"'"$COMMIT"'",
            "artifactUrl":"'"$ARTIFACT_URL"'",
            "commitDate":"'"$COMMIT_DATE"'",
            "type":"'"GithubOrOtherSourceControlProvider"'",
            "publishInfo":"'"$BUILD_URL"'"}' https://teletraan.yourSite.com/v1/builds
  • service endpoint : this is the Teletraan RESTful java service url, e.g. https://teletraan.yourSite.com/v1/builds
  • name : (required) the build name for this artifact. This is what you specify in your environments General Config so that it will recognize your published build. See Create new Environment for details on configuting BuildName in general config.
  • artifactUrl : (required) the url where the build artifact can be downloaded ( mostly by deploy agents)
  • repo : (required) which repository this code belongs to
  • branch : (required) the branch this commit belongs to
  • commit : (required) the full commit SHA
  • commitDate : (optional) date the commit was committed, in milliseconds. It is an integer, and not a string (and can be generated with git show -s --format="%ct000")
  • publishInfo : (optional) e.g. Jenkins job url

You can also visit the api docs for more information about the publish build API.