forked from wolfi-dev/os
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapache-nifi.yaml
155 lines (135 loc) · 4.39 KB
/
apache-nifi.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
package:
name: apache-nifi
version: 2.0.0
epoch: 1
description: Apache NiFi is an easy to use, powerful, and reliable system to process and distribute data.
copyright:
- license: Apache-2.0
resources:
cpu: 33
memory: 32Gi
dependencies:
runtime:
- bash
- busybox
- coreutils
- glibc-locale-en
- openjdk-21-default-jvm
- openjdk-21-jre
- xmlstarlet
environment:
contents:
packages:
- bash
- build-base
- busybox
- coreutils
- maven
- nodejs-20
- npm
- openjdk-21-default-jdk
- openssf-compiler-options
- openssl-dev
- rsync
environment:
MAVEN_OPTS: |
-Xmx4g
-XX:ReservedCodeCacheSize=1g
-XX:+UseG1GC
-Dorg.slf4j.simpleLogger.defaultLogLevel=WARN
-Daether.connector.http.retryHandler.count=5
-Daether.connector.http.connectionMaxTtl=30
NIFI_BASE: "/usr/share/nifi"
NIFI_HOME: "/usr/share/nifi/nifi-current"
TOOLKIT_HOME: "/usr/share/nifi/nifi-toolkit-current"
pipeline:
- uses: git-checkout
with:
repository: https://github.com/apache/nifi
tag: rel/nifi-${{package.version}}
expected-commit: 2f13b609bdb77cb985aa35e8b66b4f04274d7c59
- runs: |
# Use single thread on x86_64
if [[ "${{build.arch}}" == "x86_64" ]]; then
MAVEN_THREADS=1
else
MAVEN_THREADS=$(nproc)
fi
# Build NiFi
./mvnw -T${MAVEN_THREADS}C -q package \
--no-snapshot-updates \
--no-transfer-progress \
--fail-fast \
-DskipTests \
-Dfrontend.skipTests=true \
-Drat.skip=true
# Install NiFi
mkdir -p "${{targets.contextdir}}/${NIFI_BASE}"
cp -ar "nifi-assembly/target/nifi-${{package.version}}-bin/nifi-${{package.version}}" "${{targets.contextdir}}/${NIFI_HOME}"
# Create expected directories
for dir in conf logs database_repository flowfile_repository content_repository provenance_repository state; do
mkdir -p "${{targets.contextdir}}/${NIFI_HOME}/${dir}"
done
# Set shell in environment script
echo "#!/bin/sh\n" > "${{targets.contextdir}}/${NIFI_HOME}/bin/nifi-env.sh"
# Install scripts
mkdir -p "${{targets.contextdir}}/${NIFI_BASE}/scripts"
install -m755 nifi-docker/dockerhub/sh/*.sh "${{targets.contextdir}}/${NIFI_BASE}/scripts/"
# Ensure scripts are executable
chmod -R +x "${{targets.contextdir}}/${NIFI_BASE}/scripts"
# Fix paths in scripts
sed -i "s|/opt|/usr/share|g" "${{targets.contextdir}}/${NIFI_BASE}"/scripts/*.sh
# Symlink current release to versioned path
ln -sf "${NIFI_HOME}" "${{targets.contextdir}}/${NIFI_BASE}/nifi-${{package.version}}"
- uses: strip
subpackages:
- name: "${{package.name}}-toolkit"
description: "Toolkit for Apache NiFi"
dependencies:
runtime:
- apache-nifi
pipeline:
- runs: |
TARGET_DIR="nifi-toolkit/nifi-toolkit-assembly/target"
# Unzip toolkit
unzip "${TARGET_DIR}/nifi-toolkit-${{package.version}}-bin.zip" -d "${TARGET_DIR}"
# Install toolkit
mkdir -p "${{targets.contextdir}}/${NIFI_BASE}"
cp -ar "${TARGET_DIR}/nifi-toolkit-${{package.version}}" "${{targets.contextdir}}/${TOOLKIT_HOME}"
# Remove batch scripts
rm "${{targets.contextdir}}/${TOOLKIT_HOME}"/bin/*.bat
# Symlink current release to versioned path
ln -sf "${TOOLKIT_HOME}" "${{targets.contextdir}}/${NIFI_BASE}/nifi-toolkit-${{package.version}}"
- uses: strip
test:
pipeline:
- runs: |
echo "help" | /usr/share/nifi/nifi-toolkit-current/bin/cli.sh
- name: "${{package.name}}-compat"
description: "Compatibility package to place binaries in the location expected by upstream image"
dependencies:
runtime:
- apache-nifi
pipeline:
- runs: |
mkdir -p "${{targets.contextdir}}/opt"
ln -sf "${NIFI_BASE}" "${{targets.contextdir}}/opt/nifi"
test:
pipeline:
- runs: |
test -d /opt/nifi/nifi-current
update:
enabled: true
ignore-regex-patterns:
- -RC
- -M
github:
identifier: apache/nifi
use-tag: true
strip-prefix: rel/nifi-
tag-filter: rel/nifi-
test:
pipeline:
- runs: |
export JAVA_HOME=/usr/lib/jvm/java-21-openjdk
/usr/share/nifi/nifi-current/bin/nifi.sh start