You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2020/12/01 01:41:10 UTC
[groovy-release] branch master updated (8ddf683 -> a27790d)
This is an automated email from the ASF dual-hosted git repository.
paulk pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/groovy-release.git.
from 8ddf683 we forgot to update adhoc build when upgrading grgit version
new 2534b35 add --no-build-cache when building for release
new 239ca3c 2.5+ specific tweak
new a27790d adjustments for Groovy 4 build
The 3 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:
gradle/phase1.gradle | 32 +++++++++++++++++++++++++++-----
gradle/phase2.gradle | 43 ++++++++++++++++++++++++++++++++++---------
2 files changed, 61 insertions(+), 14 deletions(-)
[groovy-release] 03/03: adjustments for Groovy 4 build
Posted by pa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
paulk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy-release.git
commit a27790d9843f39e824a9783959f0ff2c4bbd5f24
Author: Paul King <pa...@asert.com.au>
AuthorDate: Tue Dec 1 11:41:00 2020 +1000
adjustments for Groovy 4 build
---
gradle/phase1.gradle | 31 +++++++++++++++++++++++++------
1 file changed, 25 insertions(+), 6 deletions(-)
diff --git a/gradle/phase1.gradle b/gradle/phase1.gradle
index bc220b7..07cea61 100644
--- a/gradle/phase1.gradle
+++ b/gradle/phase1.gradle
@@ -138,7 +138,7 @@ task updateVersionProperties(dependsOn: [assumesPropsSet, createReleaseBranch])
}
// use Exec rather the GradleBuild to ensure we use the correct gradle version for the groovy version being built
-task buildAndUpload(type: Exec, dependsOn: [assumesPropsSet, updateVersionProperties, checkCompatibility]) {
+task buildAndUploadStep1(type: Exec, dependsOn: [assumesPropsSet, updateVersionProperties, checkCompatibility]) {
group = "Pre-vote phase"
description = "Builds Apache Groovy and publishes the Maven artifacts to the staging repository on Bintray"
workingDir stagingDir
@@ -154,7 +154,7 @@ task buildAndUpload(type: Exec, dependsOn: [assumesPropsSet, updateVersionProper
if (!relVersion.startsWith('2.4')) {
theArgs << '--no-build-cache'
}
- theArgs << "-PartifactoryContext=https://groovy.jfrog.io/groovy/" // apache-groovy for Groovy 4
+ theArgs << "-PartifactoryContext=https://groovy.jfrog.io/groovy/"
theArgs << "-PartifactoryRepoKey=${releaseBuild ? 'libs-release-local' : 'libs-snapshot-local'}"
if (project.hasProperty('skipPublish')) {
theArgs += ['install', 'dist']
@@ -164,7 +164,27 @@ task buildAndUpload(type: Exec, dependsOn: [assumesPropsSet, updateVersionProper
commandLine theArgs
}
-task cleanSvnDevWorkspace(type: Delete, dependsOn: [assumesBranch, buildAndUpload]) {
+// use Exec rather the GradleBuild to ensure we use the correct gradle version for the groovy version being built
+task uploadStep2(type: Exec, dependsOn: [buildAndUploadStep1]) {
+ group = "Pre-vote phase"
+ description = "Publishes the Maven artifacts to the Apache staging repository"
+ workingDir stagingDir
+ if (relVersion.startsWith('4.0')) {
+ ext.theArgs = []
+ if (Os.isFamily(Os.FAMILY_WINDOWS)) {
+ theArgs += ['cmd', '/C', 'gradlew.bat']
+ } else {
+ theArgs += ['sh', './gradlew']
+ }
+ if (!relVersion.startsWith('2.4')) {
+ theArgs << '--no-build-cache'
+ }
+ theArgs += ['publishAllPublicationsToApacheRepoRepository']
+ commandLine theArgs
+ }
+}
+
+task cleanSvnDevWorkspace(type: Delete, dependsOn: [assumesBranch, uploadStep2]) {
delete devWorkspaceRoot
}
@@ -176,14 +196,14 @@ task prepareSvnDevWorkspace(type: SvnCheckout, dependsOn: [assumesBranch, cleanS
task copySvnDistro(type: Copy, dependsOn: [assumesPropsSet, prepareSvnDevWorkspace]) {
description = "Creates the required tree structure for distribution"
- from("$stagingDir/target/distributions")
+ from(relVersion.startsWith('4.0') ? "$stagingDir/subprojects/groovy-binary/build/distributions" : "$stagingDir/target/distributions")
into "$devWorkspace/distribution"
exclude 'apache-groovy-src-*'
}
task copySvnSources(type: Copy, dependsOn: [assumesPropsSet, prepareSvnDevWorkspace]) {
description = "Creates the required tree structure for sources"
- from("$stagingDir/target/distributions")
+ from(relVersion.startsWith('4.0') ? "$stagingDir/subprojects/groovy-binary/build/distributions" : "$stagingDir/target/distributions")
into "$devWorkspace/sources"
include 'apache-groovy-src-*'
}
@@ -224,7 +244,6 @@ task createAndPushTag(dependsOn: [assumesPropsSet, checkDevWorkspaceVersion]) {
group = "Pre-vote phase"
description = "Creates a release tag and pushes it to the Apache Git repository"
doLast {
-// def apacheCredentials = new Credentials(username: apacheUser, password: apachePassword)
def apacheCredentials = new Credentials(apacheUser, apachePassword)
def grgit = grgitClass.open(dir: stagingDir, creds: apacheCredentials)
def tagName = "GROOVY_$underVersion"
[groovy-release] 01/03: add --no-build-cache when building for
release
Posted by pa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
paulk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy-release.git
commit 2534b35e34b11f591a181ea6286ebbce4f02313c
Author: Paul King <pa...@asert.com.au>
AuthorDate: Fri Mar 6 16:47:20 2020 +1000
add --no-build-cache when building for release
---
gradle/phase1.gradle | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gradle/phase1.gradle b/gradle/phase1.gradle
index 122c40b..ba2990d 100644
--- a/gradle/phase1.gradle
+++ b/gradle/phase1.gradle
@@ -151,7 +151,8 @@ task buildAndUpload(type: Exec, dependsOn: [assumesPropsSet, updateVersionProper
if (project.hasProperty('useAntlr4')) {
theArgs << "-PuseAntlr4=${getProperty('useAntlr4')}"
}
- theArgs << "-PartifactoryContext=https://groovy.jfrog.io/groovy/"
+ theArgs << '--no-build-cache'
+ theArgs << "-PartifactoryContext=https://groovy.jfrog.io/groovy/" // apache-groovy for Groovy 4
theArgs << "-PartifactoryRepoKey=${releaseBuild ? 'libs-release-local' : 'libs-snapshot-local'}"
if (project.hasProperty('skipPublish')) {
theArgs += ['install', 'dist']
[groovy-release] 02/03: 2.5+ specific tweak
Posted by pa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
paulk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy-release.git
commit 239ca3c257010fbc44fd7e5223ebbaf3a32377a9
Author: Paul King <pa...@asert.com.au>
AuthorDate: Mon Nov 30 22:20:34 2020 +1000
2.5+ specific tweak
---
gradle/phase1.gradle | 4 +++-
gradle/phase2.gradle | 43 ++++++++++++++++++++++++++++++++++---------
2 files changed, 37 insertions(+), 10 deletions(-)
diff --git a/gradle/phase1.gradle b/gradle/phase1.gradle
index ba2990d..bc220b7 100644
--- a/gradle/phase1.gradle
+++ b/gradle/phase1.gradle
@@ -151,7 +151,9 @@ task buildAndUpload(type: Exec, dependsOn: [assumesPropsSet, updateVersionProper
if (project.hasProperty('useAntlr4')) {
theArgs << "-PuseAntlr4=${getProperty('useAntlr4')}"
}
- theArgs << '--no-build-cache'
+ if (!relVersion.startsWith('2.4')) {
+ theArgs << '--no-build-cache'
+ }
theArgs << "-PartifactoryContext=https://groovy.jfrog.io/groovy/" // apache-groovy for Groovy 4
theArgs << "-PartifactoryRepoKey=${releaseBuild ? 'libs-release-local' : 'libs-snapshot-local'}"
if (project.hasProperty('skipPublish')) {
diff --git a/gradle/phase2.gradle b/gradle/phase2.gradle
index 5cfd88d..7cc0a53 100644
--- a/gradle/phase2.gradle
+++ b/gradle/phase2.gradle
@@ -4,6 +4,7 @@ import at.bxm.gradleplugins.svntools.tasks.SvnCheckout
import at.bxm.gradleplugins.svntools.tasks.SvnCommit
import at.bxm.gradleplugins.svntools.tasks.SvnDelete
import groovyx.net.http.RESTClient
+import groovyx.net.http.HttpResponseException
import org.ajoberstar.grgit.Credentials
import static groovyx.net.http.ContentType.*
@@ -98,7 +99,8 @@ task promoteOnBintray(dependsOn: jiraCheckPhase2) {
def build = builds.find {
resp = artifactory.get(path: 'api/build/groovy/' + it.uri, contentType: JSON)
assert resp.status == 200
- def coreModuleId = resp.data.buildInfo.modules*.id.find{ it.startsWith('org.codehaus.groovy:groovy:') }
+// def coreModuleId = resp.data.buildInfo.modules*.id.find{ it.startsWith('org.codehaus.groovy:groovy:') } // apache
+ def coreModuleId = resp.data.buildInfo.modules*.id.find{ it.startsWith('org.apache.groovy:groovy:') } // apache
def found = coreModuleId?.endsWith(':' + relVersion)
println "${found ? 'FOUND' : 'SKIPPING'} $coreModuleId @ ${it.uri}"
found
@@ -124,8 +126,29 @@ task promoteOnBintray(dependsOn: jiraCheckPhase2) {
}
}
-sdkReleaseVersion.dependsOn promoteOnBintray
-
+task waitForBintrayPublication(dependsOn: [promoteOnBintray]) {
+ group = "Post-passed phase"
+ description = "Polls the Bintray website to check if it is released"
+ doLast {
+ def found = false
+ def delay = 30000 // 1/2 a minute
+ def numTries = 60 // wait for up to 30 mins
+ while (!found && numTries-- > 0) {
+ def bintraysite = new RESTClient('https://dl.bintray.com/')
+ def resp = null
+ try {
+ resp = bintraysite.head(path: "groovy/maven/apache-groovy-sdk-${relVersion}.zip")
+ } catch(HttpResponseException ignore) {}
+ if (resp?.status == 200) {
+ found = true
+ } else {
+ sleep delay
+ }
+ }
+ assert found, 'Timed out waiting for bintray publish/sync - please check manually'
+ }
+}
+sdkReleaseVersion.dependsOn waitForBintrayPublication
task synchronizeWithMavenCentral(dependsOn: promoteOnBintray) {
group = "Post-passed phase"
@@ -136,14 +159,14 @@ Synchronizing with Maven central. This may take a few minutes ...
If this fails, log on to https://oss.sonatype.org/ using the centralUser credentials
and progress through process manually -> Close -> Publish ... under staging repositories
"""
- def bintray = new RESTClient('https://api.bintray.com/maven_central_sync/groovy/maven/')
+ def bintray = new RESTClient('https://api.bintray.com/maven_central_sync/groovy/maven/') // apache-groovy?
bintray.headers['Authorization'] = 'Basic ' + "$bintrayUser:$bintrayKey".getBytes('iso-8859-1').encodeBase64()
def body = /{
"username" : "${project.findProperty('centralUser')}",
"password" : "${project.findProperty('centralKey')}"
}/
def resp = bintray.post(
- path: "groovy/versions/$relVersion",
+ path: "groovy/versions/$relVersion", // apache-groovy?
body: body,
requestContentType: JSON
)
@@ -163,7 +186,8 @@ task publishZipsOnBintray(dependsOn: [jiraCheckPhase2, assumesRelVersion]) {
fileTree("$stagingDir/target/distributions").files.each { File f ->
println "Uploading $f.name"
def resp = bintray.put(
- path: "groovy/$relVersion/${f.name}",
+ path: "groovy/$relVersion/${f.name}", // apache-groovy?
+// path: "apache-groovy/$relVersion/${f.name}", // apache-groovy
body: f.bytes,
requestContentType: BINARY
)
@@ -237,7 +261,7 @@ task uploadDocumentationToGroovyWebsite() {
execute "rm -rf /var/www/docs/docs/groovy-${relVersion}/"
execute "unzip -d /var/www/docs/docs/ /var/www/docs/docs/apache-groovy-docs-${relVersion}.zip"
execute "chmod 664 /var/www/docs/docs/apache-groovy-docs-${relVersion}.zip"
- execute "chgrp -R teamcity /var/www/docs/docs/groovy-${relVersion}/"
+// execute "chgrp -R teamcity /var/www/docs/docs/groovy-${relVersion}/"
// execute "chown -R teamcity /var/www/docs/docs/groovy-${relVersion}/"
execute "rm /var/www/docs/docs/apache-groovy-docs-${relVersion}.zip"
}
@@ -279,8 +303,8 @@ task maybeUpdateDocumentationSymlink(dependsOn: findGroovyVersions) {
ssh.run {
session(remotes.ciServer) {
execute 'uname -a'
- execute "cd /var/www/docs/docs; ln -s -f -T groovy-$relVersion latest"
- execute "chgrp -h teamcity /var/www/docs/docs/latest"
+ execute "cd /var/www/docs/docs; ln -s -f -T groovy-$relVersion latest; ln -s -f -T groovy-$relVersion groovy-latest"
+// execute "chgrp -h teamcity /var/www/docs/docs/latest"
// execute "chown -h teamcity /var/www/docs/docs/latest"
}
}
@@ -367,6 +391,7 @@ task createNextVersionInJira(dependsOn: [jiraCheckPhase2]) {
def body = /{ "name": "$nextVersion", "project": "GROOVY", "projectId": $projectId }/
resp = jira.post(path: "version", body: body, requestContentType: JSON)
assert resp.status == 201
+ println resp.data.message
}
}
}