You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by nd...@apache.org on 2023/06/19 11:15:59 UTC

[hbase-kustomize] branch main updated: HBASE-27935 Introduce Jenkins PR job for hbase-kustomize (addendum)

This is an automated email from the ASF dual-hosted git repository.

ndimiduk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/hbase-kustomize.git


The following commit(s) were added to refs/heads/main by this push:
     new dd6b2a1  HBASE-27935 Introduce Jenkins PR job for hbase-kustomize (addendum)
dd6b2a1 is described below

commit dd6b2a1c792c37bacd51742ae3768f5a7f81e758
Author: Nick Dimiduk <nd...@apache.org>
AuthorDate: Fri Jun 16 11:21:14 2023 +0200

    HBASE-27935 Introduce Jenkins PR job for hbase-kustomize (addendum)
    
    - add executable permissions to the shell scripts.
    - disable docker buildkit in yetus.
    - use Yetus's default dockerfile
    - make yetus a little more forgiving
    - correct pass-through of github credentials
    - address yetus nits
    - enable writing comments back to the PR (access doesn't permissions don't allow writing to Checks
      API ?)
    
    Signed-off-by: Sean Busbey <bu...@apache.org>
---
 .yetus/detsecrets-ignored-hashes.txt               | 18 ++++++++
 dev-support/jenkins/Dockerfile                     | 49 ----------------------
 dev-support/jenkins/Jenkinsfile                    |  4 +-
 dev-support/jenkins/gather_machine_environment.sh  |  0
 .../jenkins/jenkins_precommit_github_yetus.sh      | 21 ++++++----
 5 files changed, 31 insertions(+), 61 deletions(-)

