marathon
b8a409fbba4f
Revert "Minor cleanup of Jenkinsfile/README.md"
Jason Gilanfarr
2 days ago
This reverts commit 8f70edeb8c936d908aee60028702b44eaa4b107e. All Jenkinsfile properties have to be listed or jenkins will overwrite the per-job editions.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 2 3 4 5 6 7 8 9 10 11 12 13 14
#!/usr/bin/env groovy def m
properties([ parameters([ string(name: 'MARATHON_GROOVY_BRANCH', defaultValue: 'master'), ]) ])
ansiColor('gnome-terminal') { node('JenkinsMarathonCI-Debian8-2017-04-25') { // fetch the file directly from SCM so the job can use it to checkout the rest of the pipeline.
checkout changelog: false, poll: false, scm: [$class: 'GitSCM', branches: [[name: MARATHON_GROOVY_BRANCH]], doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'SparseCheckoutPaths', sparseCheckoutPaths: [[path: 'marathon.groovy']]]], submoduleCfg: [], userRemoteConfigs: [[credentialsId: 'mesosphere-ci-github', url: 'git@github.com:mesosphere/marathon.git']]]
// TODO: Switch back to master after landing. checkout changelog: false, poll: false, scm: [$class: 'GitSCM', branches: [[name: '*/jason/jenkins-submits']], doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'SparseCheckoutPaths', sparseCheckoutPaths: [[path: 'marathon.groovy']]]], submoduleCfg: [], userRemoteConfigs: [[credentialsId: 'mesosphere-ci-github', url: 'git@github.com:mesosphere/marathon.git']]]
m = load("marathon.groovy") stage("Checkout") { m.checkout_marathon() /** * If any of the content above this line changes, it has to be tested differently:
...
24 25 26 27 28 29 30 31 32 33 34 18 19 20 21 22 23 24 25 26 27
* - in public-marathon-phabricator-pipeline, find the most recent run that phabricator initiated, * copy all of the parameters over to your new job and run it. It can help to have * artifact publishing on. * * - Anything _after_ the next line can be tested through a normal review.
* - Change MARATHON_GROOVY_BRANCH to your branch when running the build (as a build parameter)
*/ m = load("marathon.groovy") } m.build_marathon() }

