Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add gradle task for publishing to downloads page #427

Merged
merged 4 commits into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions gradle/root/publishing.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,25 @@ def publishDownloadsTask = tasks.register('publishDownloads', PublishToRawRepoTa

publish.dependsOn publishDownloadsTask

def publishReleaseInfoAndLatestTask = tasks.register('publishReleaseInfoAndLatest', PublishToRawRepoTask) {
group = 'publishing'
description = 'Publish release_info.json and startup/latest.xml to Nexus downloads.'
host = 'https://artifacts.unidata.ucar.edu/'
repoName = 'downloads-tds'

publishSrc = new File(rootProject.getProjectDir(), "project-files/downloads/")

onlyIf {
// Will be evaluated at task execution time, not during configuration.
// Fails the build if the specified properties haven't been provided.
username = getPropertyOrFailBuild NEXUS_USERNAME_KEY
password = getPropertyOrFailBuild NEXUS_PASSWORD_KEY
return true
}
}

publish.dependsOn publishReleaseInfoAndLatestTask

// The "publish" tasks require credentials for our Nexus server, which they look for in Gradle properties.
// If those properties (i.e. NEXUS_USERNAME_KEY and NEXUS_PASSWORD_KEY) haven't been provided, the build will fail.
// Therefore, we only want to configure credentials when a "publish" task is part of the execution plan. Otherwise,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,10 @@
"SHA256": "tdm-5.5-SNAPSHOT.jar.sha256"
},
"info": "THREDDS Data Manager (TDM) for the latest snapshot release (version 5.5 SNAPSHOT) "
},
"thredds_iso_jar": {
"baseURL": "https://artifacts.unidata.ucar.edu/repository/downloads-tds/5.5/",
"type": "library",
"package": "tds-plugin-2.4.6-SNAPSHOT-jar-with-dependencies.jar",
"name": "THREDDS ISO Plugin (Jar file)",
"hash": {
"MD5": "tds-plugin-2.4.6-SNAPSHOT-jar-with-dependencies.jar.md5",
"SHA1": "tds-plugin-2.4.6-SNAPSHOT-jar-with-dependencies.jar.sha1",
"SHA256": "tds-plugin-2.4.6-SNAPSHOT-jar-with-dependencies.jar.sha256"
},
"info": "THREDDS Data Manager (TDM) for the latest snapshot release (version 5.5 SNAPSHOT) "
}
}
}, {
},
{
"version": "5.4",
"releaseDate": "2022-07-01",
"status": "current",
Expand Down