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

vy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git


The following commit(s) were added to refs/heads/master by this push:
     new 9c50ce6835 INFRA-23225 Deploy SNAPSHOTs via GitHub Actions.
9c50ce6835 is described below

commit 9c50ce68351fce3dbea67c6e99126b2ee5aa01f7
Author: Volkan Yazıcı <[email protected]>
AuthorDate: Mon May 9 11:54:51 2022 +0200

    INFRA-23225 Deploy SNAPSHOTs via GitHub Actions.
---
 .github/workflows/build.yml          | 124 +++++++++++++++++++++++++++++++++++
 .github/workflows/linux.yml          |  35 ----------
 .github/workflows/macos.yml          |  35 ----------
 .github/workflows/maven-settings.xml |  28 ++++++++
 .github/workflows/windows.yml        |  35 ----------
 pom.xml                              |   5 ++
 6 files changed, 157 insertions(+), 105 deletions(-)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 0000000000..9b676feece
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,124 @@
+# 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.
+
+name: build
+
+on:
+  push:
+    branches:
+      - master
+  pull_request:
+
+permissions: read-all
+
+jobs:
+
+  build:
+
+    runs-on: ${{ matrix.os }}
+
+    strategy:
+      matrix:
+        os: [ ubuntu-latest, windows-latest, macos-latest ]
+
+    steps:
+
+      - name: Checkout repository
+        uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748   # 
3.0.1
+
+      - name: Setup JDK 11
+        uses: actions/setup-java@9519cf1382ac8dc61ad461f7f7cb45f033220189   # 
3.1.1
+        with:
+          distribution: temurin
+          java-version: 11
+          java-package: jdk
+          architecture: x64
+          cache: maven
+
+      - name: Inspect environment (Linux)
+        if: runner.os == 'Linux'
+        run: env | grep '^JAVA'
+
+      - name: Inspect environment (Windows)
+        if: runner.os == 'Windows'
+        run: set java
+
+      - name: Inspect environment (MacOS)
+        if: runner.os == 'macOS'
+        run: env | grep '^JAVA'
+
+      - name: Maven "verify"
+        timeout-minutes: 60
+        shell: bash
+        run: |
+          ./mvnw \
+            --show-version --batch-mode --errors --no-transfer-progress \
+            -DtrimStackTrace=false \
+            -Dsurefire.rerunFailingTestsCount=2 \
+            -Dlog4j2.junit.fileCleanerSleepPeriodMillis=1000 \
+            verify
+
+      # Maven `site` goal takes ~1 hour and mostly irrelevant for typical PRs.
+      # Hence, we only execute that for `dependabot` PRs, which tend to break 
`site` occasionally.
+      - name: Maven "site"
+        if: ${{ github.actor == 'dependabot[bot]' }}
+        timeout-minutes: 60
+        shell: bash
+        run: |
+          ./mvnw \
+            --show-version --batch-mode --errors --no-transfer-progress \
+            --non-recursive \
+            -Dmaven.doap.skip \
+            -DskipTests \
+            site
+
+  deploy:
+
+    runs-on: ubuntu-latest
+    needs: build
+    if: github.repository == 'apache/logging-log4j2' && github.ref == 
'refs/heads/master'
+
+    steps:
+
+      - name: Checkout repository
+        uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748   # 
3.0.1
+
+      - name: Setup JDK 11
+        uses: actions/setup-java@9519cf1382ac8dc61ad461f7f7cb45f033220189   # 
3.1.1
+        with:
+          distribution: temurin
+          java-version: 11
+          java-package: jdk
+          architecture: x64
+          cache: maven
+
+      - name: Inspect environment
+        run: env | grep '^JAVA'
+
+      - name: Maven "deploy"
+        timeout-minutes: 15
+        shell: bash
+        # `package install:install deploy:deploy` goal is needed to deploy 
without configuring the plugin in the POM.
+        # For details see: 
https://maven.apache.org/plugins/maven-gpg-plugin/examples/deploy-signed-artifacts.html
+        run: |
+          ./mvnw \
+            --show-version --batch-mode --errors --no-transfer-progress \
+            -Dgpg.skip=true \
+            -DskipTests=true \
+            --settings .github/workflows/maven-settings.xml \
+            package install:install deploy:deploy
+        env:
+          NEXUS_USER: ${{ secrets.NEXUS_USER }}
+          NEXUS_PW: ${{ secrets.NEXUS_PW }}
diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml
deleted file mode 100644
index 3004dbb0db..0000000000
--- a/.github/workflows/linux.yml
+++ /dev/null
@@ -1,35 +0,0 @@
-name: linux
-
-on:
-  push:
-    branches:
-      - master
-  pull_request:
-
-jobs:
-  build:
-
-    runs-on: ubuntu-latest
-
-    steps:
-
-      - name: Checkout repository
-        uses: actions/checkout@v2
-
-      - name: Setup JDK 11
-        uses: actions/[email protected]
-        with:
-          distribution: temurin
-          java-version: 11
-          java-package: jdk
-          architecture: x64
-          cache: 'maven'
-
-      - name: Build with Maven
-        timeout-minutes: 90
-        shell: bash
-        run: |
-          ./mvnw \
-            --show-version --batch-mode --errors --no-transfer-progress \
-            -DtrimStackTrace=false \
-            -Dlog4j2.junit.fileCleanerSleepPeriodMillis=1000
diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml
deleted file mode 100644
index 74b8e7a86a..0000000000
--- a/.github/workflows/macos.yml
+++ /dev/null
@@ -1,35 +0,0 @@
-name: macos
-
-on:
-  push:
-    branches:
-      - master
-  pull_request:
-
-jobs:
-  build:
-
-    runs-on: macos-latest
-
-    steps:
-
-      - name: Checkout repository
-        uses: actions/checkout@v2
-
-      - name: Setup JDK 11
-        uses: actions/[email protected]
-        with:
-          distribution: temurin
-          java-version: 11
-          java-package: jdk
-          architecture: x64
-          cache: 'maven'
-
-      - name: Build with Maven
-        timeout-minutes: 90
-        shell: bash
-        run: |
-          ./mvnw \
-            --show-version --batch-mode --errors --no-transfer-progress \
-            -DtrimStackTrace=false \
-            -Dlog4j2.junit.fileCleanerSleepPeriodMillis=1000
diff --git a/.github/workflows/maven-settings.xml 
b/.github/workflows/maven-settings.xml
new file mode 100644
index 0000000000..5e8dbde337
--- /dev/null
+++ b/.github/workflows/maven-settings.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF8"?>
+<!--
+  ~ 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.
+  -->
+<settings xmlns="http://maven.apache.org/SETTINGS/1.1.0";
+          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 
http://maven.apache.org/xsd/settings-1.1.0.xsd";>
+  <servers>
+    <server>
+      <id>asf-snapshots</id>
+      <username>${env.NEXUS_USER}</username>
+      <password>${env.NEXUS_PW}</password>
+    </server>
+  </servers>
+</settings>
diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml
deleted file mode 100644
index d13018c55c..0000000000
--- a/.github/workflows/windows.yml
+++ /dev/null
@@ -1,35 +0,0 @@
-name: windows
-
-on:
-  push:
-    branches:
-      - master
-  pull_request:
-
-jobs:
-  build:
-
-    runs-on: windows-latest
-
-    steps:
-
-      - name: Checkout repository
-        uses: actions/checkout@v2
-
-      - name: Setup JDK 11
-        uses: actions/[email protected]
-        with:
-          distribution: temurin
-          java-version: 11
-          java-package: jdk
-          architecture: x64
-          cache: 'maven'
-
-      - name: Build with Maven
-        timeout-minutes: 90
-        shell: bash
-        run: |
-          ./mvnw \
-            --show-version --batch-mode --errors --no-transfer-progress \
-            -DtrimStackTrace=false \
-            -Dlog4j2.junit.fileCleanerSleepPeriodMillis=1000
diff --git a/pom.xml b/pom.xml
index ac10595a40..e272ec612a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1741,6 +1741,11 @@
       <id>www.example.com</id>
       <url>scp://www.example.com/www/docs/project/</url>
     </site>
+    <snapshotRepository>
+      <id>asf-snapshots</id>
+      <name>ASF snapshot repository</name>
+      <url>https://repository.apache.org/content/repositories/snapshots</url>
+    </snapshotRepository>
   </distributionManagement>
   <modules>
     <!-- Log4j Bill of Materials -->

Reply via email to