36 37 38 39 40 41 42 43 44 45 46 36 37 38 39 40 41 42 43 44 45 46
Documentation for installing and configuring the full Mesosphere stack including Mesos and Marathon is available on the [Mesosphere website](http://docs.mesosphere.com). ## Issue Tracking
Marathon uses [JIRA](https://jira.mesosphere.com/projects/MARATHON) to track issues. You can [browse](https://jira.mesosphere.com/projects/MARATHON/issues/) existing issues or [file a new issue](https://jira.mesosphere.com/secure/CreateIssue!default.jspa?pid=10401) with your GitHub account.
Marathon uses [JIRA](https://jira.mesosphere.com/projects/MARATHON) to track issues. You can [browse](https://jira.mesosphere.com/projects/MARATHON/issues/) existing issues or [file a new issue](https://jira.mesosphere.com/secure/CreateIssue!default.jspa?pid=10401) with your GitHub account.
Note for users of GitHub issues: All existing issues have been migrated and closed, and a reference to the related [JIRA](https://jira.mesosphere.com/projects/MARATHON) has been added as a comment. We leave the GitHub issues available for reference. Going forward please use [JIRA](https://jira.mesosphere.com/projects/MARATHON) always. ### Contributing
...
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112
Instructions on how to install prepackaged releases are available [in the Marathon docs](https://mesosphere.github.io/marathon/docs/). Alternatively, you can build Marathon from source. ##### Building from Source
1. To build Marathon from source, check out this repo and use sbt to build a universal:
1. To build Marathon from source, check out this repo and use sbt to build a JAR:
git clone https://github.com/mesosphere/marathon.git cd marathon
sbt run --master localhost:5050 --zk zk://localhost:2181/marathon
sbt assembly
1. Run `sbt universal:packageXzTarball` to package Marathon as an txz file containing bin/marathon fully packaged. 1. Run `sbt docker:publishLocal` for a local marathon docker image.
1. Run `./bin/build-distribution` to package Marathon as an [executable JAR](https://mesosphere.com/blog/2013/12/07/executable-jars/) (optional).
### Running in Development Mode Mesos local mode allows you to run Marathon without launching a full Mesos cluster. It is meant for experimentation and not recommended for production use. Note that you still need to run ZooKeeper for storing state. The following command launches Marathon on Mesos in *local mode*. Point your web browser to `http://localhost:8080` to see the Marathon UI.
mesos-local sbt 'run --master localhost:5050 --zk zk://localhost:2181/marathon'
./bin/start --master local --zk zk://localhost:2181/marathon
For more information on how to run Marathon in production and configuration options, see [the Marathon docs](https://mesosphere.github.io/marathon/docs/). ## Developing Marathon
...
121 122 123 124 125 126 127 128 129 130 131 132 133 134 119 120 121 122 123 124 125 126 127 128 129 130
Failed to start a local cluster while loading agent flags from the environment: Flag 'work_dir' is required, but it was not provided Build it:
sbt docker:publishLocal Note the version, e.g: `[info] Built image mesosphere/marathon:1.5.0-SNAPSHOT-461-gf1cc63e` => `1.5.0-SNAPSHOT-461-gf1cc63e`
mesosVersion=$(sed -n 's/^.*MesosDebian = "\(.*\)"/\1/p' <./project/Dependencies.scala) docker build -t marathon-head --build-arg MESOS_VERSION=$mesosVersion .
A running zookeeper instance is required, if there isn't one already available, there is a docker image available for this: docker run --name some-zookeeper --restart always -d zookeeper
...
136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146
docker run --link some-zookeeper:zookeeper marathon-head --master local --zk zk://zookeeper:2181/marathon Or run it without zookeeper container:
docker run marathon:{version} --master local --zk zk://localhost:2181/marathon
docker run marathon-head --master local --zk zk://localhost:2181/marathon
If you want to inspect the contents of the Docker container:
docker run -it --entrypoint=/bin/bash marathon:{version} -s
docker run -it --entrypoint=/bin/bash marathon-head -s
### Marathon UI To develop on the web UI look into the instructions of the [Marathon UI](https://github.com/mesosphere/marathon-ui) repository.

197 198 199 200 201 202 203 204 205 206 207 208 209 197 198 199 200 201 202 203 204 205 206
val releasePattern = """^(\d+)\.(\d+)\.(\d+)$""".r val snapshotPattern = """^(\d+).(\d+)\.(\d+)-SNAPSHOT-\d+-g(\w+)""".r version.value match { case releasePattern(major, minor, patch) => s"$major.$minor.$patch" case snapshotPattern(major, minor, patch, commit) => s"$major.$minor.$patch${LocalDate.now(ZoneOffset.UTC).format(DateTimeFormatter.BASIC_ISO_DATE)}git$commit"
case v => System.err.println(s"Version '$v' is not fully supported, please update the git tags.") v
} }, daemonStdoutLogFile := None, debianChangelog in Debian := Some(baseDirectory.value / "changelog.md"), rpmRequirements in Rpm := Seq("coreutils", "unzip", "java >= 1:1.8.0"),

142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160
def report_success() { if (is_phabricator_build() && !is_submit_request()) { phabricator_test_results("pass") try {
phabricator("differential.revision.edit", """ transactions: [{type: "accept", value: true}, {type: "comment", value: "\u2714 Build of $DIFF_ID completed at $BUILD_URL"}], objectIdentifier: "D$REVISION_ID" """)
phabricator("differential.revision.edit", """ transactions: [{type: "accept", value: true}, {type: "comment", value: "\u221a Build of $DIFF_ID completed at $BUILD_URL"}], objectIdentifier: "D$REVISION_ID" """)
} catch (Exception err) {
phabricator("differential.revision.edit", """ transactions: [{type: "comment", value: "\u2174 Build of $DIFF_ID completed at $BUILD_URL"}], objectIdentifier: "D$REVISION_ID" """)
phabricator("differential.revision.edit", """ transactions: [{type: "comment", value: "\u221a Build of $DIFF_ID completed at $BUILD_URL"}], objectIdentifier: "D$REVISION_ID" """)
} } else { if (is_master_or_release()) { if (previousBuildFailed()) { slackSend(
message: "\u2714 branch `${env.BRANCH_NAME}` is green again. (<${env.BUILD_URL}|Open>)",
message: "\u2714 ̀‘̀‘branch `${env.BRANCH_NAME}` is green again. (<${env.BUILD_URL}|Open>)",
color: "good", channel: "#marathon-dev", tokenCredentialId: "f430eaac-958a-44cb-802a-6a943323a6a8") } }
...
183 184 185 186 187 188 189 190 191 192 193 183 184 185 186 187 188 189 190 191 192 193
} } else { if (is_master_or_release()) { slackSend( message: "\u2718 branch `${env.BRANCH_NAME}` failed in build `${env.BUILD_NUMBER}`. (<${env.BUILD_URL}|Open>)",
color: "warning",
color: "danger",
channel: "#marathon-dev", tokenCredentialId: "f430eaac-958a-44cb-802a-6a943323a6a8") } step([$class: 'GitHubCommitStatusSetter' , errorHandlers: [[$class: 'ShallowAnyErrorHandler']]
...
340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355
// with anyone. The directory listing isn't public anyways. profile = "aws-production" bucket = "downloads.mesosphere.io/marathon/snapshots" region = "us-east-1" upload_on_failure = true
// manage_artifacts == true will put the artifacts in snapshots/job/{pipelinename}/{branch/?}/{build_number} manage_artifacts = is_phabricator_build()
manage_artifacts = true
if (is_release_build(gitTag)) { storageClass = "STANDARD" bucket = "downloads.mesosphere.io/marathon/${gitTag}"
upload_on_failure = false manage_artifacts = false }
upload_on_failure = false manage_artifacts = false}
sh "sudo sh -c 'sha1sum target/universal/marathon-${gitTag}.txz > target/universal/marathon-${gitTag}.txz.sha1'" sh "sudo sh -c 'sha1sum target/universal/marathon-${gitTag}.zip > target/universal/marathon-${gitTag}.zip.sha1'" step([ $class: 'S3BucketPublisher', entries: [
About FluentSend Feedback