You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sdap.apache.org by fg...@apache.org on 2019/02/19 20:37:30 UTC

[incubator-sdap-nexusproto] branch SDAP-48 updated (a515191 -> 8bb2877)

This is an automated email from the ASF dual-hosted git repository.

fgreg pushed a change to branch SDAP-48
in repository https://gitbox.apache.org/repos/asf/incubator-sdap-nexusproto.git.


 discard a515191  Working jenkins build.
 discard cda42f5  doing it correctly now.
 discard 532a935  fixed project name and made sure python version stays in sync with the gradle project version.
 discard 62b37b0  trying different pattern.
 discard d1e74cf  changed task
 discard 6f5f547  removed label
 discard 41eaf5c  trying with docker
 discard e4199a9  trying assemble
 discard 3fdd211  trying out this pipeline stuff
     new b2196ac  SDAP-48 Build Pipeline for nexusproto (#4)
     new 55c48ed  trying out this pipeline stuff
     new 1fc04d9  trying assemble
     new d1a3720  trying with docker
     new 8bb2877  fixed project name and made sure python version stays in sync with the gradle project version.

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (a515191)
            \
             N -- N -- N   refs/heads/SDAP-48 (8bb2877)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 17 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:


[incubator-sdap-nexusproto] 16/17: trying with docker

Posted by fg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

fgreg pushed a commit to branch SDAP-48
in repository https://gitbox.apache.org/repos/asf/incubator-sdap-nexusproto.git

commit d1a3720838750b95838b01806120ad35d70c53aa
Author: Frank Greguska <fr...@jpl.nasa.gov>
AuthorDate: Thu Mar 22 16:49:54 2018 -0700

    trying with docker
---
 Jenkinsfile          |  22 ------
 pipeline-syntax.gdsl | 217 ---------------------------------------------------
 2 files changed, 239 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
deleted file mode 100644
index ccb5840..0000000
--- a/Jenkinsfile
+++ /dev/null
@@ -1,22 +0,0 @@
-#!groovy
-
-
-pipeline{
-    agent {
-        label 'trusty'
-    }
-    stages{
-        stage("Build"){
-            steps{
-                git branch: "${env.BRANCH_NAME}", credentialsId: 'fgreg-github', url: 'https://github.com/apache/incubator-sdap-nexusproto'
-                sh './gradlew clean build'
-            }
-        }
-        stage("Assemble"){
-            steps{
-                sh './gradlew assemble'
-                archiveArtifacts artifacts: '**/nexusproto-*.jar **/nexusproto-*.tar.gz', fingerprint: true, onlyIfSuccessful: true
-            }
-        }
-    }
-}
\ No newline at end of file
diff --git a/pipeline-syntax.gdsl b/pipeline-syntax.gdsl
deleted file mode 100644
index 73e22af..0000000
--- a/pipeline-syntax.gdsl
+++ /dev/null
@@ -1,217 +0,0 @@
-//The global script scope
-def ctx = context(scope: scriptScope())
-
-//What things can be on the script scope
-contributor(ctx) {
-    method(name: 'pipeline', type: 'Object', params: [body: Closure])
-    property(name: 'params', type: 'org.jenkinsci.plugins.workflow.cps.ParamsVariable')
-    property(name: 'env', type: 'org.jenkinsci.plugins.workflow.cps.EnvActionImpl.Binder')
-    property(name: 'currentBuild', type: 'org.jenkinsci.plugins.workflow.cps.RunWrapperBinder')
-    property(name: 'scm', type: 'org.jenkinsci.plugins.workflow.multibranch.SCMVar')
-}
-
-// Define default env vars
-def envVars = context(ctype: 'org.jenkinsci.plugins.workflow.cps.EnvActionImpl.Binder')
-
-contributor(envVars) {
-    property(name: 'BRANCH_NAME', type: 'String', doc: 'For a multibranch project, this will be set to the name of the branch being built, for example in case you wish to deploy to production from master but not from feature branches; if corresponding to some kind of change request, the name is generally arbitrary (refer to CHANGE_ID and CHANGE_TARGET).')
-    property(name: 'CHANGE_ID', type: 'String', doc: 'For a multibranch project corresponding to some kind of change request, this will be set to the change ID, such as a pull request number, if supported; else unset.')
-    property(name: 'CHANGE_URL', type: 'Strig', doc: 'For a multibranch project corresponding to some kind of change request, this will be set to the change URL, if supported; else unset.')
-    property(name: 'CHANGE_TITLE', type: 'String', doc: 'For a multibranch project corresponding to some kind of change request, this will be set to the title of the change, if supported; else unset.')
-    property(name: 'CHANGE_AUTHOR', type: 'String', doc: 'For a multibranch project corresponding to some kind of change request, this will be set to the username of the author of the proposed change, if supported; else unset.')
-    property(name: 'CHANGE_AUTHOR_DISPLAY_NAME', type: 'String', doc: 'For a multibranch project corresponding to some kind of change request, this will be set to the human name of the author, if supported; else unset.')
-    property(name: 'CHANGE_AUTHOR_EMAIL', type: 'String', doc: 'For a multibranch project corresponding to some kind of change request, this will be set to the email address of the author, if supported; else unset.')
-    property(name: 'CHANGE_TARGET', type: 'String', doc: 'rFo a multibranch project corresponding to some kind of change request, this will be set to the target or base branch to which the change could be merged, if supported; else unset.')
-    property(name: 'BUILD_NUMBER', type: 'String', doc: 'The current build number, such as "153"')
-    property(name: 'BUILD_ID', type: 'String', doc: 'The current build ID, identical to BUILD_NUMBER for builds created in 1.597+, but a YYYY-MM-DD_hh-mm-ss timestamp for older builds')
-    property(name: 'BUILD_DISPLAY_NAME', type: 'String', doc: 'The display name of the current build, which is something like "#153" by default.')
-    property(name: 'JOB_NAME', type: 'String', doc: 'Name of the project of this build, such as "foo" or "foo/bar".')
-    property(name: 'JOB_BASE_NAME', type: 'String', doc: 'Short Name of the project of this build stripping off folder paths, such as "foo" for "bar/foo".')
-    property(name: 'BUILD_TAG', type: 'String', doc: 'String of "jenkins-${JOB_NAME}-${BUILD_NUMBER}". All forward slashes (/) in the JOB_NAME are replaced with dashes (-). Convenient to put into a resource file, a jar file, etc for easier identification.')
-    property(name: 'EXECUTOR_NUMBER', type: 'String', doc: 'The unique number that identifies the current executor (among executors of the same machine) that’s carrying out this build. This is the number you see in the "build executor status", except that the number starts from 0, not 1.')
-    property(name: 'NODE_NAME', type: 'String', doc: 'Name of the agent if the build is on an agent, or "master" if run on master')
-    property(name: 'NODE_LABELS', type: 'String', doc: 'Whitespace-separated list of labels that the node is assigned.')
-    property(name: 'WORKSPACE', type: 'String', doc: 'The absolute path of the directory assigned to the build as a workspace.')
-    property(name: 'JENKINS_HOME', type: 'String', doc: 'The absolute path of the directory assigned on the master node for Jenkins to store data.')
-    property(name: 'JENKINS_URL', type: 'String', doc: 'Full URL of Jenkins, like http://server:port/jenkins/ (note: only available if Jenkins URL set in system configuration)')
-    property(name: 'BUILD_URL', type: 'String', doc: 'Full URL of this build, like http://server:port/jenkins/job/foo/15/ (Jenkins URL must be set)')
-    property(name: 'JOB_URL', type: 'String', doc: 'Full URL of this job, like http://server:port/jenkins/job/foo/ (Jenkins URL must be set)')
-}
-
-// Definew all the properties in current builds
-def currentBuild = context(ctype: 'org.jenkinsci.plugins.workflow.cps.RunWrapperBinder')
-
-contributor(currentBuild) {
-    property(name: 'number', type: 'Integer', doc: 'build number')
-    property(name: 'result', type: 'String', doc: 'typically SUCCESS, UNSTABLE, or FAILURE (may be null for an ongoing build)')
-    property(name: 'currentResult', type: 'String', doc: 'typically SUCCESS, UNSTABLE, or FAILURE (never null)')
-    method(name: 'resultIsBetterOrEqualTo', type: 'Boolean', params: [buildStatus: 'String'], doc: 'Compares the current build result to the provided result string (SUCCESS, UNSTABLE, or FAILURE) and returns true if the current build result is better than or equal to the provided result.')
-    method(name: 'resultIsWorseOrEqualTo', type: 'Boolean', params: [buildStatus: 'String'], doc: 'Compares the current build result to the provided result string (SUCCESS, UNSTABLE, or FAILURE) and returns true if the current build result is worse than or equal to the provided result.')
-    property(name: 'displayName', type: 'String', doc: 'normally #123 but sometimes set to, e.g., an SCM commit identifier')
-    property(name: 'description', type: 'String', doc: 'additional information about the build')
-    property(name: 'id', type: 'String', doc: 'normally number as a string')
-    property(name: 'timeInMillis', type: 'long', doc: 'time since the epoch when the build was scheduled')
-    property(name: 'startTimeInMillis', type: 'long', doc: 'time since the epoch when the build started running')
-    property(name: 'duration', type: 'long', doc: 'duration of the build in milliseconds')
-    property(name: 'durationString', type: 'String', doc: 'a human-readable representation of the build duration')
-    property(name: 'previousBuild', type: 'org.jenkinsci.plugins.workflow.cps.RunWrapperBinder', doc: 'another similar object, or null')
-    property(name: 'nextBuild', type: 'org.jenkinsci.plugins.workflow.cps.RunWrapperBinder', doc: 'another similar object, or null')
-    property(name: 'absoluteUrl', type: 'String', doc: 'URL of build index page')
-    property(name: 'buildVariables', type: 'Map', doc: 'for a non-Pipeline downstream build, offers access to a map of defined build variables; for a Pipeline downstream build, any variables set globally on env')
-    property(name: 'changeSets', type: 'String', doc: 'a list of changesets coming from distinct SCM checkouts; each has a kind and is a list of commits; each commit has a commitId, timestamp, msg, author, and affectedFiles each of which has an editType and path; the value will not generally be Serializable so you may only access it inside a method marked @NonCPS')
-    property(name: 'rawBuild', type: 'String', doc: 'a hudson.model.Run with further APIs, only for trusted libraries or administrator-approved scripts outside the sandbox; the value will not be Serializable so you may only access it inside a method marked @NonCPS')
-}
-
-def closures = context(scope: closureScope())
-
-contributor(closures) {
-    // What things can be inside a pipeline
-    if (enclosingCall("pipeline")) {
-        method(name: 'echo', type: 'Object', params: [message: 'java.lang.String'], doc: 'Print Message')
-        method(name: 'stages', type: 'Object', params: [body: 'Closure'], doc: 'Stages')
-        method(name: 'agent', type: 'Object', params: [body: 'Closure'], doc: 'Label expression to select agents')
-        method(name: 'parameters', type: 'Object', params: [body: 'Closure'], doc: 'Job parameters')
-        method(name: 'options', type: 'Object', params: [body: 'Closure'])
-        method(name: 'triggers', type: 'Object', params: [body: 'Closure'], doc: 'Build triggers')
-        method(name: 'post', type: 'Object', params: [body: 'Closure'], doc: 'Post build actions')
-        method(name: 'jiraComment', type: 'Object', namedParams: [parameter(name: 'issueKey', type: 'java.lang.String'), parameter(name: 'body', type: 'java.lang.String'),], doc: 'JIRA: Add a comment to issue(s)')
-        method(name: 'jiraIssueSelector', type: 'Object', params: [:], doc: 'JIRA: Issue selector')
-        method(name: 'jiraIssueSelector', type: 'Object', namedParams: [parameter(name: 'issueSelector', type: 'Map'),], doc: 'JIRA: Issue selector')
-        method(name: 'jiraSearch', type: 'Object', params: [jql: 'java.lang.String'], doc: 'JIRA: Search issues')
-
-        //I  don't know the fate of these one
-        method(name: 'build', type: 'Object', params: [job: 'java.lang.String'], doc: 'Build a job')
-        method(name: 'build', type: 'Object', namedParams: [parameter(name: 'job', type: 'java.lang.String'), parameter(name: 'parameters', type: 'Map'), parameter(name: 'propagate', type: 'boolean'), parameter(name: 'quietPeriod', type: 'java.lang.Integer'), parameter(name: 'wait', type: 'boolean'),], doc: 'Build a job')
-        method(name: 'ec2', type: 'Object', namedParams: [parameter(name: 'cloud', type: 'java.lang.String'), parameter(name: 'template', type: 'java.lang.String'),], doc: 'Cloud template provisioning')
-        method(name: 'error', type: 'Object', params: [message: 'java.lang.String'], doc: 'Error signal')
-        method(name: 'input', type: 'Object', params: [message: 'java.lang.String'], doc: 'Wait for interactive input')
-        method(name: 'input', type: 'Object', namedParams: [parameter(name: 'message', type: 'java.lang.String'), parameter(name: 'id', type: 'java.lang.String'), parameter(name: 'ok', type: 'java.lang.String'), parameter(name: 'parameters', type: 'Map'), parameter(name: 'submitter', type: 'java.lang.String'), parameter(name: 'submitterParameter', type: 'java.lang.String'),], doc: 'Wait for interactive input')
-        method(name: 'isUnix', type: 'Object', params: [:], doc: 'Checks if running on a Unix-like node')
-        method(name: 'library', type: 'Object', params: [identifier: 'java.lang.String'], doc: 'Load a shared library on the fly')
-        method(name: 'library', type: 'Object', namedParams: [parameter(name: 'identifier', type: 'java.lang.String'), parameter(name: 'changelog', type: 'java.lang.Boolean'), parameter(name: 'retriever', type: 'Map'),], doc: 'Load a shared library on the fly')
-        method(name: 'libraryResource', type: 'Object', params: [resource: 'java.lang.String'], doc: 'Load a resource file from a shared library')
-        method(name: 'mail', type: 'Object', namedParams: [parameter(name: 'subject', type: 'java.lang.String'), parameter(name: 'body', type: 'java.lang.String'), parameter(name: 'bcc', type: 'java.lang.String'), parameter(name: 'cc', type: 'java.lang.String'), parameter(name: 'charset', type: 'java.lang.String'), parameter(name: 'from', type: 'java.lang.String'), parameter(name: 'mimeType', type: 'java.lang.String'), parameter(name: 'replyTo', type: 'java.lang.String'), parameter(name: [...]
-        method(name: 'milestone', type: 'Object', params: [ordinal: 'java.lang.Integer'], doc: 'The milestone step forces all builds to go through in order')
-        method(name: 'milestone', type: 'Object', namedParams: [parameter(name: 'ordinal', type: 'java.lang.Integer'), parameter(name: 'label', type: 'java.lang.String'),], doc: 'The milestone step forces all builds to go through in order')
-        method(name: 'node', type: 'Object', params: [body: 'Closure'], doc: 'Allocate node')
-        method(name: 'node', type: 'Object', params: [label: 'String', body: 'Closure'], doc: 'Allocate node')
-        method(name: 'properties', type: 'Object', params: [properties: 'Map'], doc: 'Set job properties')
-        method(name: 'readTrusted', type: 'Object', params: [path: 'java.lang.String'], doc: 'Read trusted file from SCM')
-        method(name: 'resolveScm', type: 'Object', namedParams: [parameter(name: 'source', type: 'Map'), parameter(name: 'targets', type: 'Map'), parameter(name: 'ignoreErrors', type: 'boolean'),], doc: 'Resolves an SCM from an SCM Source and a list of candidate target branch names')
-        method(name: 'retry', type: 'Object', params: [count: int, body: 'Closure'], doc: 'Retry the body up to N times')
-        method(name: 'script', type: 'Object', params: [body: 'Closure'], doc: 'Run arbitrary Pipeline script')
-        method(name: 'sleep', type: 'Object', params: [time: 'int'], doc: 'Sleep')
-        method(name: 'sleep', type: 'Object', namedParams: [parameter(name: 'time', type: 'int'), parameter(name: 'unit', type: 'java.util.concurrent.TimeUnit'),], doc: 'Sleep')
-        method(name: 'timeout', type: 'Object', params: [time: int, body: 'Closure'], doc: 'Enforce time limit')
-        method(name: 'timeout', type: 'Object', params: [body: Closure], namedParams: [parameter(name: 'time', type: 'int'), parameter(name: 'unit', type: 'java.util.concurrent.TimeUnit'),], doc: 'Enforce time limit')
-        method(name: 'tool', type: 'Object', params: [name: 'java.lang.String'], doc: 'Use a tool from a predefined Tool Installation')
-        method(name: 'tool', type: 'Object', namedParams: [parameter(name: 'name', type: 'java.lang.String'), parameter(name: 'type', type: 'java.lang.String'),], doc: 'Use a tool from a predefined Tool Installation')
-        method(name: 'waitUntil', type: 'Object', params: [body: 'Closure'], doc: 'Wait for condition')
-        method(name: 'withCredentials', type: 'Object', params: [bindings: Map, body: 'Closure'], doc: 'Bind credentials to variables')
-        method(name: 'withEnv', type: 'Object', params: [overrides: Map, body: 'Closure'], doc: 'Set environment variables')
-        method(name: 'ws', type: 'Object', params: [dir: 'String', body: 'Closure'], doc: 'Allocate workspace')
-        method(name: 'catchError', type: 'Object', params: [body: 'Closure'], doc: 'Advanced/Deprecated Catch error and set build result')
-        method(name: 'dockerFingerprintRun', type: 'Object', params: [containerId: 'java.lang.String'], doc: 'Advanced/Deprecated Record trace of a Docker image run in a container')
-        method(name: 'dockerFingerprintRun', type: 'Object', namedParams: [parameter(name: 'containerId', type: 'java.lang.String'), parameter(name: 'toolName', type: 'java.lang.String'),], doc: 'Record trace of a Docker image run in a container')
-        method(name: 'envVarsForTool', type: 'Object', namedParams: [parameter(name: 'toolId', type: 'java.lang.String'), parameter(name: 'toolVersion', type: 'java.lang.String'),], doc: 'Fetches the environment variables for a given tool in a list of \'FOO=bar\' strings suitable for the withEnv step.')
-        method(name: 'getContext', type: 'Object', params: [type: 'Map'], doc: 'Advanced/Deprecated Get contextual object from internal APIs')
-        method(name: 'withContext', type: 'Object', params: [context: 'Object', body: 'Closure'], doc: 'Advanced/Deprecated Use contextual object from internal APIs within a block')
-
-    }
-
-    //The only thing inside agent can be label
-    if (enclosingCall("agent")) {
-        property(name: 'any')
-        property(name: 'none')
-        method(name: 'label', type: 'String', params: [expr: 'String'])
-        method(name: 'docker', type: 'String', params: [docker_image: 'String'])
-        method(name: 'dockerfile', type: 'boolean', params: [use_dockerfile: 'boolean'])
-    }
-
-    if (enclosingCall("triggers")) {
-        method(name: 'cron', type: 'String', params: [expr: 'String'], doc: 'Cron expression can be one of @daily, @hourly, etc')
-        method(name: 'upstream', type: 'Object', params: [name: 'String', build_status: 'Object'])
-        method(name: 'pollSCM', type: 'String', params: [expr: 'String'])
-        method(name: 'bitbucketPush')
-    }
-
-    // Parameters can only contain
-    if (enclosingCall("parameters")) {
-        method(name: 'string', type: 'Object', namedParams: [parameter(name: 'name', type: 'java.lang.String'), parameter(name: 'defaultValue', type: 'java.lang.String'), parameter(name: 'description', type: 'java.lang.String')])
-        method(name: 'booleanParam', type: 'Object', namedParams: [parameter(name: 'name', type: 'java.lang.String'), parameter(name: 'defaultValue', type: 'java.lang.Boolean'), parameter(name: 'description', type: 'java.lang.String')])
-        method(name: 'choice', type: 'Object', namedParams: [parameter(name: 'choice', type: 'java.lang.String'), parameter(name: 'defaultValue', type: 'java.lang.Boolean'), parameter(name: 'description', type: 'java.lang.String')])
-    }
-
-    // Find the options!
-    if (enclosingCall("options")) {
-        method(name: 'buildDiscarder')
-        method(name: 'timestamps')
-        method(name: 'timeout', type: 'Object', namedParams: [parameter(name: 'time', type: 'java.lang.Integer'), parameter(name: 'unit', type: 'java.lang.String')])
-    }
-
-    // Inside stages can be, stage or stage('Name')
-    if (enclosingCall("stages")) {
-        method(name: 'stage', type: 'Object', params: [name: 'String', body: 'Closure'], doc: 'Stage')
-        method(name: 'stage', type: 'Object', params: [body: Closure], namedParams: [parameter(name: 'name', type: 'java.lang.String'), parameter(name: 'concurrency', type: 'java.lang.Integer'),], doc: 'Stage')
-    }
-
-    // Inside steps only steps
-    if (enclosingCall("stage")) {
-        method(name: 'agent', type: 'Object', params: [body: 'Closure'], doc: 'Label expression to select agents')
-        method(name: 'steps', type: 'Object', params: [body: 'Closure'], doc: 'Steps to execute on stage')
-        method(name: 'post', type: 'Object', params: [body: 'Closure'], doc: 'Post actions can be executed on a per-stage basis as well')
-    }
-
-    // Only inside steps
-    if (enclosingCall("steps") || enclosingCall("always") || enclosingCall("success") ||
-            enclosingCall("failure") || enclosingCall("unstable") || enclosingCall("changed")) {
-        method(name: 'timestamp', type: 'Object', params: [body: 'Closure'], doc: 'Timestamps')
-        method(name: 'bat', type: 'Object', params: [script: 'java.lang.String'], doc: 'Windows Batch Script')
-        method(name: 'bat', type: 'Object', namedParams: [parameter(name: 'script', type: 'java.lang.String'), parameter(name: 'encoding', type: 'java.lang.String'), parameter(name: 'returnStatus', type: 'boolean'), parameter(name: 'returnStdout', type: 'boolean'),], doc: 'Windows Batch Script')
-        method(name: 'checkout', type: 'Object', params: [scm: 'Map'], doc: 'General SCM')
-        method(name: 'checkout', type: 'Object', namedParams: [parameter(name: 'scm', type: 'Map'), parameter(name: 'changelog', type: 'boolean'), parameter(name: 'poll', type: 'boolean'),], doc: 'General SCM')
-        method(name: 'deleteDir', type: 'Object', params: [:], doc: 'Recursively delete the current directory from the workspace')
-        method(name: 'dir', type: 'Object', params: [path: 'String', body: 'Closure'], doc: 'Change current directory')
-        method(name: 'fileExists', type: 'Object', params: [file: 'java.lang.String'], doc: 'Verify if file exists in workspace')
-        method(name: 'git', type: 'Object', params: [url: 'java.lang.String'], doc: 'Git')
-        method(name: 'git', type: 'Object', namedParams: [parameter(name: 'url', type: 'java.lang.String'), parameter(name: 'branch', type: 'java.lang.String'), parameter(name: 'changelog', type: 'boolean'), parameter(name: 'credentialsId', type: 'java.lang.String'), parameter(name: 'poll', type: 'boolean'),], doc: 'Git')
-        method(name: 'junit', type: 'Object', params: [testResults: 'java.lang.String'], doc: 'Archive JUnit-formatted test results')
-        method(name: 'junit', type: 'Object', namedParams: [parameter(name: 'testResults', type: 'java.lang.String'), parameter(name: 'allowEmptyResults', type: 'boolean'), parameter(name: 'healthScaleFactor', type: 'double'), parameter(name: 'keepLongStdio', type: 'boolean'), parameter(name: 'testDataPublishers', type: 'Map'),], doc: 'Archive JUnit-formatted test results')
-        method(name: 'load', type: 'Object', params: [path: 'java.lang.String'], doc: 'Evaluate a Groovy source file into the Pipeline script')
-        method(name: 'powershell', type: 'Object', params: [script: 'java.lang.String'], doc: 'PowerShell Script')
-        method(name: 'powershell', type: 'Object', namedParams: [parameter(name: 'script', type: 'java.lang.String'), parameter(name: 'encoding', type: 'java.lang.String'), parameter(name: 'returnStatus', type: 'boolean'), parameter(name: 'returnStdout', type: 'boolean'),], doc: 'PowerShell Script')
-        method(name: 'publishHTML', type: 'Object', params: [target: 'Map'], doc: 'Publish HTML reports')
-        method(name: 'pwd', type: 'Object', params: [:], doc: 'Determine current directory')
-        method(name: 'pwd', type: 'Object', namedParams: [parameter(name: 'tmp', type: 'boolean'),], doc: 'Determine current directory')
-        method(name: 'readFile', type: 'Object', params: [file: 'java.lang.String'], doc: 'Read file from workspace')
-        method(name: 'readFile', type: 'Object', namedParams: [parameter(name: 'file', type: 'java.lang.String'), parameter(name: 'encoding', type: 'java.lang.String'),], doc: 'Read file from workspace')
-        method(name: 'sh', type: 'Object', params: [script: 'java.lang.String'], doc: 'Shell Script')
-        method(name: 'sh', type: 'Object', namedParams: [parameter(name: 'script', type: 'java.lang.String'), parameter(name: 'encoding', type: 'java.lang.String'), parameter(name: 'returnStatus', type: 'boolean'), parameter(name: 'returnStdout', type: 'boolean'),], doc: 'Shell Script')
-        method(name: 'stash', type: 'Object', params: [name: 'java.lang.String'], doc: 'Stash some files to be used later in the build')
-        method(name: 'stash', type: 'Object', namedParams: [parameter(name: 'name', type: 'java.lang.String'), parameter(name: 'allowEmpty', type: 'boolean'), parameter(name: 'excludes', type: 'java.lang.String'), parameter(name: 'includes', type: 'java.lang.String'), parameter(name: 'useDefaultExcludes', type: 'boolean'),], doc: 'Stash some files to be used later in the build')
-        method(name: 'tm', type: 'Object', params: [stringWithMacro: 'java.lang.String'], doc: 'Expand a string containing macros')
-        method(name: 'unstash', type: 'Object', params: [name: 'java.lang.String'], doc: 'Restore files previously stashed')
-        method(name: 'validateDeclarativePipeline', type: 'Object', params: [path: 'java.lang.String'], doc: 'Validate a file containing a Declarative Pipeline')
-        method(name: 'wrap', type: 'Object', params: [delegate: Map, body: 'Closure'], doc: 'General Build Wrapper')
-        method(name: 'writeFile', type: 'Object', namedParams: [parameter(name: 'file', type: 'java.lang.String'), parameter(name: 'text', type: 'java.lang.String'), parameter(name: 'encoding', type: 'java.lang.String'),], doc: 'Write file to workspace')
-        method(name: 'archive', type: 'Object', params: [includes: 'java.lang.String'], doc: 'Advanced/Deprecated Archive artifacts')
-        method(name: 'archive', type: 'Object', namedParams: [parameter(name: 'includes', type: 'java.lang.String'), parameter(name: 'excludes', type: 'java.lang.String'),], doc: 'Archive artifacts')
-        method(name: 'dockerFingerprintFrom', type: 'Object', namedParams: [parameter(name: 'dockerfile', type: 'java.lang.String'), parameter(name: 'image', type: 'java.lang.String'), parameter(name: 'buildArgs', type: 'Map'), parameter(name: 'toolName', type: 'java.lang.String'),], doc: 'Record trace of a Docker image used in FROM')
-        method(name: 'unarchive', type: 'Object', params: [:], doc: 'Advanced/Deprecated Copy archived artifacts into the workspace')
-        method(name: 'unarchive', type: 'Object', namedParams: [parameter(name: 'mapping', type: 'Map'),], doc: 'Copy archived artifacts into the workspace')
-        method(name: 'withDockerContainer', type: 'Object', params: [image: 'String', body: 'Closure'], doc: 'Advanced/Deprecated Run build steps inside a Docker container')
-        method(name: 'withDockerContainer', type: 'Object', params: [body: Closure], namedParams: [parameter(name: 'image', type: 'java.lang.String'), parameter(name: 'args', type: 'java.lang.String'), parameter(name: 'toolName', type: 'java.lang.String'),], doc: 'Run build steps inside a Docker container')
-        method(name: 'withDockerRegistry', type: 'Object', params: [registry: Map, body: 'Closure'], doc: 'Advanced/Deprecated Sets up Docker registry endpoint')
-        method(name: 'withDockerServer', type: 'Object', params: [server: Map, body: 'Closure'], doc: 'Advanced/Deprecated Sets up Docker server endpoint')
-        method(name: 'parallel', type: 'Object', params: [body: 'Map'], doc: 'Run taask in parallel')
-    }
-
-    // Post actions!
-    if (enclosingCall("post")) {
-        method(name: 'always', type: 'Object', params: [body: 'Closure'])
-        method(name: 'success', type: 'Object', params: [body: 'Closure'])
-        method(name: 'failure', type: 'Object', params: [body: 'Closure'])
-        method(name: 'unstable', type: 'Object', params: [body: 'Closure'])
-        method(name: 'changed', type: 'Object', params: [body: 'Closure'])
-    }
-}
\ No newline at end of file


[incubator-sdap-nexusproto] 04/17: added license file

Posted by fg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

fgreg pushed a commit to branch SDAP-48
in repository https://gitbox.apache.org/repos/asf/incubator-sdap-nexusproto.git

commit 2b6fb9e2afae9dbd534ce763e040c6ad7e7d6bb7
Author: Frank Greguska <fr...@jpl.nasa.gov>
AuthorDate: Mon Jan 22 17:08:49 2018 -0800

    added license file
---
 LICENSE | 201 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 201 insertions(+)

diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..8dada3e
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "{}"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright {yyyy} {name of copyright owner}
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.


[incubator-sdap-nexusproto] 10/17: Merge pull request #2 from fgreg/master

Posted by fg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

fgreg pushed a commit to branch SDAP-48
in repository https://gitbox.apache.org/repos/asf/incubator-sdap-nexusproto.git

commit 20624dfda336b36c4ddeb62df2257d49f44c3f61
Merge: 1ccc99d 6372b1b
Author: fgreg <fg...@gmail.com>
AuthorDate: Tue Jan 30 13:52:41 2018 -0800

    Merge pull request #2 from fgreg/master
    
    SDAP-17: Required library for ningester

 .idea/modules/nexusproto_main.iml |   2 +-
 .idea/modules/nexusproto_test.iml |   2 +-
 CONTRIBUTING.md                   | 130 ++++++++++++++++++++++++++++++++++++++
 gradle.properties                 |   2 +-
 nexusproto.iml                    |   2 +-
 5 files changed, 134 insertions(+), 4 deletions(-)


[incubator-sdap-nexusproto] 11/17: make TimeSeriesTile accept an array of times

Posted by fg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

fgreg pushed a commit to branch SDAP-48
in repository https://gitbox.apache.org/repos/asf/incubator-sdap-nexusproto.git

commit 490c65bb5d26bee0a9174cbc3bc7a3e67bd0c139
Author: Frank Greguska <fr...@jpl.nasa.gov>
AuthorDate: Mon Mar 5 17:48:16 2018 -0800

    make TimeSeriesTile accept an array of times
---
 src/main/proto/DataTile.proto | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/proto/DataTile.proto b/src/main/proto/DataTile.proto
index b3ff403..6d56b99 100644
--- a/src/main/proto/DataTile.proto
+++ b/src/main/proto/DataTile.proto
@@ -50,7 +50,7 @@ message TimeSeriesTile{
     ShapedArray latitude = 1;
     ShapedArray longitude = 2;
 
-    int64 time = 3;
+    ShapedArray time = 3;
 
     ShapedArray variable_data = 4;
 


[incubator-sdap-nexusproto] 02/17: updated build

Posted by fg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

fgreg pushed a commit to branch SDAP-48
in repository https://gitbox.apache.org/repos/asf/incubator-sdap-nexusproto.git

commit 135cf8a0d469926cf729107318b081d0fd66f198
Author: Frank Greguska <fr...@jpl.nasa.gov>
AuthorDate: Mon Jan 22 14:34:28 2018 -0800

    updated build
---
 .gitignore                                      | 234 ++++++++++++++++++++++--
 .idea/.name                                     |   1 +
 .idea/compiler.xml                              |  11 ++
 .idea/encodings.xml                             |   6 +
 .idea/misc.xml                                  |   6 +
 .idea/modules.xml                               |  10 +
 .idea/modules/nexusproto_main.iml               |  14 ++
 .idea/modules/nexusproto_test.iml               |  16 ++
 .idea/vcs.xml                                   |   6 +
 build.gradle                                    |  65 ++++---
 gradle.properties                               |   3 +
 gradle/wrapper/gradle-wrapper.jar               | Bin 54711 -> 54711 bytes
 gradle/wrapper/gradle-wrapper.properties        |   2 +-
 gradlew.bat                                     |  84 +++++++++
 nexusproto.iml                                  |  13 ++
 src/main/proto/DataTile.proto                   | 103 ++++++++---
 src/main/python/nexusproto/__init__.py          |  16 ++
 src/main/python/nexusproto/serialization.py     |  52 ++++++
 src/main/python/nexusproto/setup.py             |  41 +++++
 src/main/python/ningesterproto/__init__.py      |   6 -
 src/main/python/ningesterproto/serialization.py |  40 ----
 src/main/python/ningesterproto/setup.py         |  31 ----
 22 files changed, 623 insertions(+), 137 deletions(-)

diff --git a/.gitignore b/.gitignore
index ab9b2f9..f350e37 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,11 +1,3 @@
-.gradle/
-.idea/
-gradlew.bat
-
-distrobution/
-
-gen/
-
 build/*
 !build/reports
 
@@ -13,23 +5,237 @@ build/reports/*
 !build/reports/license
 !build/reports/project
 
-nexusproto.egg-info/
+distrobution/
 
-.DS_Store
+gen/
+
+
+### Python template
+# Byte-compiled / optimized / DLL files
+__pycache__/
+*.py[cod]
+*$py.class
+
+# C extensions
+*.so
+
+# Distribution / packaging
+.Python
+build/
+develop-eggs/
+dist/
+downloads/
+eggs/
+.eggs/
+lib/
+lib64/
+parts/
+sdist/
+var/
+wheels/
+*.egg-info/
+.installed.cfg
+*.egg
+MANIFEST
+
+# PyInstaller
+#  Usually these files are written by a python script from a template
+#  before PyInstaller builds the exe, so as to inject date/other infos into it.
+*.manifest
+*.spec
+
+# Installer logs
+pip-log.txt
+pip-delete-this-directory.txt
+
+# Unit test / coverage reports
+htmlcov/
+.tox/
+.coverage
+.coverage.*
+.cache
+nosetests.xml
+coverage.xml
+*.cover
+.hypothesis/
+
+# Translations
+*.mo
+*.pot
+
+# Django stuff:
 *.log
+.static_storage/
+.media/
+local_settings.py
+
+# Flask stuff:
+instance/
+.webassets-cache
+
+# Scrapy stuff:
+.scrapy
+
+# Sphinx documentation
+docs/_build/
+
+# PyBuilder
+target/
+
+# Jupyter Notebook
+.ipynb_checkpoints
+
+# pyenv
+.python-version
+
+# celery beat schedule file
+celerybeat-schedule
+
+# SageMath parsed files
+*.sage.py
+
+# Environments
+.env
+.venv
+env/
+venv/
+ENV/
+env.bak/
+venv.bak/
 
-#Idea files
-*.iml
-*.ipr
+# Spyder project settings
+.spyderproject
+.spyproject
+
+# Rope project settings
+.ropeproject
+
+# mkdocs documentation
+/site
+
+# mypy
+.mypy_cache/
+### JetBrains template
+# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
+# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
+
+# User-specific stuff:
+.idea/**/workspace.xml
+.idea/**/tasks.xml
+.idea/dictionaries
+
+# Sensitive or high-churn files:
+.idea/**/dataSources/
+.idea/**/dataSources.ids
+.idea/**/dataSources.xml
+.idea/**/dataSources.local.xml
+.idea/**/sqlDataSources.xml
+.idea/**/dynamic.xml
+.idea/**/uiDesigner.xml
+
+# Gradle:
+.idea/**/gradle.xml
+.idea/**/libraries
+
+# CMake
+cmake-build-debug/
+
+# Mongo Explorer plugin:
+.idea/**/mongoSettings.xml
+
+## File-based project format:
 *.iws
 
+## Plugin-specific files:
+
+# IntelliJ
+out/
+
+# mpeltonen/sbt-idea plugin
+.idea_modules/
+
+# JIRA plugin
+atlassian-ide-plugin.xml
+
+# Cursive Clojure plugin
+.idea/replstate.xml
+
+# Crashlytics plugin (for Android Studio and IntelliJ)
+com_crashlytics_export_strings.xml
+crashlytics.properties
+crashlytics-build.properties
+fabric.properties
+### VirtualEnv template
+# Virtualenv
+# http://iamzed.com/2009/05/07/a-primer-on-virtualenv/
+[Bb]in
+[Ii]nclude
+[Ll]ib
+[Ll]ib64
+[Ll]ocal
+[Ss]cripts
+pyvenv.cfg
+pip-selfcheck.json
+### macOS template
+# General
+.DS_Store
+.AppleDouble
+.LSOverride
+
+# Icon must end with two \r
+Icon
+
+# Thumbnails
+._*
+
+# Files that might appear in the root of a volume
+.DocumentRevisions-V100
+.fseventsd
+.Spotlight-V100
+.TemporaryItems
+.Trashes
+.VolumeIcon.icns
+.com.apple.timemachine.donotpresent
+
+# Directories potentially created on remote AFP share
+.AppleDB
+.AppleDesktop
+Network Trash Folder
+Temporary Items
+.apdisk
+### Java template
+# Compiled class file
 *.class
 
+# BlueJ files
+*.ctxt
+
+# Mobile Tools for Java (J2ME)
+.mtj.tmp/
+
 # Package Files #
+*.jar
 *.war
 *.ear
+*.zip
+*.tar.gz
+*.rar
 
 # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
 hs_err_pid*
 
-gradle.properties
+### Gradle template
+.gradle
+/build/
+
+# Ignore Gradle GUI config
+gradle-app.setting
+
+# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
+!gradle-wrapper.jar
+
+# Cache of project
+.gradletasknamecache
+
+# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
+# gradle/wrapper/gradle-wrapper.properties
diff --git a/.idea/.name b/.idea/.name
new file mode 100644
index 0000000..4e9f175
--- /dev/null
+++ b/.idea/.name
@@ -0,0 +1 @@
+nexusproto
\ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
new file mode 100644
index 0000000..a7cf469
--- /dev/null
+++ b/.idea/compiler.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="CompilerConfiguration">
+    <bytecodeTargetLevel>
+      <module name="nexusproto_main" target="1.8" />
+      <module name="nexusproto_test" target="1.8" />
+      <module name="ningester-protobuf_main" target="1.8" />
+      <module name="ningester-protobuf_test" target="1.8" />
+    </bytecodeTargetLevel>
+  </component>
+</project>
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
new file mode 100644
index 0000000..97626ba
--- /dev/null
+++ b/.idea/encodings.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="Encoding">
+    <file url="PROJECT" charset="UTF-8" />
+  </component>
+</project>
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..44ae3bd
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="false" project-jdk-name="1.8" project-jdk-type="JavaSDK">
+    <output url="file://$PROJECT_DIR$/classes" />
+  </component>
+</project>
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..a7e194b
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectModuleManager">
+    <modules>
+      <module fileurl="file://$PROJECT_DIR$/nexusproto.iml" filepath="$PROJECT_DIR$/nexusproto.iml" />
+      <module fileurl="file://$PROJECT_DIR$/.idea/modules/nexusproto_main.iml" filepath="$PROJECT_DIR$/.idea/modules/nexusproto_main.iml" group="nexusproto" />
+      <module fileurl="file://$PROJECT_DIR$/.idea/modules/nexusproto_test.iml" filepath="$PROJECT_DIR$/.idea/modules/nexusproto_test.iml" group="nexusproto" />
+    </modules>
+  </component>
+</project>
\ No newline at end of file
diff --git a/.idea/modules/nexusproto_main.iml b/.idea/modules/nexusproto_main.iml
new file mode 100644
index 0000000..403cc46
--- /dev/null
+++ b/.idea/modules/nexusproto_main.iml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module external.linked.project.id="nexusproto:main" external.linked.project.path="$MODULE_DIR$/../.." external.root.project.path="$MODULE_DIR$/../.." external.system.id="GRADLE" external.system.module.group="'org.apache.sdap'" external.system.module.type="sourceSet" external.system.module.version="1.0.1-SNAPSHOT" type="JAVA_MODULE" version="4">
+  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
+    <output url="file://$MODULE_DIR$/../../out/production/classes" />
+    <exclude-output />
+    <content url="file://$MODULE_DIR$/../../src/main">
+      <sourceFolder url="file://$MODULE_DIR$/../../src/main/java" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/../../src/main/resources" type="java-resource" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="library" name="Gradle: com.google.protobuf:protobuf-java:3.4.0" level="project" />
+  </component>
+</module>
\ No newline at end of file
diff --git a/.idea/modules/nexusproto_test.iml b/.idea/modules/nexusproto_test.iml
new file mode 100644
index 0000000..c80b72c
--- /dev/null
+++ b/.idea/modules/nexusproto_test.iml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module external.linked.project.id="nexusproto:test" external.linked.project.path="$MODULE_DIR$/../.." external.root.project.path="$MODULE_DIR$/../.." external.system.id="GRADLE" external.system.module.group="'org.apache.sdap'" external.system.module.type="sourceSet" external.system.module.version="1.0.1-SNAPSHOT" type="JAVA_MODULE" version="4">
+  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
+    <output-test url="file://$MODULE_DIR$/../../out/test/classes" />
+    <exclude-output />
+    <content url="file://$MODULE_DIR$/../../src/test">
+      <sourceFolder url="file://$MODULE_DIR$/../../src/test/java" isTestSource="true" />
+      <sourceFolder url="file://$MODULE_DIR$/../../src/test/resources" type="java-test-resource" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="module" module-name="nexusproto_main" />
+    <orderEntry type="library" name="Gradle: com.google.protobuf:protobuf-java:3.4.0" level="project" />
+  </component>
+  <component name="TestModuleProperties" production-module="nexusproto_main" />
+</module>
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..94a25f7
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="VcsDirectoryMappings">
+    <mapping directory="$PROJECT_DIR$" vcs="Git" />
+  </component>
+</project>
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
index dc0bb41..8265730 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,35 +1,39 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*   http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
 import java.nio.file.*
 import java.nio.file.attribute.BasicFileAttributes
 
-buildscript {
-    repositories {
-        mavenCentral()
-        jcenter()
-    }
-    dependencies {
-        classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.3'
-    }
+plugins {
+    id 'java'
+    id 'idea'
+    id 'com.google.protobuf' version '0.8.3'
+    id 'maven'
+    id 'maven-publish'
+    id 'project-report'
+    id 'net.researchgate.release' version '2.6.0'
 }
 
 repositories {
     mavenCentral()
 }
 
-
-apply plugin: 'java'
-apply plugin: 'com.google.protobuf'
-apply plugin: 'maven'
-apply plugin: 'maven-publish'
-apply plugin: 'project-report'
-
-
-group = 'gov.nasa.jpl.nexus.ningester'
-version = '1.0.0.RELEASE'
-
 ext {
     genDirectory = "$projectDir/gen"
     distDirectory = "$projectDir/distrobution"
-    pythonBuildDirPath = "${file(buildDir.path + '/python/ningesterproto').path}"
+    pythonBuildDirPath = "${file(buildDir.path + '/python/nexusproto').path}"
 }
 
 protobuf {
@@ -45,7 +49,7 @@ protobuf {
     plugins {
         // Define a plugin with name 'grpc'
         grpc {
-            artifact = 'io.grpc:protoc-gen-grpc-java:1.7.0'
+            artifact = 'io.grpc:protoc-gen-grpc-java:1.9.0'
         }
     }
 
@@ -94,16 +98,29 @@ assemble.doLast {
         }
     })
 
-    Files.move(file(pythonbuilddir.path + '/ningesterproto/setup.py').toPath(), file(pythonbuilddir.path + '/setup.py').toPath(), StandardCopyOption.REPLACE_EXISTING)
+    def setupPy = file(pythonbuilddir.path + '/nexusproto/setup.py').text
+    setupPy = setupPy.replaceAll(/GRADLE_PROJECT_VERSION/, "$project.version")
+    file(pythonbuilddir.path + '/nexusproto/setup.py').write(setupPy)
+
+    Files.move(file(pythonbuilddir.path + '/nexusproto/setup.py').toPath(), file(pythonbuilddir.path + '/setup.py').toPath(), StandardCopyOption.REPLACE_EXISTING)
 
     File generatedPython = file("$genDirectory/main/python/DataTile_pb2.py")
 
-    Files.copy(generatedPython.toPath(), file(pythonbuilddir.path + '/ningesterproto/DataTile_pb2.py').toPath(), StandardCopyOption.REPLACE_EXISTING)
+    Files.copy(generatedPython.toPath(), file(pythonbuilddir.path + '/nexusproto/DataTile_pb2.py').toPath(), StandardCopyOption.REPLACE_EXISTING)
+}
+
+updateVersion.doLast {
+    File pythonbuilddir = file(pythonBuildDirPath)
+
+    def setupPy = file(pythonbuilddir.path + '/nexusproto/setup.py').text
+    setupPy = setupPy.replaceAll(/GRADLE_PROJECT_VERSION/, "$project.version")
+    file(pythonbuilddir.path + '/nexusproto/setup.py').write(setupPy)
+
 }
 
 task tarPython(type: Tar, dependsOn: [assemble]) {
     destinationDir = file("distrobution")
-    archiveName = 'ningesterproto.tar.gz'
+    archiveName = 'nexusproto.tar.gz'
     compression = Compression.GZIP
     from(file(buildDir.path + '/python')) {
         include '**/*'
diff --git a/gradle.properties b/gradle.properties
new file mode 100644
index 0000000..bce49ec
--- /dev/null
+++ b/gradle.properties
@@ -0,0 +1,3 @@
+group = 'org.apache.sdap'
+version=1.0.1-SNAPSHOT
+sourceCompatibility = 1.8
\ No newline at end of file
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
index d1645de..610d630 100644
Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 74a41c0..b4965f4 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,4 +1,4 @@
-#Tue Oct 17 11:06:47 PDT 2017
+#Thu Jan 18 14:53:09 PST 2018
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
diff --git a/gradlew.bat b/gradlew.bat
new file mode 100644
index 0000000..f955316
--- /dev/null
+++ b/gradlew.bat
@@ -0,0 +1,84 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem  Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windows variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/nexusproto.iml b/nexusproto.iml
new file mode 100644
index 0000000..fd86645
--- /dev/null
+++ b/nexusproto.iml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module external.linked.project.id="nexusproto" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="'org.apache.sdap'" external.system.module.version="1.0.1-SNAPSHOT" type="JAVA_MODULE" version="4">
+  <component name="NewModuleRootManager" inherit-compiler-output="true">
+    <exclude-output />
+    <content url="file://$MODULE_DIR$">
+      <excludeFolder url="file://$MODULE_DIR$/.gradle" />
+      <excludeFolder url="file://$MODULE_DIR$/build" />
+      <excludeFolder url="file://$MODULE_DIR$/out" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+  </component>
+</module>
\ No newline at end of file
diff --git a/src/main/proto/DataTile.proto b/src/main/proto/DataTile.proto
index b947b11..b3ff403 100644
--- a/src/main/proto/DataTile.proto
+++ b/src/main/proto/DataTile.proto
@@ -1,40 +1,88 @@
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements.  See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
 syntax = "proto3";
 
-package gov.nasa.jpl.nexus.ningester.protobuf;
-option java_package = "gov.nasa.jpl.nexus.ningester.protobuf";
+package org.apache.sdap.nexusproto;
+option java_package = "org.apache.sdap.nexusproto";
 option java_multiple_files = true;
 
-service ProtoTileService {
 
-    rpc ToTile(stream TileSpecification) returns (stream Tile) {}
-    rpc ProcessTile(stream Tile) returns (stream Tile){}
+message GridTile{
+
+    ShapedArray latitude = 1;
+    ShapedArray longitude = 2;
+
+    int64 time = 3;
+
+    ShapedArray variable_data = 4;
+
+    repeated MetaData meta_data = 5;
 
 }
 
-message TileSpecification{
+message SwathTile{
 
-    message Slice {
-        oneof name_or_position {
-            string dimension_name = 1;
-            int32 dimension_position = 2;
-        }
-        int64 start = 3;
-        int64 stop = 4;
-        int64 step = 5;
-    }
+    ShapedArray latitude = 1;
+    ShapedArray longitude = 2;
+    ShapedArray time = 3;
+
+    ShapedArray variable_data = 4;
+
+    repeated MetaData meta_data = 5;
 
-    repeated Slice slices = 1;
 }
 
-message Tile{
+message TimeSeriesTile{
+
+    ShapedArray latitude = 1;
+    ShapedArray longitude = 2;
+
+    int64 time = 3;
+
+    ShapedArray variable_data = 4;
+
+    repeated MetaData meta_data = 5;
+
+}
+
+message MetaData{
+    string name = 1;
+    ShapedArray meta_data = 2;
+}
+
+message ShapedArray{
+    repeated int32 shape = 1 [packed=true];
+    string dtype = 2;
+    bytes array_data = 3;
+}
+
+message Attribute{
+    string name = 1;
+    repeated string values = 2;
+}
+
+message TileSummary{
 
     string tile_id = 1;
-    TileSpecification section_spec = 2;
+    string section_spec = 2;
     string dataset_name = 3;
     string granule = 4;
     string dataset_uuid = 5;
-    string variable_name = 6;
-    repeated string metadata_names = 7;
+    string data_var_name = 6;
+    repeated Attribute global_attributes = 7;
 
     message BBox{
         float lat_min = 1;
@@ -61,6 +109,19 @@ message Tile{
         float kurtosis = 12;
     }
     DataStats stats = 9;
+}
+
+message NexusTile{
+    TileSummary summary = 1;
+    TileData tile = 2;
+}
 
-    bytes data = 10;
+message TileData{
+    string tile_id = 1;
+
+    oneof tile_type{
+        GridTile grid_tile = 2;
+        SwathTile swath_tile = 3;
+        TimeSeriesTile time_series_tile = 4;
+    }
 }
\ No newline at end of file
diff --git a/src/main/python/nexusproto/__init__.py b/src/main/python/nexusproto/__init__.py
new file mode 100644
index 0000000..b0c565d
--- /dev/null
+++ b/src/main/python/nexusproto/__init__.py
@@ -0,0 +1,16 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from nexusproto.serialization import *
diff --git a/src/main/python/nexusproto/serialization.py b/src/main/python/nexusproto/serialization.py
new file mode 100644
index 0000000..a9ba949
--- /dev/null
+++ b/src/main/python/nexusproto/serialization.py
@@ -0,0 +1,52 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+try:
+    from StringIO import StringIO
+except ImportError:
+    from io import BytesIO as StringIO
+
+from nexusproto import DataTile_pb2 as nexusproto
+import numpy
+
+
+def from_shaped_array(shaped_array):
+    memfile = StringIO()
+    memfile.write(shaped_array.array_data)
+    memfile.seek(0)
+    data_array = numpy.load(memfile)
+    memfile.close()
+
+    return data_array
+
+
+def to_shaped_array(data_array):
+    shaped_array = nexusproto.ShapedArray()
+
+    shaped_array.shape.extend([dimension_size for dimension_size in data_array.shape])
+    shaped_array.dtype = str(data_array.dtype)
+
+    memfile = StringIO()
+    numpy.save(memfile, data_array)
+    shaped_array.array_data = memfile.getvalue()
+    memfile.close()
+
+    return shaped_array
+
+def to_metadata(name, data_array):
+    metadata = nexusproto.MetaData()
+    metadata.name = name
+    metadata.meta_data.CopyFrom(to_shaped_array(data_array))
+
+    return metadata
diff --git a/src/main/python/nexusproto/setup.py b/src/main/python/nexusproto/setup.py
new file mode 100644
index 0000000..c4f0542
--- /dev/null
+++ b/src/main/python/nexusproto/setup.py
@@ -0,0 +1,41 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+from setuptools import setup
+
+__version__ = 'GRADLE_PROJECT_VERSION'
+
+setup(
+    name='nexusproto',
+    version=__version__,
+    url="https://github.com/apache/incubator-sdap-nexusproto",
+
+    author="Frank Greguska",
+
+    description="Protobufs used while ingesting NEXUS tiles.",
+
+    packages=['nexusproto'],
+    platforms='any',
+
+    install_requires=[
+        'protobuf'
+    ],
+
+    classifiers=[
+        'Development Status :: 1 - Pre-Alpha',
+        'Intended Audience :: Developers',
+        'Operating System :: OS Independent',
+        'Programming Language :: Python :: 3.5',
+    ]
+)
diff --git a/src/main/python/ningesterproto/__init__.py b/src/main/python/ningesterproto/__init__.py
deleted file mode 100644
index f7fad5c..0000000
--- a/src/main/python/ningesterproto/__init__.py
+++ /dev/null
@@ -1,6 +0,0 @@
-"""
-Copyright (c) 2017 Jet Propulsion Laboratory,
-California Institute of Technology.  All rights reserved
-"""
-
-from serialization import *
diff --git a/src/main/python/ningesterproto/serialization.py b/src/main/python/ningesterproto/serialization.py
deleted file mode 100644
index 64fe207..0000000
--- a/src/main/python/ningesterproto/serialization.py
+++ /dev/null
@@ -1,40 +0,0 @@
-"""
-Copyright (c) 2016 Jet Propulsion Laboratory,
-California Institute of Technology.  All rights reserved
-"""
-import StringIO
-
-import numpy
-
-import nexusproto.NexusContent_pb2 as nexusproto
-
-
-def from_shaped_array(shaped_array):
-    memfile = StringIO.StringIO()
-    memfile.write(shaped_array.array_data)
-    memfile.seek(0)
-    data_array = numpy.load(memfile)
-    memfile.close()
-
-    return data_array
-
-
-def to_shaped_array(data_array):
-    shaped_array = nexusproto.ShapedArray()
-
-    shaped_array.shape.extend([dimension_size for dimension_size in data_array.shape])
-    shaped_array.dtype = str(data_array.dtype)
-
-    memfile = StringIO.StringIO()
-    numpy.save(memfile, data_array)
-    shaped_array.array_data = memfile.getvalue()
-    memfile.close()
-
-    return shaped_array
-
-def to_metadata(name, data_array):
-    metadata = nexusproto.MetaData()
-    metadata.name = name
-    metadata.meta_data.CopyFrom(to_shaped_array(data_array))
-
-    return metadata
diff --git a/src/main/python/ningesterproto/setup.py b/src/main/python/ningesterproto/setup.py
deleted file mode 100644
index b1bcaec..0000000
--- a/src/main/python/ningesterproto/setup.py
+++ /dev/null
@@ -1,31 +0,0 @@
-"""
-Copyright (c) 2016 Jet Propulsion Laboratory,
-California Institute of Technology.  All rights reserved
-"""
-from setuptools import setup
-
-__version__ = '0.1'
-
-setup(
-    name='ningesterproto',
-    version=__version__,
-    url="https://github.com/aist-oceanworks",
-
-    author="Team Nexus",
-
-    description="Protobufs used while ingesting NEXUS tiles.",
-
-    packages=['ningesterproto'],
-    platforms='any',
-
-    install_requires=[
-        'protobuf'
-    ],
-
-    classifiers=[
-        'Development Status :: 1 - Pre-Alpha',
-        'Intended Audience :: Developers',
-        'Operating System :: OS Independent',
-        'Programming Language :: Python :: 2.7',
-    ]
-)


[incubator-sdap-nexusproto] 01/17: initial commit

Posted by fg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

fgreg pushed a commit to branch SDAP-48
in repository https://gitbox.apache.org/repos/asf/incubator-sdap-nexusproto.git

commit 9be5c61545a8d3ffb9111f7f760ee968adc7d3c5
Author: Frank Greguska <fr...@jpl.nasa.gov>
AuthorDate: Thu Oct 19 10:43:58 2017 -0700

    initial commit
---
 .gitignore                                      |  35 +++++
 README.md                                       |  24 ++++
 build.gradle                                    | 122 +++++++++++++++++
 gradle/wrapper/gradle-wrapper.jar               | Bin 0 -> 54711 bytes
 gradle/wrapper/gradle-wrapper.properties        |   6 +
 gradlew                                         | 172 ++++++++++++++++++++++++
 src/main/proto/DataTile.proto                   |  66 +++++++++
 src/main/python/ningesterproto/__init__.py      |   6 +
 src/main/python/ningesterproto/serialization.py |  40 ++++++
 src/main/python/ningesterproto/setup.py         |  31 +++++
 10 files changed, 502 insertions(+)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..ab9b2f9
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,35 @@
+.gradle/
+.idea/
+gradlew.bat
+
+distrobution/
+
+gen/
+
+build/*
+!build/reports
+
+build/reports/*
+!build/reports/license
+!build/reports/project
+
+nexusproto.egg-info/
+
+.DS_Store
+*.log
+
+#Idea files
+*.iml
+*.ipr
+*.iws
+
+*.class
+
+# Package Files #
+*.war
+*.ear
+
+# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
+hs_err_pid*
+
+gradle.properties
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..34bf7c7
--- /dev/null
+++ b/README.md
@@ -0,0 +1,24 @@
+# nexus-messages
+
+This project contains the [protobuf](https://developers.google.com/protocol-buffers/) definition for a NexusTile. By compiling the protobuf specification, both Java and Python objects are generated.
+
+# Developer Installation
+
+1. Run `./gradlew clean build install`
+
+2. cd into `/build/python/nexusproto`
+
+3. Setup a separate conda env or activate an existing one
+
+    ````
+    conda create --name nexus-messages python
+    source activate nexus-messages
+    ````
+
+4. Install Conda dependencies
+
+    ````
+    conda install numpy
+    ````
+
+5. Run `python setup.py install`
diff --git a/build.gradle b/build.gradle
new file mode 100644
index 0000000..dc0bb41
--- /dev/null
+++ b/build.gradle
@@ -0,0 +1,122 @@
+import java.nio.file.*
+import java.nio.file.attribute.BasicFileAttributes
+
+buildscript {
+    repositories {
+        mavenCentral()
+        jcenter()
+    }
+    dependencies {
+        classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.3'
+    }
+}
+
+repositories {
+    mavenCentral()
+}
+
+
+apply plugin: 'java'
+apply plugin: 'com.google.protobuf'
+apply plugin: 'maven'
+apply plugin: 'maven-publish'
+apply plugin: 'project-report'
+
+
+group = 'gov.nasa.jpl.nexus.ningester'
+version = '1.0.0.RELEASE'
+
+ext {
+    genDirectory = "$projectDir/gen"
+    distDirectory = "$projectDir/distrobution"
+    pythonBuildDirPath = "${file(buildDir.path + '/python/ningesterproto').path}"
+}
+
+protobuf {
+
+    generatedFilesBaseDir = genDirectory
+
+    // Configure the protoc executable
+    protoc {
+        // Download from repositories
+        artifact = 'com.google.protobuf:protoc:3.4.0'
+    }
+
+    plugins {
+        // Define a plugin with name 'grpc'
+        grpc {
+            artifact = 'io.grpc:protoc-gen-grpc-java:1.7.0'
+        }
+    }
+
+    generateProtoTasks {
+        all().each { task ->
+            task.builtins {
+                python {
+                    outputSubDir = 'python'
+                }
+            }
+        }
+    }
+
+}
+
+task writeNewPom {
+    doLast {
+        pom {}.writeTo(file(buildDir.path + "/poms/${project.name}-${project.version}.xml"))
+    }
+}
+
+publishing {
+    publications {
+        mavenJava(MavenPublication) {
+            from components.java
+        }
+    }
+}
+
+assemble.doLast {
+    File pythonbuilddir = file(pythonBuildDirPath)
+
+    File pythonsource = file('src/main/python')
+
+    Files.walkFileTree(pythonsource.toPath(), new SimpleFileVisitor<Path>() {
+        @Override
+        public FileVisitResult preVisitDirectory(final Path dir, final BasicFileAttributes attrs) throws IOException {
+            Files.createDirectories(pythonbuilddir.toPath().resolve(pythonsource.toPath().relativize(dir)))
+            return FileVisitResult.CONTINUE
+        }
+
+        @Override
+        public FileVisitResult visitFile(final Path file, final BasicFileAttributes attrs) throws IOException {
+            Files.copy(file, pythonbuilddir.toPath().resolve(pythonsource.toPath().relativize(file)), StandardCopyOption.REPLACE_EXISTING)
+            return FileVisitResult.CONTINUE
+        }
+    })
+
+    Files.move(file(pythonbuilddir.path + '/ningesterproto/setup.py').toPath(), file(pythonbuilddir.path + '/setup.py').toPath(), StandardCopyOption.REPLACE_EXISTING)
+
+    File generatedPython = file("$genDirectory/main/python/DataTile_pb2.py")
+
+    Files.copy(generatedPython.toPath(), file(pythonbuilddir.path + '/ningesterproto/DataTile_pb2.py').toPath(), StandardCopyOption.REPLACE_EXISTING)
+}
+
+task tarPython(type: Tar, dependsOn: [assemble]) {
+    destinationDir = file("distrobution")
+    archiveName = 'ningesterproto.tar.gz'
+    compression = Compression.GZIP
+    from(file(buildDir.path + '/python')) {
+        include '**/*'
+    }
+}
+
+clean.doLast {
+    file(genDirectory).deleteDir()
+    file(distDirectory).deleteDir()
+}
+
+dependencies {
+
+    compile 'com.google.protobuf:protobuf-java:3.4.0'
+
+}
\ No newline at end of file
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 0000000..d1645de
Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..74a41c0
--- /dev/null
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Tue Oct 17 11:06:47 PDT 2017
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-3.5.1-bin.zip
diff --git a/gradlew b/gradlew
new file mode 100755
index 0000000..4453cce
--- /dev/null
+++ b/gradlew
@@ -0,0 +1,172 @@
+#!/usr/bin/env sh
+
+##############################################################################
+##
+##  Gradle start up script for UN*X
+##
+##############################################################################
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+    ls=`ls -ld "$PRG"`
+    link=`expr "$ls" : '.*-> \(.*\)$'`
+    if expr "$link" : '/.*' > /dev/null; then
+        PRG="$link"
+    else
+        PRG=`dirname "$PRG"`"/$link"
+    fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn ( ) {
+    echo "$*"
+}
+
+die ( ) {
+    echo
+    echo "$*"
+    echo
+    exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "`uname`" in
+  CYGWIN* )
+    cygwin=true
+    ;;
+  Darwin* )
+    darwin=true
+    ;;
+  MINGW* )
+    msys=true
+    ;;
+  NONSTOP* )
+    nonstop=true
+    ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+        # IBM's JDK on AIX uses strange locations for the executables
+        JAVACMD="$JAVA_HOME/jre/sh/java"
+    else
+        JAVACMD="$JAVA_HOME/bin/java"
+    fi
+    if [ ! -x "$JAVACMD" ] ; then
+        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+    fi
+else
+    JAVACMD="java"
+    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
+    MAX_FD_LIMIT=`ulimit -H -n`
+    if [ $? -eq 0 ] ; then
+        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+            MAX_FD="$MAX_FD_LIMIT"
+        fi
+        ulimit -n $MAX_FD
+        if [ $? -ne 0 ] ; then
+            warn "Could not set maximum file descriptor limit: $MAX_FD"
+        fi
+    else
+        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+    fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+    JAVACMD=`cygpath --unix "$JAVACMD"`
+
+    # We build the pattern for arguments to be converted via cygpath
+    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+    SEP=""
+    for dir in $ROOTDIRSRAW ; do
+        ROOTDIRS="$ROOTDIRS$SEP$dir"
+        SEP="|"
+    done
+    OURCYGPATTERN="(^($ROOTDIRS))"
+    # Add a user-defined pattern to the cygpath arguments
+    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+    fi
+    # Now convert the arguments - kludge to limit ourselves to /bin/sh
+    i=0
+    for arg in "$@" ; do
+        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option
+
+        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
+            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+        else
+            eval `echo args$i`="\"$arg\""
+        fi
+        i=$((i+1))
+    done
+    case $i in
+        (0) set -- ;;
+        (1) set -- "$args0" ;;
+        (2) set -- "$args0" "$args1" ;;
+        (3) set -- "$args0" "$args1" "$args2" ;;
+        (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+        (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+        (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+        (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+        (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+        (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+    esac
+fi
+
+# Escape application args
+save ( ) {
+    for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
+    echo " "
+}
+APP_ARGS=$(save "$@")
+
+# Collect all arguments for the java command, following the shell quoting and substitution rules
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+
+# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
+if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
+  cd "$(dirname "$0")"
+fi
+
+exec "$JAVACMD" "$@"
diff --git a/src/main/proto/DataTile.proto b/src/main/proto/DataTile.proto
new file mode 100644
index 0000000..b947b11
--- /dev/null
+++ b/src/main/proto/DataTile.proto
@@ -0,0 +1,66 @@
+syntax = "proto3";
+
+package gov.nasa.jpl.nexus.ningester.protobuf;
+option java_package = "gov.nasa.jpl.nexus.ningester.protobuf";
+option java_multiple_files = true;
+
+service ProtoTileService {
+
+    rpc ToTile(stream TileSpecification) returns (stream Tile) {}
+    rpc ProcessTile(stream Tile) returns (stream Tile){}
+
+}
+
+message TileSpecification{
+
+    message Slice {
+        oneof name_or_position {
+            string dimension_name = 1;
+            int32 dimension_position = 2;
+        }
+        int64 start = 3;
+        int64 stop = 4;
+        int64 step = 5;
+    }
+
+    repeated Slice slices = 1;
+}
+
+message Tile{
+
+    string tile_id = 1;
+    TileSpecification section_spec = 2;
+    string dataset_name = 3;
+    string granule = 4;
+    string dataset_uuid = 5;
+    string variable_name = 6;
+    repeated string metadata_names = 7;
+
+    message BBox{
+        float lat_min = 1;
+        float lat_max = 2;
+        float lon_min = 3;
+        float lon_max = 4;
+    }
+    BBox bbox = 8;
+
+    message DataStats{
+        float min = 1;
+        float max = 2;
+        float mean = 3;
+        int64 count = 4;
+
+        int64 min_time = 5;
+        int64 max_time = 6;
+
+        float std_dev = 7;
+        float sum = 8;
+        float median = 9;
+        float variance = 10;
+        float skewness = 11;
+        float kurtosis = 12;
+    }
+    DataStats stats = 9;
+
+    bytes data = 10;
+}
\ No newline at end of file
diff --git a/src/main/python/ningesterproto/__init__.py b/src/main/python/ningesterproto/__init__.py
new file mode 100644
index 0000000..f7fad5c
--- /dev/null
+++ b/src/main/python/ningesterproto/__init__.py
@@ -0,0 +1,6 @@
+"""
+Copyright (c) 2017 Jet Propulsion Laboratory,
+California Institute of Technology.  All rights reserved
+"""
+
+from serialization import *
diff --git a/src/main/python/ningesterproto/serialization.py b/src/main/python/ningesterproto/serialization.py
new file mode 100644
index 0000000..64fe207
--- /dev/null
+++ b/src/main/python/ningesterproto/serialization.py
@@ -0,0 +1,40 @@
+"""
+Copyright (c) 2016 Jet Propulsion Laboratory,
+California Institute of Technology.  All rights reserved
+"""
+import StringIO
+
+import numpy
+
+import nexusproto.NexusContent_pb2 as nexusproto
+
+
+def from_shaped_array(shaped_array):
+    memfile = StringIO.StringIO()
+    memfile.write(shaped_array.array_data)
+    memfile.seek(0)
+    data_array = numpy.load(memfile)
+    memfile.close()
+
+    return data_array
+
+
+def to_shaped_array(data_array):
+    shaped_array = nexusproto.ShapedArray()
+
+    shaped_array.shape.extend([dimension_size for dimension_size in data_array.shape])
+    shaped_array.dtype = str(data_array.dtype)
+
+    memfile = StringIO.StringIO()
+    numpy.save(memfile, data_array)
+    shaped_array.array_data = memfile.getvalue()
+    memfile.close()
+
+    return shaped_array
+
+def to_metadata(name, data_array):
+    metadata = nexusproto.MetaData()
+    metadata.name = name
+    metadata.meta_data.CopyFrom(to_shaped_array(data_array))
+
+    return metadata
diff --git a/src/main/python/ningesterproto/setup.py b/src/main/python/ningesterproto/setup.py
new file mode 100644
index 0000000..b1bcaec
--- /dev/null
+++ b/src/main/python/ningesterproto/setup.py
@@ -0,0 +1,31 @@
+"""
+Copyright (c) 2016 Jet Propulsion Laboratory,
+California Institute of Technology.  All rights reserved
+"""
+from setuptools import setup
+
+__version__ = '0.1'
+
+setup(
+    name='ningesterproto',
+    version=__version__,
+    url="https://github.com/aist-oceanworks",
+
+    author="Team Nexus",
+
+    description="Protobufs used while ingesting NEXUS tiles.",
+
+    packages=['ningesterproto'],
+    platforms='any',
+
+    install_requires=[
+        'protobuf'
+    ],
+
+    classifiers=[
+        'Development Status :: 1 - Pre-Alpha',
+        'Intended Audience :: Developers',
+        'Operating System :: OS Independent',
+        'Programming Language :: Python :: 2.7',
+    ]
+)


[incubator-sdap-nexusproto] 05/17: add disclaimer update gradle version

Posted by fg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

fgreg pushed a commit to branch SDAP-48
in repository https://gitbox.apache.org/repos/asf/incubator-sdap-nexusproto.git

commit d02c3c0cffb00488cba997fe37f2e8d8e858df6f
Author: Frank Greguska <fr...@jpl.nasa.gov>
AuthorDate: Mon Jan 22 18:29:36 2018 -0800

    add disclaimer update gradle version
---
 DISCLAIMER                               |   6 ++++++
 build.gradle                             |   7 +++++++
 gradle/wrapper/gradle-wrapper.jar        | Bin 54711 -> 54333 bytes
 gradle/wrapper/gradle-wrapper.properties |   3 +--
 gradlew                                  |   6 +++---
 src/main/python/nexusproto/setup.py      |   4 ++--
 6 files changed, 19 insertions(+), 7 deletions(-)

diff --git a/DISCLAIMER b/DISCLAIMER
new file mode 100644
index 0000000..f01ee7a
--- /dev/null
+++ b/DISCLAIMER
@@ -0,0 +1,6 @@
+Apache SDAP is an effort undergoing incubation at The Apache Software Foundation (ASF).
+Incubation is required of all newly accepted projects until a further review indicates
+that the infrastructure, communications, and decision making process have stabilized in
+a manner consistent with other successful ASF projects. While incubation status is not
+necessarily a reflection of the completeness or stability of the code, it does indicate
+that the project has yet to be fully endorsed by the ASF.
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
index 74dc927..be01e2c 100644
--- a/build.gradle
+++ b/build.gradle
@@ -24,6 +24,7 @@ plugins {
     id 'maven-publish'
     id 'project-report'
     id 'net.researchgate.release' version '2.6.0'
+    id "io.spring.dependency-management" version "1.0.4.RELEASE"
 }
 
 group = "org.apache.sdap"
@@ -41,6 +42,12 @@ ext {
     pythonBuildDirPath = "${file(buildDir.path + '/python/nexusproto').path}"
 }
 
+dependencyManagement {
+    imports {
+        mavenBom 'org.apache:apache:18'
+    }
+}
+
 protobuf {
 
     generatedFilesBaseDir = genDirectory
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
index 610d630..99340b4 100644
Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index b4965f4..2c2bbe5 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,5 @@
-#Thu Jan 18 14:53:09 PST 2018
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-3.5.1-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.4.1-bin.zip
diff --git a/gradlew b/gradlew
index 4453cce..cccdd3d 100755
--- a/gradlew
+++ b/gradlew
@@ -33,11 +33,11 @@ DEFAULT_JVM_OPTS=""
 # Use the maximum available, or set MAX_FD != -1 to use that value.
 MAX_FD="maximum"
 
-warn ( ) {
+warn () {
     echo "$*"
 }
 
-die ( ) {
+die () {
     echo
     echo "$*"
     echo
@@ -155,7 +155,7 @@ if $cygwin ; then
 fi
 
 # Escape application args
-save ( ) {
+save () {
     for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
     echo " "
 }
diff --git a/src/main/python/nexusproto/setup.py b/src/main/python/nexusproto/setup.py
index c4f0542..7a3250b 100644
--- a/src/main/python/nexusproto/setup.py
+++ b/src/main/python/nexusproto/setup.py
@@ -21,7 +21,7 @@ setup(
     version=__version__,
     url="https://github.com/apache/incubator-sdap-nexusproto",
 
-    author="Frank Greguska",
+    author="dev@sdap.apache.org",
 
     description="Protobufs used while ingesting NEXUS tiles.",
 
@@ -29,7 +29,7 @@ setup(
     platforms='any',
 
     install_requires=[
-        'protobuf'
+        'protobuf==3.2.0'
     ],
 
     classifiers=[


[incubator-sdap-nexusproto] 07/17: trying to fix build error

Posted by fg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

fgreg pushed a commit to branch SDAP-48
in repository https://gitbox.apache.org/repos/asf/incubator-sdap-nexusproto.git

commit 1ccc99dc7915c0c89901d29f45e0916bbed8e64e
Author: Frank Greguska <fr...@jpl.nasa.gov>
AuthorDate: Thu Jan 25 17:38:32 2018 -0800

    trying to fix build error
---
 build.gradle | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/build.gradle b/build.gradle
index 1e2ee5c..a3e260a 100644
--- a/build.gradle
+++ b/build.gradle
@@ -166,8 +166,9 @@ task pythonInstall(dependsOn: [checkPython, tarPython]){
             def process = installCommand.execute()
             process.waitFor()
             logger.debug("Standard out from executing \"${installCommand.join(" ")}\"\n" + process.in.readLines().collect{line -> "  $line"}.join("\n"))
-            if(process.err.text) {
-                logger.error("Standard err from executing \"${installCommand.join(" ")}\"\n" + process.err.readLines().collect { line -> "  $line"}.join("\n"))
+            def stderrOut = process.err.text
+            if(stderrOut) {
+                logger.error("Standard err from executing \"${installCommand.join(" ")}\"\n" + stderrOut.split("\n").collect { line -> "  $line"}.join("\n"))
             }
             installed = process.exitValue() == 0
         }catch (IOException e){


[incubator-sdap-nexusproto] 12/17: Merge pull request #3 from fgreg/SDAP-31

Posted by fg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

fgreg pushed a commit to branch SDAP-48
in repository https://gitbox.apache.org/repos/asf/incubator-sdap-nexusproto.git

commit cbcaa5460b97f4e3dd788c06c1477985339d74df
Merge: 20624df 490c65b
Author: fgreg <fg...@gmail.com>
AuthorDate: Mon Mar 12 11:12:33 2018 -0700

    Merge pull request #3 from fgreg/SDAP-31
    
    SDAP-31 TimeSeriesTile to accept ShapedArray for time

 src/main/proto/DataTile.proto | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


[incubator-sdap-nexusproto] 09/17: added contributing doc

Posted by fg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

fgreg pushed a commit to branch SDAP-48
in repository https://gitbox.apache.org/repos/asf/incubator-sdap-nexusproto.git

commit 6372b1b23a1e897705111d49233f93ce8e0de255
Author: Frank Greguska <fr...@jpl.nasa.gov>
AuthorDate: Mon Jan 29 16:32:13 2018 -0800

    added contributing doc
---
 CONTRIBUTING.md | 130 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 130 insertions(+)

diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 0000000..ae9eac8
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,130 @@
+Contributing to Apache SDAP 
+===========================
+
+Summary
+-------
+This document covers how to contribute to the SDAP project. SDAP uses github PRs to manage code contributions and project manages source code development through the [SDAP JIRA instance](https://issues.apache.org/jira/browse/SDAP). 
+These instructions assume you have a GitHub.com account, so if you don't have one you will have to create one. Your proposed code changes will be published to your own fork of the SDAP project and you will submit a Pull Request for your changes to be added.
+
+_Lets get started!!!_
+
+Bug fixes
+---------
+
+It's very important that we can easily track bug fix commits, so their hashes should remain the same in all branches. 
+Therefore, a pull request (PR) that fixes a bug, should be sent against a release branch. 
+This can be either the "current release" or the "previous release", depending on which ones are maintained. 
+Since the goal is a stable master, bug fixes should be "merged forward" to the next branch in order: "previous release" -> "current release" -> master (in other words: old to new)
+
+Developing new features
+-----------------------
+
+Development should be done in a feature branch, branched off of master. 
+Send a PR(steps below) to get it into master (2x LGTM applies). 
+PR will only be merged when master is open, will be held otherwise until master is open again. 
+No back porting / cherry-picking features to existing branches!
+
+Fork the code 
+-------------
+
+In your browser, navigate to: [https://github.com/apache?utf8=✓&q=incubator-sdap&type=&language=](https://github.com/apache?utf8=✓&q=incubator-sdap&type=&language=)
+
+Fork whichever repository you wish to contribute to by clicking on the 'Fork' button on the top right hand side. The fork will happen and you will be taken to your own fork of the repository.  Copy the Git repository URL by clicking on the clipboard next to the URL on the right hand side of the page under '**HTTPS** clone URL'.  You will paste this URL when doing the following `git clone` command.
+
+On your computer, follow these steps to setup a local repository for working on ACS:
+
+``` bash
+$ git clone https://github.com/YOUR_ACCOUNT/incubator-sdap-*.git
+$ cd incubator-sdap-*
+$ git remote add upstream https://github.com/apache/incubator-sdap-*.git
+$ git checkout master
+$ git fetch upstream
+$ git rebase upstream/master
+```
+N.B. make sure that you replace ```incubator-sdap-*``` with the actual project you wish to contribute to!!!
+
+Making changes
+--------------
+
+It is important that you create a new branch to make changes on and that you do not change the `master` branch (other than to rebase in changes from `upstream/master`).  In this example we will assume you will be making your changes to a branch called `SDAP-XXX`.  This `SDAP-XXX` is named after the issue you have created within the [SDAP JIRA instance](https://issues.apache.org/jira/browse/SDAP). Therefore `SDAP-XXX` will be created on your local repository and will be pushed to your for [...]
+
+It is best practice to create a new branch each time you want to contribute to the project and only track the changes for that pull request in this branch.
+
+``` bash
+$ git checkout -b SDAP-XXX
+   (make your changes)
+$ git status
+$ git add .
+$ git commit -a -m "SDAP-XXX Descriptive title of SDAP-XXX"
+```
+
+> The `-b` specifies that you want to create a new branch called `SDAP-XXX`.  You only specify `-b` the first time you checkout because you are creating a new branch.  Once the `SDAP-XXX` branch exists, you can later switch to it with only `git checkout SDAP-XXX`.
+> Note that the commit message comprises the JIRA issue number and title... this makes explicit reference between Github and JIRA for improved project management.
+
+
+Rebase `SDAP-XXX` to include updates from `upstream/master`
+------------------------------------------------------------
+
+It is important that you maintain an up-to-date `master` branch in your local repository.  This is done by rebasing in the code changes from `upstream/master` (the official SDAP project repository) into your local repository.  You will want to do this before you start working on a feature as well as right before you submit your changes as a pull request.  We recommend you do this process periodically while you work to make sure you are working off the most recent project code.
+
+This process will do the following:
+
+1. Checkout your local `master` branch
+2. Synchronize your local `master` branch with the `upstream/master` so you have all the latest changes from the project
+3. Rebase the latest project code into your `SDAP-XXX` branch so it is up-to-date with the upstream code
+
+``` bash
+$ git checkout master
+$ git fetch upstream
+$ git rebase upstream/master
+$ git checkout SDAP-XXX
+$ git rebase master
+```
+
+> Now your `SDAP-XXX` branch is up-to-date with all the code in `upstream/master`.
+
+
+Make a GitHub Pull Request to contribute your changes
+-----------------------------------------------------
+
+When you are happy with your changes and you are ready to contribute them, you will create a Pull Request on GitHub to do so. This is done by pushing your local changes to your forked repository (default remote name is `origin`) and then initiating a pull request on GitHub.
+
+Please include JIRA id, detailed information about the bug/feature, what all tests are executed, how the reviewer can test this feature etc. Incase of UI PRs, a screenshot is preferred.
+
+> **IMPORTANT:** Make sure you have rebased your `SDAP-XXX` branch to include the latest code from `upstream/master` _before_ you do this.
+
+``` bash
+$ git push origin master
+$ git push origin SDAP-XXX
+```
+
+Now that the `SDAP-XXX` branch has been pushed to your GitHub repository, you can initiate the pull request.  
+
+To initiate the pull request, do the following:
+
+1. In your browser, navigate to your forked repository: [https://github.com/YOUR_ACCOUNT?utf8=✓&q=incubator-sdap&type=&language=](https://github.com/YOUR_ACCOUNT?utf8=✓&q=incubator-sdap&type=&language=), make sure you actually navigate to the specific project you wish to make the PR from.
+2. Click the new button called '**Compare & pull request**' that showed up just above the main area in your forked repository
+3. Validate the pull request will be into the upstream `master` and will be from your `SDAP-XXX` branch
+4. Enter a detailed description of the work you have done and then click '**Send pull request**'
+
+If you are requested to make modifications to your proposed changes, make the changes locally on your `SDAP-XXX` branch, re-push the `SDAP-XXX` branch to your fork.  The existing pull request should automatically pick up the change and update accordingly.
+
+
+Cleaning up after a successful pull request
+-------------------------------------------
+
+Once the `SDAP-XXX` branch has been committed into the `upstream/master` branch, your local `SDAP-XXX` branch and the `origin/SDAP-XXX` branch are no longer needed.  If you want to make additional changes, restart the process with a new branch.
+
+> **IMPORTANT:** Make sure that your changes are in `upstream/master` before you delete your `SDAP-XXX` and `origin/SDAP-XXX` branches!
+
+You can delete these deprecated branches with the following:
+
+``` bash
+$ git checkout master
+$ git branch -D SDAP-XXX
+$ git push origin :SDAP-XXX
+```
+
+Release Principles
+------------------
+Coming soon
\ No newline at end of file


[incubator-sdap-nexusproto] 17/17: fixed project name and made sure python version stays in sync with the gradle project version.

Posted by fg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

fgreg pushed a commit to branch SDAP-48
in repository https://gitbox.apache.org/repos/asf/incubator-sdap-nexusproto.git

commit 8bb2877e15e90d349d52b6e751d6fbee79a44f44
Author: Frank Greguska <fr...@jpl.nasa.gov>
AuthorDate: Fri Mar 23 14:58:05 2018 -0700

    fixed project name and made sure python version stays in sync with the gradle project version.
---
 nexusproto.iml | 1 -
 1 file changed, 1 deletion(-)

diff --git a/nexusproto.iml b/nexusproto.iml
index ce6f5e7..a720747 100644
--- a/nexusproto.iml
+++ b/nexusproto.iml
@@ -9,6 +9,5 @@
     </content>
     <orderEntry type="inheritedJdk" />
     <orderEntry type="sourceFolder" forTests="false" />
-    <orderEntry type="library" name="groovy-2.4.5" level="application" />
   </component>
 </module>
\ No newline at end of file


[incubator-sdap-nexusproto] 08/17: version should be 1.0.0-SNAPSHOT

Posted by fg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

fgreg pushed a commit to branch SDAP-48
in repository https://gitbox.apache.org/repos/asf/incubator-sdap-nexusproto.git

commit 7d13b6fa7c61f7bdaeca013ed4fe9d2106446a61
Author: Frank Greguska <fr...@jpl.nasa.gov>
AuthorDate: Sun Jan 28 12:28:07 2018 -0800

    version should be 1.0.0-SNAPSHOT
---
 .idea/modules/nexusproto_main.iml | 2 +-
 .idea/modules/nexusproto_test.iml | 2 +-
 gradle.properties                 | 2 +-
 nexusproto.iml                    | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/.idea/modules/nexusproto_main.iml b/.idea/modules/nexusproto_main.iml
index 12775aa..ff49722 100644
--- a/.idea/modules/nexusproto_main.iml
+++ b/.idea/modules/nexusproto_main.iml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<module external.linked.project.id="nexusproto:main" external.linked.project.path="$MODULE_DIR$/../.." external.root.project.path="$MODULE_DIR$/../.." external.system.id="GRADLE" external.system.module.group="org.apache.sdap" external.system.module.type="sourceSet" external.system.module.version="1.0.1-SNAPSHOT" type="JAVA_MODULE" version="4">
+<module external.linked.project.id="nexusproto:main" external.linked.project.path="$MODULE_DIR$/../.." external.root.project.path="$MODULE_DIR$/../.." external.system.id="GRADLE" external.system.module.group="org.apache.sdap" external.system.module.type="sourceSet" external.system.module.version="1.0.0-SNAPSHOT" type="JAVA_MODULE" version="4">
   <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
     <output url="file://$MODULE_DIR$/../../out/production/classes" />
     <exclude-output />
diff --git a/.idea/modules/nexusproto_test.iml b/.idea/modules/nexusproto_test.iml
index a6b7517..e52c1f3 100644
--- a/.idea/modules/nexusproto_test.iml
+++ b/.idea/modules/nexusproto_test.iml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<module external.linked.project.id="nexusproto:test" external.linked.project.path="$MODULE_DIR$/../.." external.root.project.path="$MODULE_DIR$/../.." external.system.id="GRADLE" external.system.module.group="org.apache.sdap" external.system.module.type="sourceSet" external.system.module.version="1.0.1-SNAPSHOT" type="JAVA_MODULE" version="4">
+<module external.linked.project.id="nexusproto:test" external.linked.project.path="$MODULE_DIR$/../.." external.root.project.path="$MODULE_DIR$/../.." external.system.id="GRADLE" external.system.module.group="org.apache.sdap" external.system.module.type="sourceSet" external.system.module.version="1.0.0-SNAPSHOT" type="JAVA_MODULE" version="4">
   <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
     <output-test url="file://$MODULE_DIR$/../../out/test/classes" />
     <exclude-output />
diff --git a/gradle.properties b/gradle.properties
index ef01621..2cbfe84 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,4 +1,4 @@
-version=1.0.1-SNAPSHOT
+version=1.0.0-SNAPSHOT
 
 group=org.apache.sdap
 sourceCompatibility=1.8
\ No newline at end of file
diff --git a/nexusproto.iml b/nexusproto.iml
index 1b52373..0053540 100644
--- a/nexusproto.iml
+++ b/nexusproto.iml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<module external.linked.project.id="nexusproto" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="org.apache.sdap" external.system.module.version="1.0.1-SNAPSHOT" type="JAVA_MODULE" version="4">
+<module external.linked.project.id="nexusproto" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="org.apache.sdap" external.system.module.version="1.0.0-SNAPSHOT" type="JAVA_MODULE" version="4">
   <component name="NewModuleRootManager" inherit-compiler-output="true">
     <exclude-output />
     <content url="file://$MODULE_DIR$">


[incubator-sdap-nexusproto] 14/17: trying out this pipeline stuff

Posted by fg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

fgreg pushed a commit to branch SDAP-48
in repository https://gitbox.apache.org/repos/asf/incubator-sdap-nexusproto.git

commit 55c48edd5316decbd808ef15d93178cf6d6ec0d4
Author: Frank Greguska <fr...@jpl.nasa.gov>
AuthorDate: Thu Mar 22 15:08:00 2018 -0700

    trying out this pipeline stuff
---
 Jenkinsfile          |  24 ++++++
 nexusproto.iml       |   1 +
 pipeline-syntax.gdsl | 217 +++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 242 insertions(+)

diff --git a/Jenkinsfile b/Jenkinsfile
new file mode 100644
index 0000000..8b0b210
--- /dev/null
+++ b/Jenkinsfile
@@ -0,0 +1,24 @@
+#!groovy
+
+
+pipeline{
+    agent {
+        label 'trusty'
+    }
+    stages{
+        stage("Build"){
+            parallel {
+                stage("Build Java"){
+                    steps{
+                        git branch: "${env.BRANCH_NAME}", credentialsId: 'fgreg-github', url: 'https://github.com/apache/incubator-sdap-nexusproto'
+                    }
+                }
+                stage("Build Python"){
+                    steps{
+                        git branch: "${env.BRANCH_NAME}", credentialsId: 'fgreg-github', url: 'https://github.com/apache/incubator-sdap-nexusproto'
+                    }
+                }
+            }
+        }
+    }
+}
\ No newline at end of file
diff --git a/nexusproto.iml b/nexusproto.iml
index a720747..ce6f5e7 100644
--- a/nexusproto.iml
+++ b/nexusproto.iml
@@ -9,5 +9,6 @@
     </content>
     <orderEntry type="inheritedJdk" />
     <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="library" name="groovy-2.4.5" level="application" />
   </component>
 </module>
\ No newline at end of file
diff --git a/pipeline-syntax.gdsl b/pipeline-syntax.gdsl
new file mode 100644
index 0000000..73e22af
--- /dev/null
+++ b/pipeline-syntax.gdsl
@@ -0,0 +1,217 @@
+//The global script scope
+def ctx = context(scope: scriptScope())
+
+//What things can be on the script scope
+contributor(ctx) {
+    method(name: 'pipeline', type: 'Object', params: [body: Closure])
+    property(name: 'params', type: 'org.jenkinsci.plugins.workflow.cps.ParamsVariable')
+    property(name: 'env', type: 'org.jenkinsci.plugins.workflow.cps.EnvActionImpl.Binder')
+    property(name: 'currentBuild', type: 'org.jenkinsci.plugins.workflow.cps.RunWrapperBinder')
+    property(name: 'scm', type: 'org.jenkinsci.plugins.workflow.multibranch.SCMVar')
+}
+
+// Define default env vars
+def envVars = context(ctype: 'org.jenkinsci.plugins.workflow.cps.EnvActionImpl.Binder')
+
+contributor(envVars) {
+    property(name: 'BRANCH_NAME', type: 'String', doc: 'For a multibranch project, this will be set to the name of the branch being built, for example in case you wish to deploy to production from master but not from feature branches; if corresponding to some kind of change request, the name is generally arbitrary (refer to CHANGE_ID and CHANGE_TARGET).')
+    property(name: 'CHANGE_ID', type: 'String', doc: 'For a multibranch project corresponding to some kind of change request, this will be set to the change ID, such as a pull request number, if supported; else unset.')
+    property(name: 'CHANGE_URL', type: 'Strig', doc: 'For a multibranch project corresponding to some kind of change request, this will be set to the change URL, if supported; else unset.')
+    property(name: 'CHANGE_TITLE', type: 'String', doc: 'For a multibranch project corresponding to some kind of change request, this will be set to the title of the change, if supported; else unset.')
+    property(name: 'CHANGE_AUTHOR', type: 'String', doc: 'For a multibranch project corresponding to some kind of change request, this will be set to the username of the author of the proposed change, if supported; else unset.')
+    property(name: 'CHANGE_AUTHOR_DISPLAY_NAME', type: 'String', doc: 'For a multibranch project corresponding to some kind of change request, this will be set to the human name of the author, if supported; else unset.')
+    property(name: 'CHANGE_AUTHOR_EMAIL', type: 'String', doc: 'For a multibranch project corresponding to some kind of change request, this will be set to the email address of the author, if supported; else unset.')
+    property(name: 'CHANGE_TARGET', type: 'String', doc: 'rFo a multibranch project corresponding to some kind of change request, this will be set to the target or base branch to which the change could be merged, if supported; else unset.')
+    property(name: 'BUILD_NUMBER', type: 'String', doc: 'The current build number, such as "153"')
+    property(name: 'BUILD_ID', type: 'String', doc: 'The current build ID, identical to BUILD_NUMBER for builds created in 1.597+, but a YYYY-MM-DD_hh-mm-ss timestamp for older builds')
+    property(name: 'BUILD_DISPLAY_NAME', type: 'String', doc: 'The display name of the current build, which is something like "#153" by default.')
+    property(name: 'JOB_NAME', type: 'String', doc: 'Name of the project of this build, such as "foo" or "foo/bar".')
+    property(name: 'JOB_BASE_NAME', type: 'String', doc: 'Short Name of the project of this build stripping off folder paths, such as "foo" for "bar/foo".')
+    property(name: 'BUILD_TAG', type: 'String', doc: 'String of "jenkins-${JOB_NAME}-${BUILD_NUMBER}". All forward slashes (/) in the JOB_NAME are replaced with dashes (-). Convenient to put into a resource file, a jar file, etc for easier identification.')
+    property(name: 'EXECUTOR_NUMBER', type: 'String', doc: 'The unique number that identifies the current executor (among executors of the same machine) that’s carrying out this build. This is the number you see in the "build executor status", except that the number starts from 0, not 1.')
+    property(name: 'NODE_NAME', type: 'String', doc: 'Name of the agent if the build is on an agent, or "master" if run on master')
+    property(name: 'NODE_LABELS', type: 'String', doc: 'Whitespace-separated list of labels that the node is assigned.')
+    property(name: 'WORKSPACE', type: 'String', doc: 'The absolute path of the directory assigned to the build as a workspace.')
+    property(name: 'JENKINS_HOME', type: 'String', doc: 'The absolute path of the directory assigned on the master node for Jenkins to store data.')
+    property(name: 'JENKINS_URL', type: 'String', doc: 'Full URL of Jenkins, like http://server:port/jenkins/ (note: only available if Jenkins URL set in system configuration)')
+    property(name: 'BUILD_URL', type: 'String', doc: 'Full URL of this build, like http://server:port/jenkins/job/foo/15/ (Jenkins URL must be set)')
+    property(name: 'JOB_URL', type: 'String', doc: 'Full URL of this job, like http://server:port/jenkins/job/foo/ (Jenkins URL must be set)')
+}
+
+// Definew all the properties in current builds
+def currentBuild = context(ctype: 'org.jenkinsci.plugins.workflow.cps.RunWrapperBinder')
+
+contributor(currentBuild) {
+    property(name: 'number', type: 'Integer', doc: 'build number')
+    property(name: 'result', type: 'String', doc: 'typically SUCCESS, UNSTABLE, or FAILURE (may be null for an ongoing build)')
+    property(name: 'currentResult', type: 'String', doc: 'typically SUCCESS, UNSTABLE, or FAILURE (never null)')
+    method(name: 'resultIsBetterOrEqualTo', type: 'Boolean', params: [buildStatus: 'String'], doc: 'Compares the current build result to the provided result string (SUCCESS, UNSTABLE, or FAILURE) and returns true if the current build result is better than or equal to the provided result.')
+    method(name: 'resultIsWorseOrEqualTo', type: 'Boolean', params: [buildStatus: 'String'], doc: 'Compares the current build result to the provided result string (SUCCESS, UNSTABLE, or FAILURE) and returns true if the current build result is worse than or equal to the provided result.')
+    property(name: 'displayName', type: 'String', doc: 'normally #123 but sometimes set to, e.g., an SCM commit identifier')
+    property(name: 'description', type: 'String', doc: 'additional information about the build')
+    property(name: 'id', type: 'String', doc: 'normally number as a string')
+    property(name: 'timeInMillis', type: 'long', doc: 'time since the epoch when the build was scheduled')
+    property(name: 'startTimeInMillis', type: 'long', doc: 'time since the epoch when the build started running')
+    property(name: 'duration', type: 'long', doc: 'duration of the build in milliseconds')
+    property(name: 'durationString', type: 'String', doc: 'a human-readable representation of the build duration')
+    property(name: 'previousBuild', type: 'org.jenkinsci.plugins.workflow.cps.RunWrapperBinder', doc: 'another similar object, or null')
+    property(name: 'nextBuild', type: 'org.jenkinsci.plugins.workflow.cps.RunWrapperBinder', doc: 'another similar object, or null')
+    property(name: 'absoluteUrl', type: 'String', doc: 'URL of build index page')
+    property(name: 'buildVariables', type: 'Map', doc: 'for a non-Pipeline downstream build, offers access to a map of defined build variables; for a Pipeline downstream build, any variables set globally on env')
+    property(name: 'changeSets', type: 'String', doc: 'a list of changesets coming from distinct SCM checkouts; each has a kind and is a list of commits; each commit has a commitId, timestamp, msg, author, and affectedFiles each of which has an editType and path; the value will not generally be Serializable so you may only access it inside a method marked @NonCPS')
+    property(name: 'rawBuild', type: 'String', doc: 'a hudson.model.Run with further APIs, only for trusted libraries or administrator-approved scripts outside the sandbox; the value will not be Serializable so you may only access it inside a method marked @NonCPS')
+}
+
+def closures = context(scope: closureScope())
+
+contributor(closures) {
+    // What things can be inside a pipeline
+    if (enclosingCall("pipeline")) {
+        method(name: 'echo', type: 'Object', params: [message: 'java.lang.String'], doc: 'Print Message')
+        method(name: 'stages', type: 'Object', params: [body: 'Closure'], doc: 'Stages')
+        method(name: 'agent', type: 'Object', params: [body: 'Closure'], doc: 'Label expression to select agents')
+        method(name: 'parameters', type: 'Object', params: [body: 'Closure'], doc: 'Job parameters')
+        method(name: 'options', type: 'Object', params: [body: 'Closure'])
+        method(name: 'triggers', type: 'Object', params: [body: 'Closure'], doc: 'Build triggers')
+        method(name: 'post', type: 'Object', params: [body: 'Closure'], doc: 'Post build actions')
+        method(name: 'jiraComment', type: 'Object', namedParams: [parameter(name: 'issueKey', type: 'java.lang.String'), parameter(name: 'body', type: 'java.lang.String'),], doc: 'JIRA: Add a comment to issue(s)')
+        method(name: 'jiraIssueSelector', type: 'Object', params: [:], doc: 'JIRA: Issue selector')
+        method(name: 'jiraIssueSelector', type: 'Object', namedParams: [parameter(name: 'issueSelector', type: 'Map'),], doc: 'JIRA: Issue selector')
+        method(name: 'jiraSearch', type: 'Object', params: [jql: 'java.lang.String'], doc: 'JIRA: Search issues')
+
+        //I  don't know the fate of these one
+        method(name: 'build', type: 'Object', params: [job: 'java.lang.String'], doc: 'Build a job')
+        method(name: 'build', type: 'Object', namedParams: [parameter(name: 'job', type: 'java.lang.String'), parameter(name: 'parameters', type: 'Map'), parameter(name: 'propagate', type: 'boolean'), parameter(name: 'quietPeriod', type: 'java.lang.Integer'), parameter(name: 'wait', type: 'boolean'),], doc: 'Build a job')
+        method(name: 'ec2', type: 'Object', namedParams: [parameter(name: 'cloud', type: 'java.lang.String'), parameter(name: 'template', type: 'java.lang.String'),], doc: 'Cloud template provisioning')
+        method(name: 'error', type: 'Object', params: [message: 'java.lang.String'], doc: 'Error signal')
+        method(name: 'input', type: 'Object', params: [message: 'java.lang.String'], doc: 'Wait for interactive input')
+        method(name: 'input', type: 'Object', namedParams: [parameter(name: 'message', type: 'java.lang.String'), parameter(name: 'id', type: 'java.lang.String'), parameter(name: 'ok', type: 'java.lang.String'), parameter(name: 'parameters', type: 'Map'), parameter(name: 'submitter', type: 'java.lang.String'), parameter(name: 'submitterParameter', type: 'java.lang.String'),], doc: 'Wait for interactive input')
+        method(name: 'isUnix', type: 'Object', params: [:], doc: 'Checks if running on a Unix-like node')
+        method(name: 'library', type: 'Object', params: [identifier: 'java.lang.String'], doc: 'Load a shared library on the fly')
+        method(name: 'library', type: 'Object', namedParams: [parameter(name: 'identifier', type: 'java.lang.String'), parameter(name: 'changelog', type: 'java.lang.Boolean'), parameter(name: 'retriever', type: 'Map'),], doc: 'Load a shared library on the fly')
+        method(name: 'libraryResource', type: 'Object', params: [resource: 'java.lang.String'], doc: 'Load a resource file from a shared library')
+        method(name: 'mail', type: 'Object', namedParams: [parameter(name: 'subject', type: 'java.lang.String'), parameter(name: 'body', type: 'java.lang.String'), parameter(name: 'bcc', type: 'java.lang.String'), parameter(name: 'cc', type: 'java.lang.String'), parameter(name: 'charset', type: 'java.lang.String'), parameter(name: 'from', type: 'java.lang.String'), parameter(name: 'mimeType', type: 'java.lang.String'), parameter(name: 'replyTo', type: 'java.lang.String'), parameter(name: [...]
+        method(name: 'milestone', type: 'Object', params: [ordinal: 'java.lang.Integer'], doc: 'The milestone step forces all builds to go through in order')
+        method(name: 'milestone', type: 'Object', namedParams: [parameter(name: 'ordinal', type: 'java.lang.Integer'), parameter(name: 'label', type: 'java.lang.String'),], doc: 'The milestone step forces all builds to go through in order')
+        method(name: 'node', type: 'Object', params: [body: 'Closure'], doc: 'Allocate node')
+        method(name: 'node', type: 'Object', params: [label: 'String', body: 'Closure'], doc: 'Allocate node')
+        method(name: 'properties', type: 'Object', params: [properties: 'Map'], doc: 'Set job properties')
+        method(name: 'readTrusted', type: 'Object', params: [path: 'java.lang.String'], doc: 'Read trusted file from SCM')
+        method(name: 'resolveScm', type: 'Object', namedParams: [parameter(name: 'source', type: 'Map'), parameter(name: 'targets', type: 'Map'), parameter(name: 'ignoreErrors', type: 'boolean'),], doc: 'Resolves an SCM from an SCM Source and a list of candidate target branch names')
+        method(name: 'retry', type: 'Object', params: [count: int, body: 'Closure'], doc: 'Retry the body up to N times')
+        method(name: 'script', type: 'Object', params: [body: 'Closure'], doc: 'Run arbitrary Pipeline script')
+        method(name: 'sleep', type: 'Object', params: [time: 'int'], doc: 'Sleep')
+        method(name: 'sleep', type: 'Object', namedParams: [parameter(name: 'time', type: 'int'), parameter(name: 'unit', type: 'java.util.concurrent.TimeUnit'),], doc: 'Sleep')
+        method(name: 'timeout', type: 'Object', params: [time: int, body: 'Closure'], doc: 'Enforce time limit')
+        method(name: 'timeout', type: 'Object', params: [body: Closure], namedParams: [parameter(name: 'time', type: 'int'), parameter(name: 'unit', type: 'java.util.concurrent.TimeUnit'),], doc: 'Enforce time limit')
+        method(name: 'tool', type: 'Object', params: [name: 'java.lang.String'], doc: 'Use a tool from a predefined Tool Installation')
+        method(name: 'tool', type: 'Object', namedParams: [parameter(name: 'name', type: 'java.lang.String'), parameter(name: 'type', type: 'java.lang.String'),], doc: 'Use a tool from a predefined Tool Installation')
+        method(name: 'waitUntil', type: 'Object', params: [body: 'Closure'], doc: 'Wait for condition')
+        method(name: 'withCredentials', type: 'Object', params: [bindings: Map, body: 'Closure'], doc: 'Bind credentials to variables')
+        method(name: 'withEnv', type: 'Object', params: [overrides: Map, body: 'Closure'], doc: 'Set environment variables')
+        method(name: 'ws', type: 'Object', params: [dir: 'String', body: 'Closure'], doc: 'Allocate workspace')
+        method(name: 'catchError', type: 'Object', params: [body: 'Closure'], doc: 'Advanced/Deprecated Catch error and set build result')
+        method(name: 'dockerFingerprintRun', type: 'Object', params: [containerId: 'java.lang.String'], doc: 'Advanced/Deprecated Record trace of a Docker image run in a container')
+        method(name: 'dockerFingerprintRun', type: 'Object', namedParams: [parameter(name: 'containerId', type: 'java.lang.String'), parameter(name: 'toolName', type: 'java.lang.String'),], doc: 'Record trace of a Docker image run in a container')
+        method(name: 'envVarsForTool', type: 'Object', namedParams: [parameter(name: 'toolId', type: 'java.lang.String'), parameter(name: 'toolVersion', type: 'java.lang.String'),], doc: 'Fetches the environment variables for a given tool in a list of \'FOO=bar\' strings suitable for the withEnv step.')
+        method(name: 'getContext', type: 'Object', params: [type: 'Map'], doc: 'Advanced/Deprecated Get contextual object from internal APIs')
+        method(name: 'withContext', type: 'Object', params: [context: 'Object', body: 'Closure'], doc: 'Advanced/Deprecated Use contextual object from internal APIs within a block')
+
+    }
+
+    //The only thing inside agent can be label
+    if (enclosingCall("agent")) {
+        property(name: 'any')
+        property(name: 'none')
+        method(name: 'label', type: 'String', params: [expr: 'String'])
+        method(name: 'docker', type: 'String', params: [docker_image: 'String'])
+        method(name: 'dockerfile', type: 'boolean', params: [use_dockerfile: 'boolean'])
+    }
+
+    if (enclosingCall("triggers")) {
+        method(name: 'cron', type: 'String', params: [expr: 'String'], doc: 'Cron expression can be one of @daily, @hourly, etc')
+        method(name: 'upstream', type: 'Object', params: [name: 'String', build_status: 'Object'])
+        method(name: 'pollSCM', type: 'String', params: [expr: 'String'])
+        method(name: 'bitbucketPush')
+    }
+
+    // Parameters can only contain
+    if (enclosingCall("parameters")) {
+        method(name: 'string', type: 'Object', namedParams: [parameter(name: 'name', type: 'java.lang.String'), parameter(name: 'defaultValue', type: 'java.lang.String'), parameter(name: 'description', type: 'java.lang.String')])
+        method(name: 'booleanParam', type: 'Object', namedParams: [parameter(name: 'name', type: 'java.lang.String'), parameter(name: 'defaultValue', type: 'java.lang.Boolean'), parameter(name: 'description', type: 'java.lang.String')])
+        method(name: 'choice', type: 'Object', namedParams: [parameter(name: 'choice', type: 'java.lang.String'), parameter(name: 'defaultValue', type: 'java.lang.Boolean'), parameter(name: 'description', type: 'java.lang.String')])
+    }
+
+    // Find the options!
+    if (enclosingCall("options")) {
+        method(name: 'buildDiscarder')
+        method(name: 'timestamps')
+        method(name: 'timeout', type: 'Object', namedParams: [parameter(name: 'time', type: 'java.lang.Integer'), parameter(name: 'unit', type: 'java.lang.String')])
+    }
+
+    // Inside stages can be, stage or stage('Name')
+    if (enclosingCall("stages")) {
+        method(name: 'stage', type: 'Object', params: [name: 'String', body: 'Closure'], doc: 'Stage')
+        method(name: 'stage', type: 'Object', params: [body: Closure], namedParams: [parameter(name: 'name', type: 'java.lang.String'), parameter(name: 'concurrency', type: 'java.lang.Integer'),], doc: 'Stage')
+    }
+
+    // Inside steps only steps
+    if (enclosingCall("stage")) {
+        method(name: 'agent', type: 'Object', params: [body: 'Closure'], doc: 'Label expression to select agents')
+        method(name: 'steps', type: 'Object', params: [body: 'Closure'], doc: 'Steps to execute on stage')
+        method(name: 'post', type: 'Object', params: [body: 'Closure'], doc: 'Post actions can be executed on a per-stage basis as well')
+    }
+
+    // Only inside steps
+    if (enclosingCall("steps") || enclosingCall("always") || enclosingCall("success") ||
+            enclosingCall("failure") || enclosingCall("unstable") || enclosingCall("changed")) {
+        method(name: 'timestamp', type: 'Object', params: [body: 'Closure'], doc: 'Timestamps')
+        method(name: 'bat', type: 'Object', params: [script: 'java.lang.String'], doc: 'Windows Batch Script')
+        method(name: 'bat', type: 'Object', namedParams: [parameter(name: 'script', type: 'java.lang.String'), parameter(name: 'encoding', type: 'java.lang.String'), parameter(name: 'returnStatus', type: 'boolean'), parameter(name: 'returnStdout', type: 'boolean'),], doc: 'Windows Batch Script')
+        method(name: 'checkout', type: 'Object', params: [scm: 'Map'], doc: 'General SCM')
+        method(name: 'checkout', type: 'Object', namedParams: [parameter(name: 'scm', type: 'Map'), parameter(name: 'changelog', type: 'boolean'), parameter(name: 'poll', type: 'boolean'),], doc: 'General SCM')
+        method(name: 'deleteDir', type: 'Object', params: [:], doc: 'Recursively delete the current directory from the workspace')
+        method(name: 'dir', type: 'Object', params: [path: 'String', body: 'Closure'], doc: 'Change current directory')
+        method(name: 'fileExists', type: 'Object', params: [file: 'java.lang.String'], doc: 'Verify if file exists in workspace')
+        method(name: 'git', type: 'Object', params: [url: 'java.lang.String'], doc: 'Git')
+        method(name: 'git', type: 'Object', namedParams: [parameter(name: 'url', type: 'java.lang.String'), parameter(name: 'branch', type: 'java.lang.String'), parameter(name: 'changelog', type: 'boolean'), parameter(name: 'credentialsId', type: 'java.lang.String'), parameter(name: 'poll', type: 'boolean'),], doc: 'Git')
+        method(name: 'junit', type: 'Object', params: [testResults: 'java.lang.String'], doc: 'Archive JUnit-formatted test results')
+        method(name: 'junit', type: 'Object', namedParams: [parameter(name: 'testResults', type: 'java.lang.String'), parameter(name: 'allowEmptyResults', type: 'boolean'), parameter(name: 'healthScaleFactor', type: 'double'), parameter(name: 'keepLongStdio', type: 'boolean'), parameter(name: 'testDataPublishers', type: 'Map'),], doc: 'Archive JUnit-formatted test results')
+        method(name: 'load', type: 'Object', params: [path: 'java.lang.String'], doc: 'Evaluate a Groovy source file into the Pipeline script')
+        method(name: 'powershell', type: 'Object', params: [script: 'java.lang.String'], doc: 'PowerShell Script')
+        method(name: 'powershell', type: 'Object', namedParams: [parameter(name: 'script', type: 'java.lang.String'), parameter(name: 'encoding', type: 'java.lang.String'), parameter(name: 'returnStatus', type: 'boolean'), parameter(name: 'returnStdout', type: 'boolean'),], doc: 'PowerShell Script')
+        method(name: 'publishHTML', type: 'Object', params: [target: 'Map'], doc: 'Publish HTML reports')
+        method(name: 'pwd', type: 'Object', params: [:], doc: 'Determine current directory')
+        method(name: 'pwd', type: 'Object', namedParams: [parameter(name: 'tmp', type: 'boolean'),], doc: 'Determine current directory')
+        method(name: 'readFile', type: 'Object', params: [file: 'java.lang.String'], doc: 'Read file from workspace')
+        method(name: 'readFile', type: 'Object', namedParams: [parameter(name: 'file', type: 'java.lang.String'), parameter(name: 'encoding', type: 'java.lang.String'),], doc: 'Read file from workspace')
+        method(name: 'sh', type: 'Object', params: [script: 'java.lang.String'], doc: 'Shell Script')
+        method(name: 'sh', type: 'Object', namedParams: [parameter(name: 'script', type: 'java.lang.String'), parameter(name: 'encoding', type: 'java.lang.String'), parameter(name: 'returnStatus', type: 'boolean'), parameter(name: 'returnStdout', type: 'boolean'),], doc: 'Shell Script')
+        method(name: 'stash', type: 'Object', params: [name: 'java.lang.String'], doc: 'Stash some files to be used later in the build')
+        method(name: 'stash', type: 'Object', namedParams: [parameter(name: 'name', type: 'java.lang.String'), parameter(name: 'allowEmpty', type: 'boolean'), parameter(name: 'excludes', type: 'java.lang.String'), parameter(name: 'includes', type: 'java.lang.String'), parameter(name: 'useDefaultExcludes', type: 'boolean'),], doc: 'Stash some files to be used later in the build')
+        method(name: 'tm', type: 'Object', params: [stringWithMacro: 'java.lang.String'], doc: 'Expand a string containing macros')
+        method(name: 'unstash', type: 'Object', params: [name: 'java.lang.String'], doc: 'Restore files previously stashed')
+        method(name: 'validateDeclarativePipeline', type: 'Object', params: [path: 'java.lang.String'], doc: 'Validate a file containing a Declarative Pipeline')
+        method(name: 'wrap', type: 'Object', params: [delegate: Map, body: 'Closure'], doc: 'General Build Wrapper')
+        method(name: 'writeFile', type: 'Object', namedParams: [parameter(name: 'file', type: 'java.lang.String'), parameter(name: 'text', type: 'java.lang.String'), parameter(name: 'encoding', type: 'java.lang.String'),], doc: 'Write file to workspace')
+        method(name: 'archive', type: 'Object', params: [includes: 'java.lang.String'], doc: 'Advanced/Deprecated Archive artifacts')
+        method(name: 'archive', type: 'Object', namedParams: [parameter(name: 'includes', type: 'java.lang.String'), parameter(name: 'excludes', type: 'java.lang.String'),], doc: 'Archive artifacts')
+        method(name: 'dockerFingerprintFrom', type: 'Object', namedParams: [parameter(name: 'dockerfile', type: 'java.lang.String'), parameter(name: 'image', type: 'java.lang.String'), parameter(name: 'buildArgs', type: 'Map'), parameter(name: 'toolName', type: 'java.lang.String'),], doc: 'Record trace of a Docker image used in FROM')
+        method(name: 'unarchive', type: 'Object', params: [:], doc: 'Advanced/Deprecated Copy archived artifacts into the workspace')
+        method(name: 'unarchive', type: 'Object', namedParams: [parameter(name: 'mapping', type: 'Map'),], doc: 'Copy archived artifacts into the workspace')
+        method(name: 'withDockerContainer', type: 'Object', params: [image: 'String', body: 'Closure'], doc: 'Advanced/Deprecated Run build steps inside a Docker container')
+        method(name: 'withDockerContainer', type: 'Object', params: [body: Closure], namedParams: [parameter(name: 'image', type: 'java.lang.String'), parameter(name: 'args', type: 'java.lang.String'), parameter(name: 'toolName', type: 'java.lang.String'),], doc: 'Run build steps inside a Docker container')
+        method(name: 'withDockerRegistry', type: 'Object', params: [registry: Map, body: 'Closure'], doc: 'Advanced/Deprecated Sets up Docker registry endpoint')
+        method(name: 'withDockerServer', type: 'Object', params: [server: Map, body: 'Closure'], doc: 'Advanced/Deprecated Sets up Docker server endpoint')
+        method(name: 'parallel', type: 'Object', params: [body: 'Map'], doc: 'Run taask in parallel')
+    }
+
+    // Post actions!
+    if (enclosingCall("post")) {
+        method(name: 'always', type: 'Object', params: [body: 'Closure'])
+        method(name: 'success', type: 'Object', params: [body: 'Closure'])
+        method(name: 'failure', type: 'Object', params: [body: 'Closure'])
+        method(name: 'unstable', type: 'Object', params: [body: 'Closure'])
+        method(name: 'changed', type: 'Object', params: [body: 'Closure'])
+    }
+}
\ No newline at end of file


[incubator-sdap-nexusproto] 03/17: fixed build

Posted by fg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

fgreg pushed a commit to branch SDAP-48
in repository https://gitbox.apache.org/repos/asf/incubator-sdap-nexusproto.git

commit 1feff2e829a4ab927767dd75805978b6eff54a10
Author: Frank Greguska <fr...@jpl.nasa.gov>
AuthorDate: Mon Jan 22 15:35:11 2018 -0800

    fixed build
---
 .idea/modules/nexusproto_main.iml | 2 +-
 .idea/modules/nexusproto_test.iml | 2 +-
 build.gradle                      | 5 +++++
 gradle.properties                 | 3 ---
 nexusproto.iml                    | 2 +-
 5 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/.idea/modules/nexusproto_main.iml b/.idea/modules/nexusproto_main.iml
index 403cc46..12775aa 100644
--- a/.idea/modules/nexusproto_main.iml
+++ b/.idea/modules/nexusproto_main.iml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<module external.linked.project.id="nexusproto:main" external.linked.project.path="$MODULE_DIR$/../.." external.root.project.path="$MODULE_DIR$/../.." external.system.id="GRADLE" external.system.module.group="'org.apache.sdap'" external.system.module.type="sourceSet" external.system.module.version="1.0.1-SNAPSHOT" type="JAVA_MODULE" version="4">
+<module external.linked.project.id="nexusproto:main" external.linked.project.path="$MODULE_DIR$/../.." external.root.project.path="$MODULE_DIR$/../.." external.system.id="GRADLE" external.system.module.group="org.apache.sdap" external.system.module.type="sourceSet" external.system.module.version="1.0.1-SNAPSHOT" type="JAVA_MODULE" version="4">
   <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
     <output url="file://$MODULE_DIR$/../../out/production/classes" />
     <exclude-output />
diff --git a/.idea/modules/nexusproto_test.iml b/.idea/modules/nexusproto_test.iml
index c80b72c..a6b7517 100644
--- a/.idea/modules/nexusproto_test.iml
+++ b/.idea/modules/nexusproto_test.iml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<module external.linked.project.id="nexusproto:test" external.linked.project.path="$MODULE_DIR$/../.." external.root.project.path="$MODULE_DIR$/../.." external.system.id="GRADLE" external.system.module.group="'org.apache.sdap'" external.system.module.type="sourceSet" external.system.module.version="1.0.1-SNAPSHOT" type="JAVA_MODULE" version="4">
+<module external.linked.project.id="nexusproto:test" external.linked.project.path="$MODULE_DIR$/../.." external.root.project.path="$MODULE_DIR$/../.." external.system.id="GRADLE" external.system.module.group="org.apache.sdap" external.system.module.type="sourceSet" external.system.module.version="1.0.1-SNAPSHOT" type="JAVA_MODULE" version="4">
   <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
     <output-test url="file://$MODULE_DIR$/../../out/test/classes" />
     <exclude-output />
diff --git a/build.gradle b/build.gradle
index 8265730..74dc927 100644
--- a/build.gradle
+++ b/build.gradle
@@ -26,8 +26,13 @@ plugins {
     id 'net.researchgate.release' version '2.6.0'
 }
 
+group = "org.apache.sdap"
+version= "1.0.1-SNAPSHOT"
+sourceCompatibility = "1.8"
+
 repositories {
     mavenCentral()
+    mavenLocal()
 }
 
 ext {
diff --git a/gradle.properties b/gradle.properties
deleted file mode 100644
index bce49ec..0000000
--- a/gradle.properties
+++ /dev/null
@@ -1,3 +0,0 @@
-group = 'org.apache.sdap'
-version=1.0.1-SNAPSHOT
-sourceCompatibility = 1.8
\ No newline at end of file
diff --git a/nexusproto.iml b/nexusproto.iml
index fd86645..1b52373 100644
--- a/nexusproto.iml
+++ b/nexusproto.iml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<module external.linked.project.id="nexusproto" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="'org.apache.sdap'" external.system.module.version="1.0.1-SNAPSHOT" type="JAVA_MODULE" version="4">
+<module external.linked.project.id="nexusproto" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="org.apache.sdap" external.system.module.version="1.0.1-SNAPSHOT" type="JAVA_MODULE" version="4">
   <component name="NewModuleRootManager" inherit-compiler-output="true">
     <exclude-output />
     <content url="file://$MODULE_DIR$">


[incubator-sdap-nexusproto] 13/17: SDAP-48 Build Pipeline for nexusproto (#4)

Posted by fg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

fgreg pushed a commit to branch SDAP-48
in repository https://gitbox.apache.org/repos/asf/incubator-sdap-nexusproto.git

commit b2196ac811eec3c245d3a289e09d28b2bbb329de
Author: fgreg <fg...@gmail.com>
AuthorDate: Wed Oct 3 15:46:50 2018 -0700

    SDAP-48 Build Pipeline for nexusproto (#4)
    
    * trying out this pipeline stuff
    
    * trying assemble
    
    * trying with docker
    
    * removed label
    
    * changed task
    
    * trying different pattern.
    
    * fixed project name and made sure python version stays in sync with the gradle project version.
    
    * doing it correctly now.
    
    * Working jenkins build.
---
 .idea/modules/nexusproto_main.iml |   7 +-
 .idea/modules/nexusproto_test.iml |   7 +-
 build.gradle                      |  17 ++-
 gradle.properties                 |   8 +-
 jenkins/Jenkinsfile               |  30 ++++++
 jenkins/pipeline-syntax.gdsl      | 217 ++++++++++++++++++++++++++++++++++++++
 nexusproto.iml                    |   2 +-
 settings.gradle                   |   1 +
 8 files changed, 269 insertions(+), 20 deletions(-)

diff --git a/.idea/modules/nexusproto_main.iml b/.idea/modules/nexusproto_main.iml
index ff49722..91d8ee7 100644
--- a/.idea/modules/nexusproto_main.iml
+++ b/.idea/modules/nexusproto_main.iml
@@ -1,12 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<module external.linked.project.id="nexusproto:main" external.linked.project.path="$MODULE_DIR$/../.." external.root.project.path="$MODULE_DIR$/../.." external.system.id="GRADLE" external.system.module.group="org.apache.sdap" external.system.module.type="sourceSet" external.system.module.version="1.0.0-SNAPSHOT" type="JAVA_MODULE" version="4">
+<module external.linked.project.id="nexusproto:main" external.linked.project.path="$MODULE_DIR$/../.." external.root.project.path="$MODULE_DIR$/../.." external.system.id="GRADLE" external.system.module.group="org.apache.sdap" external.system.module.type="sourceSet" external.system.module.version="1.0.0" type="JAVA_MODULE" version="4">
   <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
     <output url="file://$MODULE_DIR$/../../out/production/classes" />
     <exclude-output />
-    <content url="file://$MODULE_DIR$/../../src/main">
-      <sourceFolder url="file://$MODULE_DIR$/../../src/main/java" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/../../src/main/resources" type="java-resource" />
-    </content>
+    <content url="file://$MODULE_DIR$/../../src/main" />
     <orderEntry type="inheritedJdk" />
     <orderEntry type="sourceFolder" forTests="false" />
     <orderEntry type="library" name="Gradle: com.google.protobuf:protobuf-java:3.4.0" level="project" />
diff --git a/.idea/modules/nexusproto_test.iml b/.idea/modules/nexusproto_test.iml
index e52c1f3..9220c78 100644
--- a/.idea/modules/nexusproto_test.iml
+++ b/.idea/modules/nexusproto_test.iml
@@ -1,12 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<module external.linked.project.id="nexusproto:test" external.linked.project.path="$MODULE_DIR$/../.." external.root.project.path="$MODULE_DIR$/../.." external.system.id="GRADLE" external.system.module.group="org.apache.sdap" external.system.module.type="sourceSet" external.system.module.version="1.0.0-SNAPSHOT" type="JAVA_MODULE" version="4">
+<module external.linked.project.id="nexusproto:test" external.linked.project.path="$MODULE_DIR$/../.." external.root.project.path="$MODULE_DIR$/../.." external.system.id="GRADLE" external.system.module.group="org.apache.sdap" external.system.module.type="sourceSet" external.system.module.version="1.0.0" type="JAVA_MODULE" version="4">
   <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
     <output-test url="file://$MODULE_DIR$/../../out/test/classes" />
     <exclude-output />
-    <content url="file://$MODULE_DIR$/../../src/test">
-      <sourceFolder url="file://$MODULE_DIR$/../../src/test/java" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/../../src/test/resources" type="java-test-resource" />
-    </content>
+    <content url="file://$MODULE_DIR$/../../src/test" />
     <orderEntry type="inheritedJdk" />
     <orderEntry type="sourceFolder" forTests="false" />
     <orderEntry type="module" module-name="nexusproto_main" />
diff --git a/build.gradle b/build.gradle
index a3e260a..d710040 100644
--- a/build.gradle
+++ b/build.gradle
@@ -27,6 +27,10 @@ plugins {
     id "io.spring.dependency-management" version "1.0.4.RELEASE"
 }
 
+group=theGroup
+version=theVersion
+sourceCompatibility=theSourceCompatibility
+
 repositories {
     mavenCentral()
     mavenLocal()
@@ -106,10 +110,10 @@ assemble.doLast {
         }
     })
 
-    setVersionInPythonModule(pythonbuilddir)
-
     Files.move(file(pythonbuilddir.path + '/nexusproto/setup.py').toPath(), file(pythonbuilddir.path + '/setup.py').toPath(), StandardCopyOption.REPLACE_EXISTING)
 
+    setVersionInPythonModule(pythonbuilddir)
+
     File generatedPython = file("$genDirectory/main/python/DataTile_pb2.py")
 
     Files.copy(generatedPython.toPath(), file(pythonbuilddir.path + '/nexusproto/DataTile_pb2.py').toPath(), StandardCopyOption.REPLACE_EXISTING)
@@ -151,11 +155,14 @@ task checkPython {
 
 task tarPython(type: Tar, dependsOn: [assemble]) {
     destinationDir = file(project.ext.distDirectory)
-    archiveName = "nexusproto-${project.version}.tar.gz"
+    archiveName = "${project.name}-${project.version}.tar.gz"
     compression = Compression.GZIP
     from(file(buildDir.path + '/python')) {
         include '**/*'
     }
+    doLast {
+        setVersionInPythonModule(file(pythonBuildDirPath))
+    }
 }
 
 task pythonInstall(dependsOn: [checkPython, tarPython]){
@@ -193,7 +200,7 @@ dependencies {
 }
 
 void setVersionInPythonModule(pythonbuilddir){
-    def setupPy = file(pythonbuilddir.path + '/nexusproto/setup.py').text
+    def setupPy = file(pythonbuilddir.path + '/setup.py').text
     setupPy = setupPy.replaceAll(/GRADLE_PROJECT_VERSION/, "$project.version")
-    file(pythonbuilddir.path + '/nexusproto/setup.py').write(setupPy)
+    file(pythonbuilddir.path + '/setup.py').write(setupPy)
 }
\ No newline at end of file
diff --git a/gradle.properties b/gradle.properties
index 2cbfe84..6f1e3b2 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,4 +1,4 @@
-version=1.0.0-SNAPSHOT
-
-group=org.apache.sdap
-sourceCompatibility=1.8
\ No newline at end of file
+theVersion=1.0.0
+theName=nexusproto
+theGroup=org.apache.sdap
+theSourceCompatibility=1.8
\ No newline at end of file
diff --git a/jenkins/Jenkinsfile b/jenkins/Jenkinsfile
new file mode 100644
index 0000000..6512b47
--- /dev/null
+++ b/jenkins/Jenkinsfile
@@ -0,0 +1,30 @@
+#!groovy
+
+
+pipeline{
+    agent {
+        docker {
+            image 'maven:3-jdk-8'
+            args '-v $HOME/.m2:/root/.m2'
+        }
+    }
+    stages{
+        stage("Build"){
+            steps{
+                git branch: "${env.BRANCH_NAME}", credentialsId: 'fgreg-github', url: 'https://github.com/apache/incubator-sdap-nexusproto'
+                sh './gradlew clean build'
+            }
+        }
+        stage("Assemble"){
+            steps{
+                sh './gradlew tarPython'
+            }
+        }
+    }
+    post {
+        always {
+            archiveArtifacts artifacts: 'build/libs/*.jar', fingerprint: true, onlyIfSuccessful: true
+            archiveArtifacts artifacts: 'distribution/*.tar.gz', fingerprint: true, onlyIfSuccessful: true
+        }
+    }
+}
\ No newline at end of file
diff --git a/jenkins/pipeline-syntax.gdsl b/jenkins/pipeline-syntax.gdsl
new file mode 100644
index 0000000..73e22af
--- /dev/null
+++ b/jenkins/pipeline-syntax.gdsl
@@ -0,0 +1,217 @@
+//The global script scope
+def ctx = context(scope: scriptScope())
+
+//What things can be on the script scope
+contributor(ctx) {
+    method(name: 'pipeline', type: 'Object', params: [body: Closure])
+    property(name: 'params', type: 'org.jenkinsci.plugins.workflow.cps.ParamsVariable')
+    property(name: 'env', type: 'org.jenkinsci.plugins.workflow.cps.EnvActionImpl.Binder')
+    property(name: 'currentBuild', type: 'org.jenkinsci.plugins.workflow.cps.RunWrapperBinder')
+    property(name: 'scm', type: 'org.jenkinsci.plugins.workflow.multibranch.SCMVar')
+}
+
+// Define default env vars
+def envVars = context(ctype: 'org.jenkinsci.plugins.workflow.cps.EnvActionImpl.Binder')
+
+contributor(envVars) {
+    property(name: 'BRANCH_NAME', type: 'String', doc: 'For a multibranch project, this will be set to the name of the branch being built, for example in case you wish to deploy to production from master but not from feature branches; if corresponding to some kind of change request, the name is generally arbitrary (refer to CHANGE_ID and CHANGE_TARGET).')
+    property(name: 'CHANGE_ID', type: 'String', doc: 'For a multibranch project corresponding to some kind of change request, this will be set to the change ID, such as a pull request number, if supported; else unset.')
+    property(name: 'CHANGE_URL', type: 'Strig', doc: 'For a multibranch project corresponding to some kind of change request, this will be set to the change URL, if supported; else unset.')
+    property(name: 'CHANGE_TITLE', type: 'String', doc: 'For a multibranch project corresponding to some kind of change request, this will be set to the title of the change, if supported; else unset.')
+    property(name: 'CHANGE_AUTHOR', type: 'String', doc: 'For a multibranch project corresponding to some kind of change request, this will be set to the username of the author of the proposed change, if supported; else unset.')
+    property(name: 'CHANGE_AUTHOR_DISPLAY_NAME', type: 'String', doc: 'For a multibranch project corresponding to some kind of change request, this will be set to the human name of the author, if supported; else unset.')
+    property(name: 'CHANGE_AUTHOR_EMAIL', type: 'String', doc: 'For a multibranch project corresponding to some kind of change request, this will be set to the email address of the author, if supported; else unset.')
+    property(name: 'CHANGE_TARGET', type: 'String', doc: 'rFo a multibranch project corresponding to some kind of change request, this will be set to the target or base branch to which the change could be merged, if supported; else unset.')
+    property(name: 'BUILD_NUMBER', type: 'String', doc: 'The current build number, such as "153"')
+    property(name: 'BUILD_ID', type: 'String', doc: 'The current build ID, identical to BUILD_NUMBER for builds created in 1.597+, but a YYYY-MM-DD_hh-mm-ss timestamp for older builds')
+    property(name: 'BUILD_DISPLAY_NAME', type: 'String', doc: 'The display name of the current build, which is something like "#153" by default.')
+    property(name: 'JOB_NAME', type: 'String', doc: 'Name of the project of this build, such as "foo" or "foo/bar".')
+    property(name: 'JOB_BASE_NAME', type: 'String', doc: 'Short Name of the project of this build stripping off folder paths, such as "foo" for "bar/foo".')
+    property(name: 'BUILD_TAG', type: 'String', doc: 'String of "jenkins-${JOB_NAME}-${BUILD_NUMBER}". All forward slashes (/) in the JOB_NAME are replaced with dashes (-). Convenient to put into a resource file, a jar file, etc for easier identification.')
+    property(name: 'EXECUTOR_NUMBER', type: 'String', doc: 'The unique number that identifies the current executor (among executors of the same machine) that’s carrying out this build. This is the number you see in the "build executor status", except that the number starts from 0, not 1.')
+    property(name: 'NODE_NAME', type: 'String', doc: 'Name of the agent if the build is on an agent, or "master" if run on master')
+    property(name: 'NODE_LABELS', type: 'String', doc: 'Whitespace-separated list of labels that the node is assigned.')
+    property(name: 'WORKSPACE', type: 'String', doc: 'The absolute path of the directory assigned to the build as a workspace.')
+    property(name: 'JENKINS_HOME', type: 'String', doc: 'The absolute path of the directory assigned on the master node for Jenkins to store data.')
+    property(name: 'JENKINS_URL', type: 'String', doc: 'Full URL of Jenkins, like http://server:port/jenkins/ (note: only available if Jenkins URL set in system configuration)')
+    property(name: 'BUILD_URL', type: 'String', doc: 'Full URL of this build, like http://server:port/jenkins/job/foo/15/ (Jenkins URL must be set)')
+    property(name: 'JOB_URL', type: 'String', doc: 'Full URL of this job, like http://server:port/jenkins/job/foo/ (Jenkins URL must be set)')
+}
+
+// Definew all the properties in current builds
+def currentBuild = context(ctype: 'org.jenkinsci.plugins.workflow.cps.RunWrapperBinder')
+
+contributor(currentBuild) {
+    property(name: 'number', type: 'Integer', doc: 'build number')
+    property(name: 'result', type: 'String', doc: 'typically SUCCESS, UNSTABLE, or FAILURE (may be null for an ongoing build)')
+    property(name: 'currentResult', type: 'String', doc: 'typically SUCCESS, UNSTABLE, or FAILURE (never null)')
+    method(name: 'resultIsBetterOrEqualTo', type: 'Boolean', params: [buildStatus: 'String'], doc: 'Compares the current build result to the provided result string (SUCCESS, UNSTABLE, or FAILURE) and returns true if the current build result is better than or equal to the provided result.')
+    method(name: 'resultIsWorseOrEqualTo', type: 'Boolean', params: [buildStatus: 'String'], doc: 'Compares the current build result to the provided result string (SUCCESS, UNSTABLE, or FAILURE) and returns true if the current build result is worse than or equal to the provided result.')
+    property(name: 'displayName', type: 'String', doc: 'normally #123 but sometimes set to, e.g., an SCM commit identifier')
+    property(name: 'description', type: 'String', doc: 'additional information about the build')
+    property(name: 'id', type: 'String', doc: 'normally number as a string')
+    property(name: 'timeInMillis', type: 'long', doc: 'time since the epoch when the build was scheduled')
+    property(name: 'startTimeInMillis', type: 'long', doc: 'time since the epoch when the build started running')
+    property(name: 'duration', type: 'long', doc: 'duration of the build in milliseconds')
+    property(name: 'durationString', type: 'String', doc: 'a human-readable representation of the build duration')
+    property(name: 'previousBuild', type: 'org.jenkinsci.plugins.workflow.cps.RunWrapperBinder', doc: 'another similar object, or null')
+    property(name: 'nextBuild', type: 'org.jenkinsci.plugins.workflow.cps.RunWrapperBinder', doc: 'another similar object, or null')
+    property(name: 'absoluteUrl', type: 'String', doc: 'URL of build index page')
+    property(name: 'buildVariables', type: 'Map', doc: 'for a non-Pipeline downstream build, offers access to a map of defined build variables; for a Pipeline downstream build, any variables set globally on env')
+    property(name: 'changeSets', type: 'String', doc: 'a list of changesets coming from distinct SCM checkouts; each has a kind and is a list of commits; each commit has a commitId, timestamp, msg, author, and affectedFiles each of which has an editType and path; the value will not generally be Serializable so you may only access it inside a method marked @NonCPS')
+    property(name: 'rawBuild', type: 'String', doc: 'a hudson.model.Run with further APIs, only for trusted libraries or administrator-approved scripts outside the sandbox; the value will not be Serializable so you may only access it inside a method marked @NonCPS')
+}
+
+def closures = context(scope: closureScope())
+
+contributor(closures) {
+    // What things can be inside a pipeline
+    if (enclosingCall("pipeline")) {
+        method(name: 'echo', type: 'Object', params: [message: 'java.lang.String'], doc: 'Print Message')
+        method(name: 'stages', type: 'Object', params: [body: 'Closure'], doc: 'Stages')
+        method(name: 'agent', type: 'Object', params: [body: 'Closure'], doc: 'Label expression to select agents')
+        method(name: 'parameters', type: 'Object', params: [body: 'Closure'], doc: 'Job parameters')
+        method(name: 'options', type: 'Object', params: [body: 'Closure'])
+        method(name: 'triggers', type: 'Object', params: [body: 'Closure'], doc: 'Build triggers')
+        method(name: 'post', type: 'Object', params: [body: 'Closure'], doc: 'Post build actions')
+        method(name: 'jiraComment', type: 'Object', namedParams: [parameter(name: 'issueKey', type: 'java.lang.String'), parameter(name: 'body', type: 'java.lang.String'),], doc: 'JIRA: Add a comment to issue(s)')
+        method(name: 'jiraIssueSelector', type: 'Object', params: [:], doc: 'JIRA: Issue selector')
+        method(name: 'jiraIssueSelector', type: 'Object', namedParams: [parameter(name: 'issueSelector', type: 'Map'),], doc: 'JIRA: Issue selector')
+        method(name: 'jiraSearch', type: 'Object', params: [jql: 'java.lang.String'], doc: 'JIRA: Search issues')
+
+        //I  don't know the fate of these one
+        method(name: 'build', type: 'Object', params: [job: 'java.lang.String'], doc: 'Build a job')
+        method(name: 'build', type: 'Object', namedParams: [parameter(name: 'job', type: 'java.lang.String'), parameter(name: 'parameters', type: 'Map'), parameter(name: 'propagate', type: 'boolean'), parameter(name: 'quietPeriod', type: 'java.lang.Integer'), parameter(name: 'wait', type: 'boolean'),], doc: 'Build a job')
+        method(name: 'ec2', type: 'Object', namedParams: [parameter(name: 'cloud', type: 'java.lang.String'), parameter(name: 'template', type: 'java.lang.String'),], doc: 'Cloud template provisioning')
+        method(name: 'error', type: 'Object', params: [message: 'java.lang.String'], doc: 'Error signal')
+        method(name: 'input', type: 'Object', params: [message: 'java.lang.String'], doc: 'Wait for interactive input')
+        method(name: 'input', type: 'Object', namedParams: [parameter(name: 'message', type: 'java.lang.String'), parameter(name: 'id', type: 'java.lang.String'), parameter(name: 'ok', type: 'java.lang.String'), parameter(name: 'parameters', type: 'Map'), parameter(name: 'submitter', type: 'java.lang.String'), parameter(name: 'submitterParameter', type: 'java.lang.String'),], doc: 'Wait for interactive input')
+        method(name: 'isUnix', type: 'Object', params: [:], doc: 'Checks if running on a Unix-like node')
+        method(name: 'library', type: 'Object', params: [identifier: 'java.lang.String'], doc: 'Load a shared library on the fly')
+        method(name: 'library', type: 'Object', namedParams: [parameter(name: 'identifier', type: 'java.lang.String'), parameter(name: 'changelog', type: 'java.lang.Boolean'), parameter(name: 'retriever', type: 'Map'),], doc: 'Load a shared library on the fly')
+        method(name: 'libraryResource', type: 'Object', params: [resource: 'java.lang.String'], doc: 'Load a resource file from a shared library')
+        method(name: 'mail', type: 'Object', namedParams: [parameter(name: 'subject', type: 'java.lang.String'), parameter(name: 'body', type: 'java.lang.String'), parameter(name: 'bcc', type: 'java.lang.String'), parameter(name: 'cc', type: 'java.lang.String'), parameter(name: 'charset', type: 'java.lang.String'), parameter(name: 'from', type: 'java.lang.String'), parameter(name: 'mimeType', type: 'java.lang.String'), parameter(name: 'replyTo', type: 'java.lang.String'), parameter(name: [...]
+        method(name: 'milestone', type: 'Object', params: [ordinal: 'java.lang.Integer'], doc: 'The milestone step forces all builds to go through in order')
+        method(name: 'milestone', type: 'Object', namedParams: [parameter(name: 'ordinal', type: 'java.lang.Integer'), parameter(name: 'label', type: 'java.lang.String'),], doc: 'The milestone step forces all builds to go through in order')
+        method(name: 'node', type: 'Object', params: [body: 'Closure'], doc: 'Allocate node')
+        method(name: 'node', type: 'Object', params: [label: 'String', body: 'Closure'], doc: 'Allocate node')
+        method(name: 'properties', type: 'Object', params: [properties: 'Map'], doc: 'Set job properties')
+        method(name: 'readTrusted', type: 'Object', params: [path: 'java.lang.String'], doc: 'Read trusted file from SCM')
+        method(name: 'resolveScm', type: 'Object', namedParams: [parameter(name: 'source', type: 'Map'), parameter(name: 'targets', type: 'Map'), parameter(name: 'ignoreErrors', type: 'boolean'),], doc: 'Resolves an SCM from an SCM Source and a list of candidate target branch names')
+        method(name: 'retry', type: 'Object', params: [count: int, body: 'Closure'], doc: 'Retry the body up to N times')
+        method(name: 'script', type: 'Object', params: [body: 'Closure'], doc: 'Run arbitrary Pipeline script')
+        method(name: 'sleep', type: 'Object', params: [time: 'int'], doc: 'Sleep')
+        method(name: 'sleep', type: 'Object', namedParams: [parameter(name: 'time', type: 'int'), parameter(name: 'unit', type: 'java.util.concurrent.TimeUnit'),], doc: 'Sleep')
+        method(name: 'timeout', type: 'Object', params: [time: int, body: 'Closure'], doc: 'Enforce time limit')
+        method(name: 'timeout', type: 'Object', params: [body: Closure], namedParams: [parameter(name: 'time', type: 'int'), parameter(name: 'unit', type: 'java.util.concurrent.TimeUnit'),], doc: 'Enforce time limit')
+        method(name: 'tool', type: 'Object', params: [name: 'java.lang.String'], doc: 'Use a tool from a predefined Tool Installation')
+        method(name: 'tool', type: 'Object', namedParams: [parameter(name: 'name', type: 'java.lang.String'), parameter(name: 'type', type: 'java.lang.String'),], doc: 'Use a tool from a predefined Tool Installation')
+        method(name: 'waitUntil', type: 'Object', params: [body: 'Closure'], doc: 'Wait for condition')
+        method(name: 'withCredentials', type: 'Object', params: [bindings: Map, body: 'Closure'], doc: 'Bind credentials to variables')
+        method(name: 'withEnv', type: 'Object', params: [overrides: Map, body: 'Closure'], doc: 'Set environment variables')
+        method(name: 'ws', type: 'Object', params: [dir: 'String', body: 'Closure'], doc: 'Allocate workspace')
+        method(name: 'catchError', type: 'Object', params: [body: 'Closure'], doc: 'Advanced/Deprecated Catch error and set build result')
+        method(name: 'dockerFingerprintRun', type: 'Object', params: [containerId: 'java.lang.String'], doc: 'Advanced/Deprecated Record trace of a Docker image run in a container')
+        method(name: 'dockerFingerprintRun', type: 'Object', namedParams: [parameter(name: 'containerId', type: 'java.lang.String'), parameter(name: 'toolName', type: 'java.lang.String'),], doc: 'Record trace of a Docker image run in a container')
+        method(name: 'envVarsForTool', type: 'Object', namedParams: [parameter(name: 'toolId', type: 'java.lang.String'), parameter(name: 'toolVersion', type: 'java.lang.String'),], doc: 'Fetches the environment variables for a given tool in a list of \'FOO=bar\' strings suitable for the withEnv step.')
+        method(name: 'getContext', type: 'Object', params: [type: 'Map'], doc: 'Advanced/Deprecated Get contextual object from internal APIs')
+        method(name: 'withContext', type: 'Object', params: [context: 'Object', body: 'Closure'], doc: 'Advanced/Deprecated Use contextual object from internal APIs within a block')
+
+    }
+
+    //The only thing inside agent can be label
+    if (enclosingCall("agent")) {
+        property(name: 'any')
+        property(name: 'none')
+        method(name: 'label', type: 'String', params: [expr: 'String'])
+        method(name: 'docker', type: 'String', params: [docker_image: 'String'])
+        method(name: 'dockerfile', type: 'boolean', params: [use_dockerfile: 'boolean'])
+    }
+
+    if (enclosingCall("triggers")) {
+        method(name: 'cron', type: 'String', params: [expr: 'String'], doc: 'Cron expression can be one of @daily, @hourly, etc')
+        method(name: 'upstream', type: 'Object', params: [name: 'String', build_status: 'Object'])
+        method(name: 'pollSCM', type: 'String', params: [expr: 'String'])
+        method(name: 'bitbucketPush')
+    }
+
+    // Parameters can only contain
+    if (enclosingCall("parameters")) {
+        method(name: 'string', type: 'Object', namedParams: [parameter(name: 'name', type: 'java.lang.String'), parameter(name: 'defaultValue', type: 'java.lang.String'), parameter(name: 'description', type: 'java.lang.String')])
+        method(name: 'booleanParam', type: 'Object', namedParams: [parameter(name: 'name', type: 'java.lang.String'), parameter(name: 'defaultValue', type: 'java.lang.Boolean'), parameter(name: 'description', type: 'java.lang.String')])
+        method(name: 'choice', type: 'Object', namedParams: [parameter(name: 'choice', type: 'java.lang.String'), parameter(name: 'defaultValue', type: 'java.lang.Boolean'), parameter(name: 'description', type: 'java.lang.String')])
+    }
+
+    // Find the options!
+    if (enclosingCall("options")) {
+        method(name: 'buildDiscarder')
+        method(name: 'timestamps')
+        method(name: 'timeout', type: 'Object', namedParams: [parameter(name: 'time', type: 'java.lang.Integer'), parameter(name: 'unit', type: 'java.lang.String')])
+    }
+
+    // Inside stages can be, stage or stage('Name')
+    if (enclosingCall("stages")) {
+        method(name: 'stage', type: 'Object', params: [name: 'String', body: 'Closure'], doc: 'Stage')
+        method(name: 'stage', type: 'Object', params: [body: Closure], namedParams: [parameter(name: 'name', type: 'java.lang.String'), parameter(name: 'concurrency', type: 'java.lang.Integer'),], doc: 'Stage')
+    }
+
+    // Inside steps only steps
+    if (enclosingCall("stage")) {
+        method(name: 'agent', type: 'Object', params: [body: 'Closure'], doc: 'Label expression to select agents')
+        method(name: 'steps', type: 'Object', params: [body: 'Closure'], doc: 'Steps to execute on stage')
+        method(name: 'post', type: 'Object', params: [body: 'Closure'], doc: 'Post actions can be executed on a per-stage basis as well')
+    }
+
+    // Only inside steps
+    if (enclosingCall("steps") || enclosingCall("always") || enclosingCall("success") ||
+            enclosingCall("failure") || enclosingCall("unstable") || enclosingCall("changed")) {
+        method(name: 'timestamp', type: 'Object', params: [body: 'Closure'], doc: 'Timestamps')
+        method(name: 'bat', type: 'Object', params: [script: 'java.lang.String'], doc: 'Windows Batch Script')
+        method(name: 'bat', type: 'Object', namedParams: [parameter(name: 'script', type: 'java.lang.String'), parameter(name: 'encoding', type: 'java.lang.String'), parameter(name: 'returnStatus', type: 'boolean'), parameter(name: 'returnStdout', type: 'boolean'),], doc: 'Windows Batch Script')
+        method(name: 'checkout', type: 'Object', params: [scm: 'Map'], doc: 'General SCM')
+        method(name: 'checkout', type: 'Object', namedParams: [parameter(name: 'scm', type: 'Map'), parameter(name: 'changelog', type: 'boolean'), parameter(name: 'poll', type: 'boolean'),], doc: 'General SCM')
+        method(name: 'deleteDir', type: 'Object', params: [:], doc: 'Recursively delete the current directory from the workspace')
+        method(name: 'dir', type: 'Object', params: [path: 'String', body: 'Closure'], doc: 'Change current directory')
+        method(name: 'fileExists', type: 'Object', params: [file: 'java.lang.String'], doc: 'Verify if file exists in workspace')
+        method(name: 'git', type: 'Object', params: [url: 'java.lang.String'], doc: 'Git')
+        method(name: 'git', type: 'Object', namedParams: [parameter(name: 'url', type: 'java.lang.String'), parameter(name: 'branch', type: 'java.lang.String'), parameter(name: 'changelog', type: 'boolean'), parameter(name: 'credentialsId', type: 'java.lang.String'), parameter(name: 'poll', type: 'boolean'),], doc: 'Git')
+        method(name: 'junit', type: 'Object', params: [testResults: 'java.lang.String'], doc: 'Archive JUnit-formatted test results')
+        method(name: 'junit', type: 'Object', namedParams: [parameter(name: 'testResults', type: 'java.lang.String'), parameter(name: 'allowEmptyResults', type: 'boolean'), parameter(name: 'healthScaleFactor', type: 'double'), parameter(name: 'keepLongStdio', type: 'boolean'), parameter(name: 'testDataPublishers', type: 'Map'),], doc: 'Archive JUnit-formatted test results')
+        method(name: 'load', type: 'Object', params: [path: 'java.lang.String'], doc: 'Evaluate a Groovy source file into the Pipeline script')
+        method(name: 'powershell', type: 'Object', params: [script: 'java.lang.String'], doc: 'PowerShell Script')
+        method(name: 'powershell', type: 'Object', namedParams: [parameter(name: 'script', type: 'java.lang.String'), parameter(name: 'encoding', type: 'java.lang.String'), parameter(name: 'returnStatus', type: 'boolean'), parameter(name: 'returnStdout', type: 'boolean'),], doc: 'PowerShell Script')
+        method(name: 'publishHTML', type: 'Object', params: [target: 'Map'], doc: 'Publish HTML reports')
+        method(name: 'pwd', type: 'Object', params: [:], doc: 'Determine current directory')
+        method(name: 'pwd', type: 'Object', namedParams: [parameter(name: 'tmp', type: 'boolean'),], doc: 'Determine current directory')
+        method(name: 'readFile', type: 'Object', params: [file: 'java.lang.String'], doc: 'Read file from workspace')
+        method(name: 'readFile', type: 'Object', namedParams: [parameter(name: 'file', type: 'java.lang.String'), parameter(name: 'encoding', type: 'java.lang.String'),], doc: 'Read file from workspace')
+        method(name: 'sh', type: 'Object', params: [script: 'java.lang.String'], doc: 'Shell Script')
+        method(name: 'sh', type: 'Object', namedParams: [parameter(name: 'script', type: 'java.lang.String'), parameter(name: 'encoding', type: 'java.lang.String'), parameter(name: 'returnStatus', type: 'boolean'), parameter(name: 'returnStdout', type: 'boolean'),], doc: 'Shell Script')
+        method(name: 'stash', type: 'Object', params: [name: 'java.lang.String'], doc: 'Stash some files to be used later in the build')
+        method(name: 'stash', type: 'Object', namedParams: [parameter(name: 'name', type: 'java.lang.String'), parameter(name: 'allowEmpty', type: 'boolean'), parameter(name: 'excludes', type: 'java.lang.String'), parameter(name: 'includes', type: 'java.lang.String'), parameter(name: 'useDefaultExcludes', type: 'boolean'),], doc: 'Stash some files to be used later in the build')
+        method(name: 'tm', type: 'Object', params: [stringWithMacro: 'java.lang.String'], doc: 'Expand a string containing macros')
+        method(name: 'unstash', type: 'Object', params: [name: 'java.lang.String'], doc: 'Restore files previously stashed')
+        method(name: 'validateDeclarativePipeline', type: 'Object', params: [path: 'java.lang.String'], doc: 'Validate a file containing a Declarative Pipeline')
+        method(name: 'wrap', type: 'Object', params: [delegate: Map, body: 'Closure'], doc: 'General Build Wrapper')
+        method(name: 'writeFile', type: 'Object', namedParams: [parameter(name: 'file', type: 'java.lang.String'), parameter(name: 'text', type: 'java.lang.String'), parameter(name: 'encoding', type: 'java.lang.String'),], doc: 'Write file to workspace')
+        method(name: 'archive', type: 'Object', params: [includes: 'java.lang.String'], doc: 'Advanced/Deprecated Archive artifacts')
+        method(name: 'archive', type: 'Object', namedParams: [parameter(name: 'includes', type: 'java.lang.String'), parameter(name: 'excludes', type: 'java.lang.String'),], doc: 'Archive artifacts')
+        method(name: 'dockerFingerprintFrom', type: 'Object', namedParams: [parameter(name: 'dockerfile', type: 'java.lang.String'), parameter(name: 'image', type: 'java.lang.String'), parameter(name: 'buildArgs', type: 'Map'), parameter(name: 'toolName', type: 'java.lang.String'),], doc: 'Record trace of a Docker image used in FROM')
+        method(name: 'unarchive', type: 'Object', params: [:], doc: 'Advanced/Deprecated Copy archived artifacts into the workspace')
+        method(name: 'unarchive', type: 'Object', namedParams: [parameter(name: 'mapping', type: 'Map'),], doc: 'Copy archived artifacts into the workspace')
+        method(name: 'withDockerContainer', type: 'Object', params: [image: 'String', body: 'Closure'], doc: 'Advanced/Deprecated Run build steps inside a Docker container')
+        method(name: 'withDockerContainer', type: 'Object', params: [body: Closure], namedParams: [parameter(name: 'image', type: 'java.lang.String'), parameter(name: 'args', type: 'java.lang.String'), parameter(name: 'toolName', type: 'java.lang.String'),], doc: 'Run build steps inside a Docker container')
+        method(name: 'withDockerRegistry', type: 'Object', params: [registry: Map, body: 'Closure'], doc: 'Advanced/Deprecated Sets up Docker registry endpoint')
+        method(name: 'withDockerServer', type: 'Object', params: [server: Map, body: 'Closure'], doc: 'Advanced/Deprecated Sets up Docker server endpoint')
+        method(name: 'parallel', type: 'Object', params: [body: 'Map'], doc: 'Run taask in parallel')
+    }
+
+    // Post actions!
+    if (enclosingCall("post")) {
+        method(name: 'always', type: 'Object', params: [body: 'Closure'])
+        method(name: 'success', type: 'Object', params: [body: 'Closure'])
+        method(name: 'failure', type: 'Object', params: [body: 'Closure'])
+        method(name: 'unstable', type: 'Object', params: [body: 'Closure'])
+        method(name: 'changed', type: 'Object', params: [body: 'Closure'])
+    }
+}
\ No newline at end of file
diff --git a/nexusproto.iml b/nexusproto.iml
index 0053540..a720747 100644
--- a/nexusproto.iml
+++ b/nexusproto.iml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<module external.linked.project.id="nexusproto" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="org.apache.sdap" external.system.module.version="1.0.0-SNAPSHOT" type="JAVA_MODULE" version="4">
+<module external.linked.project.id="nexusproto" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="org.apache.sdap" external.system.module.version="1.0.0" type="JAVA_MODULE" version="4">
   <component name="NewModuleRootManager" inherit-compiler-output="true">
     <exclude-output />
     <content url="file://$MODULE_DIR$">
diff --git a/settings.gradle b/settings.gradle
new file mode 100644
index 0000000..6d53013
--- /dev/null
+++ b/settings.gradle
@@ -0,0 +1 @@
+rootProject.name = theName
\ No newline at end of file


[incubator-sdap-nexusproto] 06/17: added python install task

Posted by fg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

fgreg pushed a commit to branch SDAP-48
in repository https://gitbox.apache.org/repos/asf/incubator-sdap-nexusproto.git

commit 61a45b56d6e5d830d09a6693c2d46128596e2026
Author: Frank Greguska <fr...@jpl.nasa.gov>
AuthorDate: Thu Jan 25 15:48:22 2018 -0800

    added python install task
---
 .gitignore        |  2 +-
 build.gradle      | 75 ++++++++++++++++++++++++++++++++++++++++++++-----------
 gradle.properties |  4 +++
 3 files changed, 66 insertions(+), 15 deletions(-)

diff --git a/.gitignore b/.gitignore
index f350e37..04d0727 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,7 +5,7 @@ build/reports/*
 !build/reports/license
 !build/reports/project
 
-distrobution/
+distribution/
 
 gen/
 
diff --git a/build.gradle b/build.gradle
index be01e2c..1e2ee5c 100644
--- a/build.gradle
+++ b/build.gradle
@@ -27,10 +27,6 @@ plugins {
     id "io.spring.dependency-management" version "1.0.4.RELEASE"
 }
 
-group = "org.apache.sdap"
-version= "1.0.1-SNAPSHOT"
-sourceCompatibility = "1.8"
-
 repositories {
     mavenCentral()
     mavenLocal()
@@ -38,7 +34,7 @@ repositories {
 
 ext {
     genDirectory = "$projectDir/gen"
-    distDirectory = "$projectDir/distrobution"
+    distDirectory = "$projectDir/distribution"
     pythonBuildDirPath = "${file(buildDir.path + '/python/nexusproto').path}"
 }
 
@@ -110,9 +106,7 @@ assemble.doLast {
         }
     })
 
-    def setupPy = file(pythonbuilddir.path + '/nexusproto/setup.py').text
-    setupPy = setupPy.replaceAll(/GRADLE_PROJECT_VERSION/, "$project.version")
-    file(pythonbuilddir.path + '/nexusproto/setup.py').write(setupPy)
+    setVersionInPythonModule(pythonbuilddir)
 
     Files.move(file(pythonbuilddir.path + '/nexusproto/setup.py').toPath(), file(pythonbuilddir.path + '/setup.py').toPath(), StandardCopyOption.REPLACE_EXISTING)
 
@@ -122,23 +116,70 @@ assemble.doLast {
 }
 
 updateVersion.doLast {
-    File pythonbuilddir = file(pythonBuildDirPath)
+    setVersionInPythonModule(file(pythonBuildDirPath))
+}
 
-    def setupPy = file(pythonbuilddir.path + '/nexusproto/setup.py').text
-    setupPy = setupPy.replaceAll(/GRADLE_PROJECT_VERSION/, "$project.version")
-    file(pythonbuilddir.path + '/nexusproto/setup.py').write(setupPy)
+task checkPython {
+    checkPython.ext.python = null
+    checkPython.ext.pip = null
+    doLast {
+        def pythonExecutable = ['python', 'python3', 'python2.7'].find { python ->
+            try {
+                def check = "import sys; sys.exit(0 if sys.version_info >= (2,7) else 1)"
+                return [python, "-c", check].execute().waitFor() == 0
+            } catch (IOException ignored) {
+                return false
+            }
+        }
+
+        def pipExecutable = ['pip', 'pip3'].find { pip ->
+            try {
+                return [pip, "-v"].execute().waitFor() == 0
+            } catch (IOException ignored) {
+                return false
+            }
+        }
 
+        if (pythonExecutable == null || pipExecutable == null) {
+            throw new GradleException('Build requires Python and Pip.')
+        } else {
+            checkPython.ext.python = pythonExecutable
+            checkPython.ext.pip = pipExecutable
+        }
+    }
 }
 
 task tarPython(type: Tar, dependsOn: [assemble]) {
-    destinationDir = file("distrobution")
-    archiveName = 'nexusproto.tar.gz'
+    destinationDir = file(project.ext.distDirectory)
+    archiveName = "nexusproto-${project.version}.tar.gz"
     compression = Compression.GZIP
     from(file(buildDir.path + '/python')) {
         include '**/*'
     }
 }
 
+task pythonInstall(dependsOn: [checkPython, tarPython]){
+    doLast {
+        def installed
+        def installCommand = [checkPython.ext.pip, 'install', tarPython.archivePath, '--force']
+        try{
+            def process = installCommand.execute()
+            process.waitFor()
+            logger.debug("Standard out from executing \"${installCommand.join(" ")}\"\n" + process.in.readLines().collect{line -> "  $line"}.join("\n"))
+            if(process.err.text) {
+                logger.error("Standard err from executing \"${installCommand.join(" ")}\"\n" + process.err.readLines().collect { line -> "  $line"}.join("\n"))
+            }
+            installed = process.exitValue() == 0
+        }catch (IOException e){
+            throw new GradleException("Failed to install", e)
+        }
+
+        if(!installed){
+            throw new GradleException("Failed to install ${tarPython.archivePath}")
+        }
+    }
+}
+
 clean.doLast {
     file(genDirectory).deleteDir()
     file(distDirectory).deleteDir()
@@ -148,4 +189,10 @@ dependencies {
 
     compile 'com.google.protobuf:protobuf-java:3.4.0'
 
+}
+
+void setVersionInPythonModule(pythonbuilddir){
+    def setupPy = file(pythonbuilddir.path + '/nexusproto/setup.py').text
+    setupPy = setupPy.replaceAll(/GRADLE_PROJECT_VERSION/, "$project.version")
+    file(pythonbuilddir.path + '/nexusproto/setup.py').write(setupPy)
 }
\ No newline at end of file
diff --git a/gradle.properties b/gradle.properties
new file mode 100644
index 0000000..ef01621
--- /dev/null
+++ b/gradle.properties
@@ -0,0 +1,4 @@
+version=1.0.1-SNAPSHOT
+
+group=org.apache.sdap
+sourceCompatibility=1.8
\ No newline at end of file


[incubator-sdap-nexusproto] 15/17: trying assemble

Posted by fg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

fgreg pushed a commit to branch SDAP-48
in repository https://gitbox.apache.org/repos/asf/incubator-sdap-nexusproto.git

commit 1fc04d96dec34cdaeab55fe3e63b318b6c3396af
Author: Frank Greguska <fr...@jpl.nasa.gov>
AuthorDate: Thu Mar 22 16:01:30 2018 -0700

    trying assemble
---
 Jenkinsfile | 20 +++++++++-----------
 1 file changed, 9 insertions(+), 11 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index 8b0b210..ccb5840 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -7,17 +7,15 @@ pipeline{
     }
     stages{
         stage("Build"){
-            parallel {
-                stage("Build Java"){
-                    steps{
-                        git branch: "${env.BRANCH_NAME}", credentialsId: 'fgreg-github', url: 'https://github.com/apache/incubator-sdap-nexusproto'
-                    }
-                }
-                stage("Build Python"){
-                    steps{
-                        git branch: "${env.BRANCH_NAME}", credentialsId: 'fgreg-github', url: 'https://github.com/apache/incubator-sdap-nexusproto'
-                    }
-                }
+            steps{
+                git branch: "${env.BRANCH_NAME}", credentialsId: 'fgreg-github', url: 'https://github.com/apache/incubator-sdap-nexusproto'
+                sh './gradlew clean build'
+            }
+        }
+        stage("Assemble"){
+            steps{
+                sh './gradlew assemble'
+                archiveArtifacts artifacts: '**/nexusproto-*.jar **/nexusproto-*.tar.gz', fingerprint: true, onlyIfSuccessful: true
             }
         }
     }