Bug 1870123 - Remove the GitHubPlugin and GithubDetailsTask. r=owlish,geckoview-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D201490
This commit is contained in:
@@ -400,22 +400,6 @@ tasks.register("listRepositories") {
|
||||
}
|
||||
}
|
||||
|
||||
tasks.register("githubBuildDetails", GithubDetailsTask) {
|
||||
text = """### Test result files
|
||||
|
||||
- [Test Coverage]({reportsUrl}/jacoco/jacocoReleaseTestReport/html/index.html)
|
||||
- [Unit Tests]({reportsUrl}/tests/testReleaseUnitTest/index.html)
|
||||
- [Android Lint]({reportsUrl}/lint-results-release.html)"""
|
||||
}
|
||||
|
||||
tasks.register("githubLintDetektDetails", GithubDetailsTask) {
|
||||
text = "### [Detekt Results Android-Components]({reportsUrl}/detekt.html)"
|
||||
}
|
||||
|
||||
tasks.register("githubLintAndroidDetails", GithubDetailsTask) {
|
||||
text = "### [Android Lint Results Android-Components]({reportsUrl}/lint-results-debug.html)"
|
||||
}
|
||||
|
||||
tasks.register("testToolsDir", Exec) {
|
||||
group = "verification"
|
||||
description = "Run tests in the tools/ directory."
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
plugins {
|
||||
id "org.gradle.kotlin.kotlin-dsl" version "4.2.1"
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
gradlePlugin {
|
||||
plugins.register("mozac.GitHubPlugin") {
|
||||
id = "mozac.GitHubPlugin"
|
||||
implementationClass = "GitHubPlugin"
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
buildCache {
|
||||
local {
|
||||
directory = new File(rootDir, '../../.build-cache')
|
||||
removeUnusedEntriesAfterDays = 30
|
||||
}
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import org.gradle.api.DefaultTask
|
||||
import org.gradle.api.Plugin
|
||||
import org.gradle.api.initialization.Settings
|
||||
import org.gradle.api.tasks.Input
|
||||
import org.gradle.api.tasks.TaskAction
|
||||
import java.io.File
|
||||
|
||||
class GitHubPlugin : Plugin<Settings> {
|
||||
override fun apply(settings: Settings) = Unit
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper to write to the "customCheckRunText.md" file for Taskcluster.
|
||||
* Taskcluster uses this file to populate the "Details" section in the GitHub Checks panel UI.
|
||||
*/
|
||||
open class GithubDetailsTask : DefaultTask() {
|
||||
|
||||
/**
|
||||
* Text to display in the Github Checks panel under "Details". Any markdown works here.
|
||||
* The text is written to a markdown file which is used by Taskcluster.
|
||||
* Links are automatically rewritten to point to the correct Taskcluster URL.
|
||||
*/
|
||||
@Input
|
||||
var text: String = ""
|
||||
|
||||
private val detailsFile = File("/builds/worker/github/customCheckRunText.md")
|
||||
private val suffix = "\n\n_(404 if compilation failed)_"
|
||||
|
||||
/**
|
||||
* Action called by Gradle that writes the "customCheckRunText.md" file.
|
||||
*/
|
||||
@TaskAction
|
||||
fun writeFile() {
|
||||
val taskId = System.getenv("TASK_ID")
|
||||
val reportsUrl = "https://firefoxci.taskcluster-artifacts.net/$taskId/0/public/reports"
|
||||
val replaced = text.replace("{reportsUrl}", reportsUrl)
|
||||
|
||||
project.mkdir("/builds/worker/github")
|
||||
detailsFile.writeText(replaced + suffix)
|
||||
}
|
||||
}
|
||||
@@ -4,13 +4,11 @@
|
||||
|
||||
pluginManagement {
|
||||
includeBuild("plugins/dependencies")
|
||||
includeBuild("plugins/github")
|
||||
includeBuild("plugins/publicsuffixlist")
|
||||
}
|
||||
|
||||
plugins {
|
||||
id 'mozac.DependenciesPlugin'
|
||||
id 'mozac.GitHubPlugin'
|
||||
}
|
||||
|
||||
ext.topsrcdir = rootProject.projectDir.absolutePath.minus("mobile/android/android-components")
|
||||
|
||||
@@ -277,18 +277,6 @@ tasks.register("listRepositories") {
|
||||
}
|
||||
}
|
||||
|
||||
tasks.register("githubTestDetails", GithubDetailsTask) {
|
||||
text = "### [Unit Test Results Fenix]({reportsUrl}/test/testFenixDebugUnitTest/index.html)"
|
||||
}
|
||||
|
||||
tasks.register("githubLintDetektDetails", GithubDetailsTask) {
|
||||
text = "### [Detekt Results Fenix]({reportsUrl}/detekt.html)"
|
||||
}
|
||||
|
||||
tasks.register("githubLintAndroidDetails", GithubDetailsTask) {
|
||||
text = "### [Android Lint Results Fenix]({reportsUrl}/lint-results-debug.html)"
|
||||
}
|
||||
|
||||
// Task to copy generated baseline profile to the app module nightly variant.
|
||||
tasks.register("copyBaselineProfile", DefaultTask) {
|
||||
doLast {
|
||||
|
||||
@@ -6,7 +6,6 @@ pluginManagement {
|
||||
includeBuild("../android-components/plugins/publicsuffixlist")
|
||||
includeBuild("../android-components/plugins/dependencies")
|
||||
includeBuild("../android-components/plugins/config")
|
||||
includeBuild("../android-components/plugins/github")
|
||||
includeBuild("./plugins/apksize")
|
||||
includeBuild("./plugins/fenixdependencies")
|
||||
}
|
||||
@@ -16,7 +15,6 @@ plugins {
|
||||
id 'FenixDependenciesPlugin'
|
||||
id "mozac.ConfigPlugin"
|
||||
id 'mozac.DependenciesPlugin'
|
||||
id 'mozac.GitHubPlugin'
|
||||
}
|
||||
|
||||
ext.topsrcdir = rootProject.projectDir.absolutePath.minus("mobile/android/fenix")
|
||||
|
||||
@@ -161,15 +161,3 @@ tasks.register("listRepositories") {
|
||||
project.repositories.each { println "Name: " + it.name + "; url: " + it.url }
|
||||
}
|
||||
}
|
||||
|
||||
tasks.register("githubTestDetails", GithubDetailsTask) {
|
||||
text = "### [Unit Test Results]({reportsUrl}/test/testFocusDebugUnitTest/index.html)"
|
||||
}
|
||||
|
||||
tasks.register("githubLintDetektDetails", GithubDetailsTask) {
|
||||
text = "### [Detekt Results Focus]({reportsUrl}/detekt.html)"
|
||||
}
|
||||
|
||||
tasks.register("githubLintAndroidDetails", GithubDetailsTask) {
|
||||
text = "### [Android Lint Results Focus]({reportsUrl}/lint-results-debug.html)"
|
||||
}
|
||||
|
||||
@@ -6,14 +6,12 @@ pluginManagement {
|
||||
includeBuild("../android-components/plugins/publicsuffixlist")
|
||||
includeBuild("../android-components/plugins/dependencies")
|
||||
includeBuild("../android-components/plugins/config")
|
||||
includeBuild("../android-components/plugins/github")
|
||||
includeBuild("./plugins/focusdependencies")
|
||||
}
|
||||
|
||||
plugins {
|
||||
id "mozac.ConfigPlugin"
|
||||
id 'mozac.DependenciesPlugin'
|
||||
id 'mozac.GitHubPlugin'
|
||||
id 'FocusDependenciesPlugin'
|
||||
}
|
||||
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
pluginManagement {
|
||||
includeBuild("${rootProject.projectDir.absolutePath}/mobile/android/android-components/plugins/dependencies")
|
||||
includeBuild("${rootProject.projectDir.absolutePath}/mobile/android/android-components/plugins/publicsuffixlist")
|
||||
includeBuild("${rootProject.projectDir.absolutePath}/mobile/android/android-components/plugins/github")
|
||||
}
|
||||
|
||||
plugins {
|
||||
id 'mozac.DependenciesPlugin'
|
||||
id 'mozac.GitHubPlugin'
|
||||
}
|
||||
|
||||
// You might think topsrcdir is '.', but that's not true when the Gradle build
|
||||
|
||||
@@ -61,7 +61,6 @@ def _get_build_gradle_paths(gradle_project):
|
||||
|
||||
file_list = [
|
||||
"mobile/android/android-components/plugins/dependencies/build.gradle",
|
||||
"mobile/android/android-components/plugins/github/build.gradle",
|
||||
"mobile/android/android-components/plugins/publicsuffixlist/build.gradle",
|
||||
f"{project_dir}/build.gradle",
|
||||
f"{project_dir}/{project_subdir}/build.gradle",
|
||||
|
||||
@@ -72,10 +72,8 @@ jobs:
|
||||
arguments:
|
||||
- mobile/android/android-components/
|
||||
- lint
|
||||
- githubLintAndroidDetails
|
||||
- ktlint
|
||||
- detekt
|
||||
- githubLintDetektDetails
|
||||
resources:
|
||||
# TODO: Make focus lint tasks use their own gradle deps tasks
|
||||
- mobile/android/focus-android/plugins/focusdependencies/src/main/java/FocusDependenciesPlugin.kt
|
||||
@@ -87,10 +85,8 @@ jobs:
|
||||
arguments:
|
||||
- mobile/android/fenix/
|
||||
- lint
|
||||
- githubLintAndroidDetails
|
||||
- ktlint
|
||||
- detekt
|
||||
- githubLintDetektDetails
|
||||
- mozilla-detekt-rules:test
|
||||
- mozilla-lint-rules:test
|
||||
resources:
|
||||
|
||||
@@ -6,7 +6,7 @@ job-defaults:
|
||||
description: 'Run detekt over all modules'
|
||||
run:
|
||||
using: gradlew
|
||||
gradlew: ['detekt', 'githubLintDetektDetails']
|
||||
gradlew: ['detekt']
|
||||
use-caches: false
|
||||
worker:
|
||||
artifacts:
|
||||
@@ -74,7 +74,7 @@ detekt-fenix:
|
||||
run:
|
||||
pre-gradlew:
|
||||
- ["cd", "mobile/android/fenix"]
|
||||
gradlew: [detekt, githubLintDetektDetails, 'mozilla-detekt-rules:test']
|
||||
gradlew: [detekt, 'mozilla-detekt-rules:test']
|
||||
treeherder:
|
||||
symbol: detekt(fenix)
|
||||
worker:
|
||||
|
||||
@@ -6,7 +6,7 @@ job-defaults:
|
||||
description: 'Run lint over all modules'
|
||||
run:
|
||||
using: gradlew
|
||||
gradlew: ['lint', 'githubLintAndroidDetails']
|
||||
gradlew: ['lint']
|
||||
use-caches: false
|
||||
worker:
|
||||
artifacts:
|
||||
@@ -64,6 +64,6 @@ fenix:
|
||||
run:
|
||||
pre-gradlew:
|
||||
- ["cd", "mobile/android/fenix"]
|
||||
gradlew: ['lintDebug', 'githubLintAndroidDetails', 'mozilla-lint-rules:test']
|
||||
gradlew: ['lintDebug', 'mozilla-lint-rules:test']
|
||||
treeherder:
|
||||
symbol: lint(fenix)
|
||||
|
||||
Reference in New Issue
Block a user