diff --git a/.yetus/detsecrets-ignored-hashes.txt b/.yetus/detsecrets-ignored-hashes.txt
new file mode 100644
index 0000000..f0d57d3
--- /dev/null
+++ b/.yetus/detsecrets-ignored-hashes.txt
@@ -0,0 +1,18 @@
+# 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.
+
+# the word `GITHUB_TOKEN`
+c267b646441a206d44803d8cb20896c4a166cac2
diff --git a/dev-support/jenkins/Dockerfile b/dev-support/jenkins/Dockerfile
deleted file mode 100644
index 0fdc6cc..0000000
--- a/dev-support/jenkins/Dockerfile
+++ /dev/null
@@ -1,49 +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.
-
-# Dockerfile for hbase-operator-tools pre-commit build.
-# https://ci-hbase.apache.org/job/HBase-Operator-Tools-PreCommit/
-
-ARG IMG_BASE='ubuntu'
-ARG IMG_BASE_TAG='22.04'
-
-FROM hadolint/hadolint:latest-debian as hadolint
-
-FROM ${IMG_BASE}:${IMG_BASE_TAG} as final
-ARG IMG_BASE
-ARG IMG_BASE_TAG
-
-SHELL ["/bin/bash", "-o", "pipefail", "-c"]
-
-# hadolint ignore=DL3008
-RUN apt-get -q update && apt-get -q install --no-install-recommends -y \
-       binutils \
-       git \
-       rsync \
-       shellcheck \
-       wget && \
-    apt-get clean && \
-    rm -rf /var/lib/apt/lists/*
-
-COPY --from=hadolint /bin/hadolint /bin/hadolint
-
-CMD ["/bin/bash"]
-
-###
-# Everything past this point is either not needed for testing or breaks Yetus.
-# So tell Yetus not to read the rest of the file:
-# YETUS CUT HERE
-###
diff --git a/dev-support/jenkins/Jenkinsfile b/dev-support/jenkins/Jenkinsfile
index 6d31cf5..a81f816 100644
--- a/dev-support/jenkins/Jenkinsfile
+++ b/dev-support/jenkins/Jenkinsfile
@@ -36,7 +36,6 @@ pipeline {
         YETUS_REL = 'yetus'
         // Branch or tag name.  Yetus release tags are 'rel/X.Y.Z'
         YETUS_VERSION = 'rel/0.14.1'
-        DOCKERFILE_REL = "${SRC_REL}/dev-support/jenkins/Dockerfile"
         YETUS_DRIVER_REL = "${SRC_REL}/dev-support/jenkins/jenkins_precommit_github_yetus.sh"
         ARCHIVE_PATTERN_LIST = 'TEST-*.xml'
         BUILD_URL_ARTIFACTS = "artifact/${WORKDIR_REL}/${PATCH_REL}"
@@ -44,7 +43,6 @@ pipeline {
         WORKDIR = "${WORKSPACE}/${WORKDIR_REL}"
         SOURCEDIR = "${WORKDIR}/${SRC_REL}"
         PATCHDIR = "${WORKDIR}/${PATCH_REL}"
-        DOCKERFILE = "${WORKDIR}/${DOCKERFILE_REL}"
         YETUS_DRIVER = "${WORKDIR}/${YETUS_DRIVER_REL}"
         YETUSDIR = "${WORKDIR}/${YETUS_REL}"
         PLUGINS = 'all'
@@ -73,7 +71,7 @@ pipeline {
                     withCredentials([
                       usernamePassword(
                         credentialsId: 'apache-hbase-at-github.com',
-                        passwordVariable: 'GITHUB_PASSWORD',
+                        passwordVariable: 'GITHUB_TOKEN',
                         usernameVariable: 'GITHUB_USER'
                       )]) {
                         sh label: 'test-patch', script: '''#!/bin/bash -e
diff --git a/dev-support/jenkins/gather_machine_environment.sh b/dev-support/jenkins/gather_machine_environment.sh
old mode 100644
new mode 100755
diff --git a/dev-support/jenkins/jenkins_precommit_github_yetus.sh b/dev-support/jenkins/jenkins_precommit_github_yetus.sh
old mode 100644
new mode 100755
index 896af25..ca92e20
--- a/dev-support/jenkins/jenkins_precommit_github_yetus.sh
+++ b/dev-support/jenkins/jenkins_precommit_github_yetus.sh
@@ -32,9 +32,7 @@ declare -a required_envs=(
   # these ENV variables define the required API with Jenkinsfile_GitHub
   "ARCHIVE_PATTERN_LIST"
   "BUILD_URL_ARTIFACTS"
-  "DOCKERFILE"
-  "GITHUB_PASSWORD"
-  "GITHUB_USER"
+  "GITHUB_TOKEN"
   "PATCHDIR"
   "PLUGINS"
   "SOURCEDIR"
@@ -81,6 +79,7 @@ fi
 if [ -n "${JAVA_HOME}" ]; then
   unset JAVA_HOME
 fi
+YETUS_ARGS+=('--project=hbase-kustomize')
 YETUS_ARGS+=("--patch-dir=${PATCHDIR}")
 # where the source is located
 YETUS_ARGS+=("--basedir=${SOURCEDIR}")
@@ -88,9 +87,10 @@ YETUS_ARGS+=("--basedir=${SOURCEDIR}")
 YETUS_ARGS+=("--brief-report-file=${PATCHDIR}/brief.txt")
 YETUS_ARGS+=("--console-report-file=${PATCHDIR}/console.txt")
 YETUS_ARGS+=("--html-report-file=${PATCHDIR}/report.html")
-# enable writing back to Github
-YETUS_ARGS+=("--github-password=${GITHUB_PASSWORD}")
-YETUS_ARGS+=("--github-user=${GITHUB_USER}")
+# don't complain about issues on source branch
+YETUS_ARGS+=('--continuous-improvement=true')
+# don't worry about unrecognized options
+YETUS_ARGS+=('--ignore-unknown-options=true')
 # auto-kill any surefire stragglers during unit test runs
 YETUS_ARGS+=("--reapermode=kill")
 # set relatively high limits for ASF machines
@@ -106,17 +106,20 @@ YETUS_ARGS+=("--build-url-artifacts=${BUILD_URL_ARTIFACTS}")
 # plugins to enable
 YETUS_ARGS+=("--plugins=${PLUGINS}")
 YETUS_ARGS+=("--tests-filter=test4tests")
-# run in docker mode and specifically point to our
-# Dockerfile since we don't want to use the auto-pulled version.
+# run in docker mode
 YETUS_ARGS+=("--docker")
-YETUS_ARGS+=("--dockerfile=${DOCKERFILE}")
+# our jenkins workers don't have buildkit installed (INFRA-24704)
+YETUS_ARGS+=('--docker-buildkit=false')
 # effectively treat dev-support as a custom maven module
 YETUS_ARGS+=("--skip-dirs=dev-support")
 # help keep the ASF boxes clean
 YETUS_ARGS+=("--sentinel")
+YETUS_ARGS+=("--github-token=${GITHUB_TOKEN}")
 # use emoji vote so it is easier to find the broken line
 YETUS_ARGS+=("--github-use-emoji-vote")
 YETUS_ARGS+=("--github-repo=apache/hbase-kustomize")
+# enable writing back to Github
+YETUS_ARGS+=('--github-write-comment')
 # increasing proc limit to avoid OOME: unable to create native threads
 YETUS_ARGS+=("--proclimit=5000")