This is an automated email from the ASF dual-hosted git repository.
yhu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/master by this push:
new fbc00451c3a Fix buildx always enabled (#35361)
fbc00451c3a is described below
commit fbc00451c3a00c43723b6465051c01ed0421a569
Author: Yi Hu <[email protected]>
AuthorDate: Tue Jun 24 10:17:19 2025 -0400
Fix buildx always enabled (#35361)
Remove obsolete jenkins plugin
---
.../workflows/beam_PreCommit_Flink_Container.yml | 2 +-
.../org/apache/beam/gradle/BeamDockerPlugin.groovy | 6 +--
.../apache/beam/gradle/BeamJenkinsPlugin.groovy | 56 ----------------------
.../org/apache/beam/gradle/BeamModulePlugin.groovy | 8 ++--
4 files changed, 5 insertions(+), 67 deletions(-)
diff --git a/.github/workflows/beam_PreCommit_Flink_Container.yml
b/.github/workflows/beam_PreCommit_Flink_Container.yml
index e29ba956991..f21e1639b4a 100644
--- a/.github/workflows/beam_PreCommit_Flink_Container.yml
+++ b/.github/workflows/beam_PreCommit_Flink_Container.yml
@@ -125,7 +125,7 @@ jobs:
-PpythonVersion=${{ env.PYTHON_VERSION }} \
-Pdocker-repository-root=${{ env.DOCKER_REPOSITORY_ROOT }} \
-Pdocker-tag=${{ env.PYTHON_SDK_IMAGE_TAG }} \
- -PuseBuildx \
+ -PuseDockerBuildx \
-Ppush-containers
- name: Prepare test arguments
uses: ./.github/actions/test-arguments-action
diff --git
a/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamDockerPlugin.groovy
b/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamDockerPlugin.groovy
index b3949223f07..e73d4f1b22d 100644
--- a/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamDockerPlugin.groovy
+++ b/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamDockerPlugin.groovy
@@ -242,11 +242,7 @@ class BeamDockerPlugin implements Plugin<Project> {
if (ext.builder != null) {
buildCommandLine.addAll('--builder', ext.builder)
}
- // Jenkins dependencies aren't up to date enough to accept this flag.
- // Temporarily exclude until we fully move to GHA.
- if (!ext.project.jenkins.isCIBuild) {
- buildCommandLine.addAll('--provenance=false')
- }
+ buildCommandLine.addAll('--provenance=false')
} else {
buildCommandLine.add 'build'
// TARGETOS and TARGETARCH args not present through `docker build`, add
here
diff --git
a/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamJenkinsPlugin.groovy
b/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamJenkinsPlugin.groovy
deleted file mode 100644
index 774c5c82cf4..00000000000
--- a/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamJenkinsPlugin.groovy
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- */
-
-package org.apache.beam.gradle
-
-import org.gradle.api.Plugin
-import org.gradle.api.Project
-
-/**
- * This plugin checks if build is executed on jenkins server and provides a
flag to switch
- * configuration accordingly. This is done by check system environment for
existence of the
- * variables ('HUDSON_HOME', 'BUILD_ID' and 'BUILD_NUMBER'). This behaviour
can be overridden
- * by setting {@code -PciBuild=false} or {@code -PciBuild=true} respectively.
- *
- * <p>Example usage:
- *
- * <pre>
- * apply plugin: org.apache.beam.gradle.BeamJenkinsPlugin
- *
- * tasks.withType(SpotBugs) {
- * reports {
- * html.enabled = !jenkins.isCIBuild
- * xml.enabled = jenkins.isCIBuild
- * }
- * }
- * </pre>
- */
-class BeamJenkinsPlugin implements Plugin<Project> {
-
- @Override
- void apply(Project project) {
- def extension = project.extensions.create('jenkins',
JenkinsPluginExtension)
- extension.isCIBuild = project.findProperty("ciBuild")?.toBoolean() ?:
- // try to deduce from system env. if all variables are set, we
probably on jenkins
- (System.env['HUDSON_HOME'] && System.env['BUILD_ID'] &&
System.env['BUILD_NUMBER'])
- }
-
- static class JenkinsPluginExtension {
- Boolean isCIBuild
- }
-}
diff --git
a/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy
b/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy
index 703f07ab3af..9c44b526a1b 100644
--- a/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy
+++ b/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy
@@ -510,8 +510,6 @@ class BeamModulePlugin implements Plugin<Project> {
project.apply plugin: 'base'
project.archivesBaseName = defaultArchivesBaseName(project)
- project.apply plugin: 'org.apache.beam.jenkins'
-
// Register all Beam repositories and configuration tweaks
Repositories.register(project)
@@ -579,7 +577,7 @@ class BeamModulePlugin implements Plugin<Project> {
}
project.ext.useBuildx = {
- return (project.containerArchitectures() !=
[project.nativeArchitecture()]) || project.rootProject.hasProperty("useBuildx")
+ return (project.containerArchitectures() !=
[project.nativeArchitecture()]) ||
project.rootProject.hasProperty("useDockerBuildx")
}
/**
***********************************************************************************************/
@@ -1459,8 +1457,8 @@ class BeamModulePlugin implements Plugin<Project> {
}
project.tasks.withType(com.github.spotbugs.snom.SpotBugsTask) {
reports {
- html.enabled = !project.jenkins.isCIBuild
- xml.enabled = project.jenkins.isCIBuild
+ html.enabled = true
+ xml.enabled = false
}
}
}