From commits-return-116-archive-asf-public=cust-asf.ponee.io@zipkin.apache.org Wed Jan 30 17:41:47 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 12BD71807B5 for ; Wed, 30 Jan 2019 18:41:44 +0100 (CET) Received: (qmail 47891 invoked by uid 500); 30 Jan 2019 17:41:44 -0000 Mailing-List: contact commits-help@zipkin.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@zipkin.apache.org Delivered-To: mailing list commits@zipkin.apache.org Received: (qmail 47829 invoked by uid 99); 30 Jan 2019 17:41:44 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Jan 2019 17:41:44 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id BF2A78573A; Wed, 30 Jan 2019 17:41:42 +0000 (UTC) Date: Wed, 30 Jan 2019 17:41:55 +0000 To: "commits@zipkin.apache.org" Subject: [incubator-zipkin-brave-karaf] 14/42: build-support MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit From: abesto@apache.org In-Reply-To: <154887010170.21089.15625992168469906328@gitbox.apache.org> References: <154887010170.21089.15625992168469906328@gitbox.apache.org> X-Git-Host: gitbox.apache.org X-Git-Repo: incubator-zipkin-brave-karaf X-Git-Refname: refs/heads/test-jenkins-github-integration X-Git-Reftype: branch X-Git-Rev: b79823a3e7c72eb9bfb27a7e5d2a3c3fae879dc1 X-Git-NotificationType: diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated Message-Id: <20190130174142.BF2A78573A@gitbox.apache.org> This is an automated email from the ASF dual-hosted git repository. abesto pushed a commit to branch test-jenkins-github-integration in repository https://gitbox.apache.org/repos/asf/incubator-zipkin-brave-karaf.git commit b79823a3e7c72eb9bfb27a7e5d2a3c3fae879dc1 Author: Christian Schneider AuthorDate: Thu Jul 6 11:58:53 2017 +0200 build-support --- build-support/go-offline.sh | 34 ++++++++++++ build-support/pom-no-crossmodule-dependencies.xsl | 26 +++++++++ build-support/publish-snapshot.sh | 23 ++++++++ build-support/publish-stable.sh | 21 ++++++++ build-support/trigger-publish.sh | 38 +++++++++++++ circle.yml | 65 +++++++++++++++++++++++ 6 files changed, 207 insertions(+) diff --git a/build-support/go-offline.sh b/build-support/go-offline.sh new file mode 100755 index 0000000..908a863 --- /dev/null +++ b/build-support/go-offline.sh @@ -0,0 +1,34 @@ +#!/bin/bash +# +# Copyright 2016 The OpenZipkin Authors +# +# 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. +# + +# Due to https://issues.apache.org/jira/browse/MDEP-323 and cross-module dependencies, +# we can't easily run mvn dependency:go-offline. This is a workaround for that. +# It removes all dependencies on io.zipkin.java and ${project.groupId} using XSLT, +# then runs go-offline on the resulting POMs. + +set -xeuo pipefail + +rm -rf go-offline-builddir +mkdir -p go-offline-builddir +trap "rm -rf $(pwd)/go-offline-builddir" EXIT + +for f in $(find . -name 'pom.xml'); do + echo $f + mkdir -p $(dirname go-offline-builddir/$f) + xsltproc ./build-support/pom-no-crossmodule-dependencies.xsl $f > go-offline-builddir/$f +done + +cd go-offline-builddir +../mvnw dependency:go-offline diff --git a/build-support/pom-no-crossmodule-dependencies.xsl b/build-support/pom-no-crossmodule-dependencies.xsl new file mode 100644 index 0000000..1eab405 --- /dev/null +++ b/build-support/pom-no-crossmodule-dependencies.xsl @@ -0,0 +1,26 @@ + + + + + + + + + + + + diff --git a/build-support/publish-snapshot.sh b/build-support/publish-snapshot.sh new file mode 100755 index 0000000..169b870 --- /dev/null +++ b/build-support/publish-snapshot.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash +# +# Copyright 2016-2017 The OpenZipkin Authors +# +# 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. +# + +set -euo pipefail +set -x + +if ./mvnw help:evaluate -N -Dexpression=project.version | grep -v '\[' | grep -q SNAPSHOT; then + ./mvnw --batch-mode -s ./.settings.xml -Prelease -nsu -DskipTests -pl deploy +else + echo "Not building release versions, those are built by the tag builder using the publish-stable.sh script" +fi diff --git a/build-support/publish-stable.sh b/build-support/publish-stable.sh new file mode 100755 index 0000000..e5724e3 --- /dev/null +++ b/build-support/publish-stable.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash +# +# Copyright 2016 The OpenZipkin Authors +# +# 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. +# + +set -euo pipefail +set -x + +./mvnw -DskipTests install -nsu +./mvnw --batch-mode -s ./.settings.xml -Prelease -nsu -DskipTests -pl deploy +./mvnw --batch-mode -s ./.settings.xml -nsu -N io.zipkin.centralsync-maven-plugin:centralsync-maven-plugin:sync diff --git a/build-support/trigger-publish.sh b/build-support/trigger-publish.sh new file mode 100755 index 0000000..04bcd80 --- /dev/null +++ b/build-support/trigger-publish.sh @@ -0,0 +1,38 @@ +#!/usr/bin/env bash +# +# Copyright 2016 The OpenZipkin Authors +# +# 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. +# + +set -euo pipefail +set -x + +release_version() { + echo "${CIRCLE_TAG}" | sed 's/^release-//' +} + +safe_checkout_master() { + # We need to be on a branch for release:perform to be able to create commits, and we want that branch to be master. + # But we also want to make sure that we build and release exactly the tagged version, so we verify that the remote + # master is where our tag is. + git checkout -B master + git fetch origin master:origin/master + commit_local_master="$(git show --pretty='format:%H' master)" + commit_remote_master="$(git show --pretty='format:%H' origin/master)" + if [ "$commit_local_master" != "$commit_remote_master" ]; then + echo "Master on remote 'origin' has commits since the version under release, aborting" + exit 1 + fi +} + +safe_checkout_master +./mvnw --batch-mode -s ./.settings.xml -Prelease -nsu -DreleaseVersion="$(release_version)" -Darguments="-DskipTests" release:prepare diff --git a/circle.yml b/circle.yml new file mode 100644 index 0000000..aa6c311 --- /dev/null +++ b/circle.yml @@ -0,0 +1,65 @@ +# +# Copyright 2016-2017 The OpenZipkin Authors +# +# 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. +# + +machine: + java: + version: openjdk8 + services: + - mysql + environment: + MYSQL_USER: root + +dependencies: + override: + - sudo apt-get install xsltproc + - ./build-support/go-offline.sh + +test: + override: + - ./mvnw verify + post: + # parameters used during release + # allocate commits to CI, not the owner of the deploy key + - git config user.name "zipkinci" + - git config user.email "zipkinci+zipkin-dev@googlegroups.com" + # setup https authentication credentials, used by ./mvnw release:prepare + - git config credential.helper "store --file=.git/credentials" + - echo "https://$GH_TOKEN:@github.com" > .git/credentials + # copy test reports to CircleCI test reports directory + - mkdir -p $CIRCLE_TEST_REPORTS/junit/ + - find . -type f -regex ".*/target/surefire-reports/.*xml" -exec cp {} $CIRCLE_TEST_REPORTS/junit/ \; + +# Send notifications to Gitter +notify: + webhooks: + - url: https://webhooks.gitter.im/e/22adbb9973299092e6ae + +deployment: + trigger: + owner: openzipkin + tag: /release-\d+\.\d+\.\d+/ + commands: + - ./build-support/trigger-publish.sh + publish-stable: + owner: openzipkin + tag: /\d+\.\d+\.\d+/ + # triples the timeout to 30 minutes as maven central sync takes a lot longer than 10m + commands: + - ./build-support/publish-stable.sh: + timeout: 1800 + publish-snapshot: + owner: openzipkin + branch: master + commands: + - ./build-support/publish-snapshot.sh