File tree Expand file tree Collapse file tree 3 files changed +43
-1
lines changed
jenkins-jobs/docker/artifact-server Expand file tree Collapse file tree 3 files changed +43
-1
lines changed Original file line number Diff line number Diff line change @@ -30,4 +30,7 @@ generated-sources/
30
30
/state /
31
31
bin /
32
32
gen /
33
- * .tokens
33
+ * .tokens
34
+
35
+ jenkins-jobs /docker /rhel_kafka /plugins
36
+ jenkins-jobs /docker /artifact-server /plugins
Original file line number Diff line number Diff line change
1
+ FROM svenstaro/miniserve:alpine
2
+
3
+ RUN apk add --no-cache bash
4
+
5
+ ADD ./plugins /opt/plugins
6
+ ADD listing.sh /opt/
7
+
8
+ RUN chmod +x /opt/listing.sh
9
+ RUN /opt/listing.sh -d /opt/plugins -o /opt/plugins/artifacts.txt
10
+
11
+ CMD ["/opt/plugins" ]
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ OPTS=$( getopt -o d:o: --long dir:,output: -n ' parse-options' -- " $@ " )
4
+ if [ $? != 0 ] ; then echo " Failed parsing options." >&2 ; exit 1 ; fi
5
+ eval set -- " $OPTS "
6
+
7
+ OUTPUT=" $( pwd) /artifacts.txt"
8
+ while true ; do
9
+ case " $1 " in
10
+ -d | --dir ) DIR=$2 ; shift ; shift ;;
11
+ -o | --output ) OUTPUT=$2 ; shift ; shift ;;
12
+ -h | --help ) PRINT_HELP=true; shift ;;
13
+ -- ) shift ; break ;;
14
+ * ) break ;;
15
+ esac
16
+ done
17
+
18
+ shopt -s globstar nullglob
19
+ pushd " $DIR " || exit
20
+ rm -f " $OUTPUT "
21
+ for file in ** /* .{zip,jar}; do
22
+ prefix=$( echo " $file " | sed -rn ' s@^(.*)-([[:digit:]].*([[:digit:]]|Final|SNAPSHOT))(.*)(\..*)$@\1@p' )
23
+ suffix=$( echo " $file " | sed -rn ' s@^(.*)-([[:digit:]].*([[:digit:]]|Final|SNAPSHOT))(.*)(\..*)$@\4@p' )
24
+ artifact=" $prefix$suffix "
25
+ echo " $artifact "
26
+ echo " $artifact :$file " >> " $OUTPUT "
27
+ done
28
+ popd
You can’t perform that action at this time.
0 commit comments