You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by bd...@apache.org on 2023/03/01 17:28:53 UTC
[directory-scimple] 01/01: Adding config for ge.apache.org
This is an automated email from the ASF dual-hosted git repository.
bdemers pushed a commit to branch ge-a-o
in repository https://gitbox.apache.org/repos/asf/directory-scimple.git
commit f8bbca0082acaf2f1661df1c0613b3a51ea51aa4
Author: Brian Demers <bd...@apache.org>
AuthorDate: Wed Mar 1 12:28:26 2023 -0500
Adding config for ge.apache.org
Copied from apache/pulsar
---
.../gradle-enterprise/action.yml} | 50 +++++++++-------------
.github/workflows/build.yml | 8 +++-
.github/workflows/cron.yml | 8 +++-
.mvn/ge-extensions.xml | 34 +++++++++++++++
.mvn/gradle-enterprise-custom-user-data.groovy | 44 +++++++++++++++++++
.mvn/gradle-enterprise.xml | 50 ++++++++++++++++++++++
6 files changed, 162 insertions(+), 32 deletions(-)
diff --git a/.github/workflows/build.yml b/.github/actions/gradle-enterprise/action.yml
similarity index 53%
copy from .github/workflows/build.yml
copy to .github/actions/gradle-enterprise/action.yml
index e1378562..e0aeba04 100644
--- a/.github/workflows/build.yml
+++ b/.github/actions/gradle-enterprise/action.yml
@@ -1,3 +1,4 @@
+#
# 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
@@ -6,7 +7,7 @@
# "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
+# 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
@@ -14,33 +15,22 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
+#
-name: CI
-
-on:
- push:
- branches: [ develop ]
- pull_request:
- branches: [ develop ]
-
-jobs:
- build:
-
- strategy:
- matrix:
- java: [17]
-
- runs-on: ubuntu-latest
-
- steps:
- - uses: actions/checkout@v3
-
- - name: Set up Java ${{ matrix.java }}
- uses: actions/setup-java@v3
- with:
- java-version: ${{ matrix.java }}
- distribution: 'zulu'
- cache: maven
-
- - name: Build with Maven
- run: ./mvnw verify -V -B --no-transfer-progress
+name: Configure Gradle Enterprise integration
+description: Configure Gradle Enterprise when secret GE_ACCESS_TOKEN is available
+inputs:
+ token:
+ description: 'The token for accessing Gradle Enterprise'
+ required: true
+runs:
+ using: composite
+ steps:
+ - run: |
+ if [[ -n "${{ inputs.token }}" ]]; then
+ echo "::group::Configuring Gradle Enterprise for build"
+ cp .mvn/ge-extensions.xml .mvn/extensions.xml
+ echo "GRADLE_ENTERPRISE_ACCESS_KEY=${{ inputs.token }}" >> $GITHUB_ENV
+ echo "::endgroup::"
+ fi
+ shell: bash
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index e1378562..472c60e5 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -33,7 +33,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
+ - name: checkout
+ uses: actions/checkout@v3
+
+ - name: Configure Gradle Enterprise
+ uses: ./.github/actions/gradle-enterprise
+ with:
+ token: ${{ secrets.GE_ACCESS_TOKEN }}
- name: Set up Java ${{ matrix.java }}
uses: actions/setup-java@v3
diff --git a/.github/workflows/cron.yml b/.github/workflows/cron.yml
index aab7cf96..17f72c29 100644
--- a/.github/workflows/cron.yml
+++ b/.github/workflows/cron.yml
@@ -31,7 +31,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
+ - name: checkout
+ uses: actions/checkout@v3
+
+ - name: Configure Gradle Enterprise
+ uses: ./.github/actions/gradle-enterprise
+ with:
+ token: ${{ secrets.GE_ACCESS_TOKEN }}
- name: Set up Java ${{ matrix.java }}
uses: actions/setup-java@v3
diff --git a/.mvn/ge-extensions.xml b/.mvn/ge-extensions.xml
new file mode 100644
index 00000000..6d754a25
--- /dev/null
+++ b/.mvn/ge-extensions.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ 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.
+
+-->
+<extensions xmlns="http://maven.apache.org/EXTENSIONS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/EXTENSIONS/1.0.0 http://maven.apache.org/xsd/core-extensions-1.0.0.xsd">
+ <extension>
+ <groupId>com.gradle</groupId>
+ <artifactId>gradle-enterprise-maven-extension</artifactId>
+ <version>1.16.4</version>
+ </extension>
+ <extension>
+ <groupId>com.gradle</groupId>
+ <artifactId>common-custom-user-data-maven-extension</artifactId>
+ <version>1.11.1</version>
+ </extension>
+</extensions>
diff --git a/.mvn/gradle-enterprise-custom-user-data.groovy b/.mvn/gradle-enterprise-custom-user-data.groovy
new file mode 100644
index 00000000..8299e43b
--- /dev/null
+++ b/.mvn/gradle-enterprise-custom-user-data.groovy
@@ -0,0 +1,44 @@
+/*
+ * 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.
+ */
+
+// Add Maven command line arguments
+def mavenCommand = ''
+if (System.env.MAVEN_CMD_LINE_ARGS) {
+ mavenCommand = "mvn ${System.env.MAVEN_CMD_LINE_ARGS}".toString()
+ buildScan.value('Maven command line', mavenCommand)
+}
+if (System.env.GITHUB_ACTIONS) {
+ if (session.goals.size() == 1 && session.goals[0] == 'initialize') {
+ // omit publishing build scan when the only goal is "initialize"
+ buildScan.publishOnDemand()
+ } else {
+ def jobName = System.env.JOB_NAME ?: System.env.GITHUB_JOB
+ buildScan.value('GitHub Actions Job name', jobName)
+ buildScan.value('GitHub Actions Event name', System.env.GITHUB_EVENT_NAME)
+ buildScan.value('GitHub Ref name', System.env.GITHUB_REF_NAME)
+ buildScan.value('GitHub Actor', System.env.GITHUB_ACTOR)
+ buildScan.link('GitHub Repository', "https://github.com/" + System.env.GITHUB_REPOSITORY)
+ buildScan.link('GitHub Commit', "https://github.com/" + System.env.GITHUB_REPOSITORY + "/commits/" + System.env.GITHUB_SHA)
+ buildScan.buildScanPublished { publishedBuildScan ->
+ new File(System.env.GITHUB_STEP_SUMMARY).withWriterAppend { out ->
+ out.println("\n[Gradle build scan for '${mavenCommand}' in ${jobName}](${publishedBuildScan.buildScanUri})\n")
+ }
+ }
+ }
+}
diff --git a/.mvn/gradle-enterprise.xml b/.mvn/gradle-enterprise.xml
new file mode 100644
index 00000000..12749af4
--- /dev/null
+++ b/.mvn/gradle-enterprise.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<!--
+
+ 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.
+
+-->
+<gradleEnterprise
+ xmlns="https://www.gradle.com/gradle-enterprise-maven" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="https://www.gradle.com/gradle-enterprise-maven https://www.gradle.com/schema/gradle-enterprise-maven.xsd">
+ <server>
+ <url>https://ge.apache.org</url>
+ <allowUntrusted>false</allowUntrusted>
+ </server>
+ <buildScan>
+ <capture>
+ <goalInputFiles>true</goalInputFiles>
+ <buildLogging>true</buildLogging>
+ <testLogging>true</testLogging>
+ </capture>
+ <backgroundBuildScanUpload>#{isFalse(env['GITHUB_ACTIONS'])}</backgroundBuildScanUpload>
+ <publish>ALWAYS</publish>
+ <publishIfAuthenticated>true</publishIfAuthenticated>
+ <obfuscation>
+ <ipAddresses>#{{'0.0.0.0'}}</ipAddresses>
+ </obfuscation>
+ </buildScan>
+ <buildCache>
+ <local>
+ <enabled>#{isFalse(env['GITHUB_ACTIONS'])}</enabled>
+ </local>
+ <remote>
+ <enabled>false</enabled>
+ </remote>
+ </buildCache>
+</gradleEnterprise>