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
Commits
6ebbb0ac
Commit
6ebbb0ac
authored
May 04, 2021
by
paulqualls
Browse files
adjusting to ironbank MM image
parent
c0ac8c81
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
14 deletions
+16
-14
Dockerfile
Dockerfile
+12
-10
install-mattermost-plugin.sh
install-mattermost-plugin.sh
+4
-4
No files found.
Dockerfile
View file @
6ebbb0ac
...
...
@@ -12,28 +12,30 @@ COPY mattermost-admin-plugin-1.0.2-rc.tar.gz .
COPY
linux_amd64.tar .
RUN
tar
xvf linux_amd64.tar
FROM
registry1.dso.mil/ironbank/google/golang/golang-1.16:1.16
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/docker/scratch:ironbank
ENV
TARGET_URL="URL IS UNDEFINED"
ENV
TARGET_TOKEN="TARGET TOKEN IS UNDEFINED"
#
ENV TARGET_URL="URL 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/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
ENTRYPOINT
[ "./call_mm_plugin_installer.sh" ]
# old - ENTRYPOINT [ "./call_mm_plugin_installer.sh" ]
ENTRYPOINT
[ "./install-mattermost-plugin.sh" ]
# ENTRYPOINT ["tail", "-f", "/dev/null"]
HEALTHCHECK
NONE
install-mattermost-plugin.sh
View file @
6ebbb0ac
...
...
@@ -26,20 +26,20 @@ echo " using URL: $url";
echo
" using Token:
$token
"
;
# 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
"
# 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)
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
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
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment