UNCLASSIFIED
Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
Ironbank Plugins
Mattermost Admin Plugin
Compare Revisions
c0ac8c81935d82e814c1e16c1247848379c8e521...fd7f238d5759000aefeead346ef424ed62e92ab5
Commits (2)
adjusting to ironbank MM image
· 6ebbb0ac
paulqualls
authored
May 04, 2021
6ebbb0ac
adjusting to ironbank MM image
· fd7f238d
paulqualls
authored
May 04, 2021
fd7f238d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
22 deletions
+24
-22
Dockerfile
Dockerfile
+15
-13
install-mattermost-plugin.sh
install-mattermost-plugin.sh
+4
-4
plugins_manifest.yaml
plugins_manifest.yaml
+5
-5
No files found.
Dockerfile
View file @
fd7f238d
...
@@ -7,33 +7,35 @@ FROM ${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG} AS builder
...
@@ -7,33 +7,35 @@ FROM ${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG} AS builder
WORKDIR
/tmp
WORKDIR
/tmp
COPY
install-mattermost-plugin.sh .
COPY
install-mattermost-plugin.sh .
COPY
call_mm_plugin_installer.sh .
#
COPY call_mm_plugin_installer.sh .
COPY
mattermost-admin-plugin-1.0.2-rc.tar.gz .
COPY
mattermost-admin-plugin-1.0.2-rc.tar.gz .
COPY
linux_amd64.tar .
#
COPY linux_amd64.tar .
RUN
tar
xvf linux_amd64.tar
#
RUN tar xvf linux_amd64.tar
FROM
registry1.dso.mil/ironbank/opensource/mattermost/mattermost:5.27.0
FROM
registry1.dso.mil/ironbank/google/golang/golang-1.16:1.16
#
FROM registry1.dso.mil/ironbank/google/golang/golang-1.16:1.16
# FROM registry1.dso.mil/ironbank/docker/scratch:ironbank
# FROM registry1.dso.mil/ironbank/docker/scratch:ironbank
ENV
TARGET_URL="URL IS UNDEFINED"
#
ENV TARGET_URL="URL IS UNDEFINED"
ENV
TARGET_TOKEN="TARGET TOKEN IS UNDEFINED"
#
ENV TARGET_TOKEN="TARGET TOKEN IS UNDEFINED"
WORKDIR
/bin
#
WORKDIR
mattermost
/bin
COPY
--from=builder /tmp/mmctl .
#
COPY --from=builder /tmp/mmctl .
WORKDIR
/
plugin
WORKDIR
/
scripts
COPY
--from=builder /tmp/mattermost-admin-plugin-1.0.2-rc.tar.gz .
COPY
--from=builder /tmp/mattermost-admin-plugin-1.0.2-rc.tar.gz .
COPY
--from=builder /tmp/install-mattermost-plugin.sh .
COPY
--from=builder /tmp/install-mattermost-plugin.sh .
COPY
--from=builder /tmp/call_mm_plugin_installer.sh .
#
COPY --from=builder /tmp/call_mm_plugin_installer.sh .
USER
1001
# USER 1001
USER
2000
# the entrypoint script calls the main installer which uses ENV vars for token and url to contact the target and install the plugin
# the entrypoint script calls the main installer which uses ENV vars for token and url to contact the target and install the plugin
ENTRYPOINT
[ "./call_mm_plugin_installer.sh" ]
# old - ENTRYPOINT [ "./call_mm_plugin_installer.sh" ]
ENTRYPOINT
[ "./install-mattermost-plugin.sh" ]
# ENTRYPOINT ["tail", "-f", "/dev/null"]
# ENTRYPOINT ["tail", "-f", "/dev/null"]
HEALTHCHECK
NONE
HEALTHCHECK
NONE
install-mattermost-plugin.sh
View file @
fd7f238d
...
@@ -26,20 +26,20 @@ echo " using URL: $url";
...
@@ -26,20 +26,20 @@ echo " using URL: $url";
echo
" using Token:
$token
"
;
echo
" using Token:
$token
"
;
# mmctl auth login http://localhost:8065 -n paul -a cenneh38ifd9tfqy7trwra918r
# mmctl auth login http://localhost:8065 -n paul -a cenneh38ifd9tfqy7trwra918r
result
=
$(
mmctl auth login
$url
-n
plugininstall
-a
$token
)
result
=
$(
/mattermost/bin/
mmctl auth login
$url
-n
plugininstall
-a
$token
)
echo
"result:
$result
"
echo
"result:
$result
"
# look for th word "stored" for success, "Invalid" as failure
# look for th word "stored" for success, "Invalid" as failure
# if creds successfully stored, then delete the plugin by ID (we don't care if it fails or not)
# if creds successfully stored, then delete the plugin by ID (we don't care if it fails or not)
result
=
$(
mmctl plugin delete com.mattermost.p1-admin-mattermost-plugin
)
result
=
$(
/mattermost/bin/
mmctl plugin delete com.mattermost.p1-admin-mattermost-plugin
)
# install the plugin with the tar.gz file
# install the plugin with the tar.gz file
result
=
$(
mmctl plugin add mattermost-admin-plugin-1.0.2-rc.tar.gz
--format
json
)
result
=
$(
/mattermost/bin/
mmctl plugin add mattermost-admin-plugin-1.0.2-rc.tar.gz
--format
json
)
# if the install was successful, then enable it
# if the install was successful, then enable it
result
=
$(
mmctl plugin
enable
com.mattermost.p1-admin-mattermost-plugin
--format
json
)
result
=
$(
/mattermost/bin/
mmctl plugin
enable
com.mattermost.p1-admin-mattermost-plugin
--format
json
)
echo
$result
echo
$result
...
...
plugins_manifest.yaml
View file @
fd7f238d
...
@@ -23,11 +23,11 @@ resources:
...
@@ -23,11 +23,11 @@ resources:
validation
:
validation
:
type
:
sha256
type
:
sha256
value
:
9f300373f814db6509002a18bf7009096f76166fb9b017f0c011a2371b48b0a4
value
:
9f300373f814db6509002a18bf7009096f76166fb9b017f0c011a2371b48b0a4
-
url
:
https://github.com/mattermost/mmctl/releases/download/v5.32.0/linux_amd64.tar
#
- url: https://github.com/mattermost/mmctl/releases/download/v5.32.0/linux_amd64.tar
filename
:
linux_amd64.tar
#
filename: linux_amd64.tar
validation
:
#
validation:
type
:
sha256
#
type: sha256
value
:
408650ab5cb8eb7e59b3202308745418e6b04a354b001be76cad5e3dedfd925d
#
value: 408650ab5cb8eb7e59b3202308745418e6b04a354b001be76cad5e3dedfd925d
# Include plugin maintainer info
# Include plugin maintainer info
...
...