This is an automated email from the ASF dual-hosted git repository.
piergiorgio pushed a commit to branch CONNECTORS-1754
in repository https://gitbox.apache.org/repos/asf/manifoldcf.git
The following commit(s) were added to refs/heads/CONNECTORS-1754 by this push:
new b81db2a88 Added Dockerfile, updated the exclusion for RAT, updated the
GitHub workflow (CONNECTORS-1754)
b81db2a88 is described below
commit b81db2a8888e4942acd0eb4db5da6ec30c0e0cb0
Author: Piergiorgio Lucidi <[email protected]>
AuthorDate: Wed Jun 12 21:48:44 2024 +0200
Added Dockerfile, updated the exclusion for RAT, updated the GitHub
workflow (CONNECTORS-1754)
---
.github/workflows/create-release-candidate.yml | 97 +++++++++++++++++++++++---
Dockerfile | 60 ++++++++++++++++
pom.xml | 1 +
3 files changed, 148 insertions(+), 10 deletions(-)
diff --git a/.github/workflows/create-release-candidate.yml
b/.github/workflows/create-release-candidate.yml
index c7f754c03..038fefb59 100644
--- a/.github/workflows/create-release-candidate.yml
+++ b/.github/workflows/create-release-candidate.yml
@@ -34,7 +34,7 @@ jobs:
steps:
- name: Init Release Candidate workflow
run: echo "Starting Apache ManifoldCF workflow for building ${{
github.event.inputs.releasecandidatetag }}"
- - uses: actions/[email protected]
+ - uses: actions/[email protected]
- name: Set up OpenJDK 11 Temurin x64
uses: actions/[email protected]
with:
@@ -68,9 +68,9 @@ jobs:
- name: Create new release candidate branch
run: |
- git branch ${{ steps.branchTag.outputs.tag }}
- git push --set-upstream origin ${{ steps.branchTag.outputs.tag }}
- git checkout ${{ steps.branchTag.outputs.tag }}
+ git branch release-${{ steps.branchTag.outputs.tag }}
+ git push --set-upstream origin release-${{
steps.branchTag.outputs.tag }}
+ git checkout release-${{ steps.branchTag.outputs.tag }}
#- name: Checkout the new branch ${{ steps.branchTag.outputs.tag }}
# uses: actions/[email protected]
@@ -114,7 +114,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
- tag_name: ${{ steps.branchTag.outputs.tag }}
+ tag_name: release-${{ steps.branchTag.outputs.tag }}
release_name: Release Candidate ${{ steps.branchTag.outputs.tag }}
body: |
Release Candidate ${{ steps.branchTag.outputs.tag }}
@@ -125,12 +125,52 @@ jobs:
id: artifactVersion
run: echo "version=${{ steps.branchVersion.outputs.version }}dev" >>
$GITHUB_OUTPUT
+ - name: Rename KEYS and CHANGES.txt artifacts
+ run: |
+ cp KEYS apache-manifoldcf-${{ steps.artifactVersion.outputs.version
}}.KEYS
+ cp CHANGES.txt apache-manifoldcf-${{
steps.artifactVersion.outputs.version }}.CHANGES.txt
+
+ - name: Import GPG key
+ id: import_gpg
+ uses: crazy-max/[email protected]
+ with:
+ gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
+
+ - name: Generate file hashes
+ run: |
+ gpg --armor --output apache-manifoldcf-${{
steps.artifactVersion.outputs.version }}-src.zip.asc --detach-sig
apache-manifoldcf-${{ steps.artifactVersion.outputs.version }}-src.zip
+ gpg --armor --output apache-manifoldcf-${{
steps.artifactVersion.outputs.version }}-src.tar.gz.asc --detach-sig
apache-manifoldcf-${{ steps.artifactVersion.outputs.version }}-src.tar.gz
+ gpg --armor --output apache-manifoldcf-${{
steps.artifactVersion.outputs.version }}-lib.zip.asc --detach-sig
apache-manifoldcf-${{ steps.artifactVersion.outputs.version }}-lib.zip
+ gpg --armor --output apache-manifoldcf-${{
steps.artifactVersion.outputs.version }}-lib.tar.gz.asc --detach-sig
apache-manifoldcf-${{ steps.artifactVersion.outputs.version }}-lib.tar.gz
+ gpg --armor --output apache-manifoldcf-${{
steps.artifactVersion.outputs.version }}-bin.zip.asc --detach-sig
apache-manifoldcf-${{ steps.artifactVersion.outputs.version }}-bin.zip
+ gpg --armor --output apache-manifoldcf-${{
steps.artifactVersion.outputs.version }}-bin.tar.gz.asc --detach-sig
apache-manifoldcf-${{ steps.artifactVersion.outputs.version }}-bin.tar.gz
+
+ gpg --print-md MD5 apache-manifoldcf-${{
steps.artifactVersion.outputs.version }}-src.zip > apache-manifoldcf-${{
steps.artifactVersion.outputs.version }}-src.zip.md5
+ gpg --print-md MD5 apache-manifoldcf-${{
steps.artifactVersion.outputs.version }}-src.tar.gz > apache-manifoldcf-${{
steps.artifactVersion.outputs.version }}-src.tar.gz.md5
+ gpg --print-md MD5 apache-manifoldcf-${{
steps.artifactVersion.outputs.version }}-lib.zip > apache-manifoldcf-${{
steps.artifactVersion.outputs.version }}-lib.zip.md5
+ gpg --print-md MD5 apache-manifoldcf-${{
steps.artifactVersion.outputs.version }}-lib.tar.gz > apache-manifoldcf-${{
steps.artifactVersion.outputs.version }}-lib.tar.gz.md5
+ gpg --print-md MD5 apache-manifoldcf-${{
steps.artifactVersion.outputs.version }}-bin.zip > apache-manifoldcf-${{
steps.artifactVersion.outputs.version }}-bin.zip.md5
+ gpg --print-md MD5 apache-manifoldcf-${{
steps.artifactVersion.outputs.version }}-bin.tar.gz > apache-manifoldcf-${{
steps.artifactVersion.outputs.version }}-bin.tar.gz.md5
+
+ gpg --print-md SHA512 apache-manifoldcf-${{
steps.artifactVersion.outputs.version }}-src.zip > apache-manifoldcf-${{
steps.artifactVersion.outputs.version }}-src.zip.sha512
+ gpg --print-md SHA512 apache-manifoldcf-${{
steps.artifactVersion.outputs.version }}-src.tar.gz > apache-manifoldcf-${{
steps.artifactVersion.outputs.version }}-src.tar.gz.sha512
+ gpg --print-md SHA512 apache-manifoldcf-${{
steps.artifactVersion.outputs.version }}-lib.zip > apache-manifoldcf-${{
steps.artifactVersion.outputs.version }}-lib.zip.sha512
+ gpg --print-md SHA512 apache-manifoldcf-${{
steps.artifactVersion.outputs.version }}-lib.tar.gz > apache-manifoldcf-${{
steps.artifactVersion.outputs.version }}-lib.tar.gz.sha512
+ gpg --print-md SHA512 apache-manifoldcf-${{
steps.artifactVersion.outputs.version }}-bin.zip > apache-manifoldcf-${{
steps.artifactVersion.outputs.version }}-bin.zip.sha512
+ gpg --print-md SHA512 apache-manifoldcf-${{
steps.artifactVersion.outputs.version }}-bin.tar.gz > apache-manifoldcf-${{
steps.artifactVersion.outputs.version }}-bin.tar.gz.sha512
+
- name: Upload artifacts - Binary - zip format
- uses: actions/[email protected]
+ uses: actions/[email protected]
with:
name: apache-manifoldcf-${{ steps.artifactVersion.outputs.version
}}-bin.zip
path: apache-manifoldcf-${{ steps.artifactVersion.outputs.version
}}-bin.zip
+ - name: Upload artifacts - Binary - asc format
+ uses: actions/[email protected]
+ with:
+ name: apache-manifoldcf-${{ steps.artifactVersion.outputs.version
}}-bin.zip.asc
+ path: apache-manifoldcf-${{ steps.artifactVersion.outputs.version
}}-bin.zip.asc
+
- name: Upload Release Candidate Asset - Binary - zip format
uses: actions/[email protected]
env:
@@ -141,8 +181,18 @@ jobs:
asset_name: apache-manifoldcf-${{
steps.artifactVersion.outputs.version }}-bin.zip
asset_content_type: application/zip
+ - name: Upload Release Candidate Asset - Binary - asc format
+ uses: actions/[email protected]
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ upload_url: ${{ steps.create_release_candidate.outputs.upload_url }}
+ asset_path: ./apache-manifoldcf-${{
steps.artifactVersion.outputs.version }}-bin.zip.asc
+ asset_name: apache-manifoldcf-${{
steps.artifactVersion.outputs.version }}-bin.zip.asc
+ asset_content_type: application/pgp-signature
+
- name: Upload artifacts - Lib - tar.gz format
- uses: actions/[email protected]
+ uses: actions/[email protected]
with:
name: apache-manifoldcf-${{ steps.artifactVersion.outputs.version
}}-lib.tar.gz
path: apache-manifoldcf-${{ steps.artifactVersion.outputs.version
}}-lib.tar.gz
@@ -158,7 +208,7 @@ jobs:
asset_content_type: application/gzip
- name: Upload artifacts - Lib - zip format
- uses: actions/[email protected]
+ uses: actions/[email protected]
with:
name: apache-manifoldcf-${{ steps.artifactVersion.outputs.version
}}-lib.zip
path: apache-manifoldcf-${{ steps.artifactVersion.outputs.version
}}-lib.zip
@@ -174,7 +224,7 @@ jobs:
asset_content_type: application/zip
- name: Upload artifacts - Source code - tar.gz format
- uses: actions/[email protected]
+ uses: actions/[email protected]
with:
name: apache-manifoldcf-${{ steps.artifactVersion.outputs.version
}}-src.tar.gz
path: apache-manifoldcf-${{ steps.artifactVersion.outputs.version
}}-src.tar.gz
@@ -190,7 +240,7 @@ jobs:
asset_content_type: application/gzip
- name: Upload artifacts - Source code - zip format
- uses: actions/[email protected]
+ uses: actions/[email protected]
with:
name: apache-manifoldcf-${{ steps.artifactVersion.outputs.version
}}-src.zip
path: apache-manifoldcf-${{ steps.artifactVersion.outputs.version
}}-src.zip
@@ -205,3 +255,30 @@ jobs:
asset_name: apache-manifoldcf-${{
steps.artifactVersion.outputs.version }}-src.zip
asset_content_type: application/zip
+ - name: Set up QEMU
+ uses: docker/[email protected]
+
+ - name: Set up Docker Buildx
+ uses: docker/[email protected]
+
+ - name: Login to Docker Hub
+ uses: docker/[email protected]
+ with:
+ username: ${{ secrets.DOCKERHUB_USER }}
+ password: ${{ secrets.DOCKERHUB_TOKEN }}
+
+ - name: Docker meta
+ id: meta
+ uses: docker/metadata-action@v4
+ with:
+ images: apache/manifoldcf
+
+ - name: Build and push ManifoldCF Docker Image
+ uses: docker/[email protected]
+ with:
+ context: .
+ file: Dockerfile
+ platforms: linux/amd64,linux/arm64/v8
+ push: true
+ tags: ${{ steps.meta.outputs.tags }}
+ labels: ${{ steps.meta.outputs.labels }}
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 000000000..8c176bb23
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,60 @@
+# 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.
+
+FROM eclipse-temurin:11-jre-jammy
+LABEL maintainer="The Apache ManifoldCF Project"
+
+ARG MCF_VERSION="2.27-RC0"
+
+ARG MCF_USER=manifoldcf
+ARG MCF_USER_ID=100001
+
+ARG MCF_GROUP=manifoldcf
+ARG MCF_GROUP_ID=100002
+
+ARG MCF_HOME=/usr/share/manifoldcf
+ARG MCF_PORT=8345
+
+RUN apt-get update && apt-get install -y iputils-ping && \
+ apt-get install -y dnsutils
+
+COPY dist/. ${MCF_HOME}/
+
+LABEL org.opencontainers.image.title="Apache ManifoldCF"
+LABEL org.opencontainers.image.description="Apache ManifoldCF is a
multi-repository crawler framework, with multiple connectors."
+LABEL org.opencontainers.image.authors="The Apache ManifoldCF Project"
+LABEL org.opencontainers.image.url="https://manifoldcf.apache.org"
+LABEL org.opencontainers.image.source="https://github.com/apache/manifoldcf"
+LABEL
org.opencontainers.image.documentation="https://manifoldcf.apache.org/release/release-2.25/en_US/index.html"
+LABEL org.opencontainers.image.version="${MCF_VERSION}"
+LABEL org.opencontainers.image.licenses="Apache-2.0"
+
+ENV MCF_USER="manifoldcf"
+ENV MCF_USER_ID="100001"
+ENV MCF_GROUP="manifoldcf"
+ENV MCF_GROUP_ID="100002"
+ENV MCF_PORT="8345"
+
+RUN set -ex; \
+ groupadd -r --gid "$MCF_GROUP_ID" "$MCF_GROUP"; \
+ useradd -r --uid "$MCF_USER_ID" --gid "$MCF_GROUP_ID" "$MCF_USER"
+
+RUN chown ${MCF_USER}:${MCF_USER} -R ${MCF_HOME}
+RUN chmod +x ${MCF_HOME}/example/start.sh
+
+USER ${MCF_USER}
+EXPOSE ${MCF_PORT}
+WORKDIR ${MCF_HOME}/example
+CMD ["./start.sh"]
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index e137d081c..fee062c35 100644
--- a/pom.xml
+++ b/pom.xml
@@ -216,6 +216,7 @@
<exclude>site/src/documentation/skins/common/xslt/html/split.xsl</exclude>
<exclude>dist-license/DEPENDENCIES.txt</exclude>
<exclude>site/tmp/font/**</exclude>
+ <exclude>apache-manifoldcf-*/**</exclude>
</excludes>
</configuration>
</plugin>