UNCLASSIFIED

Commit 6ebbb0ac authored by paulqualls's avatar paulqualls
Browse files

adjusting to ironbank MM image

parent c0ac8c81
......@@ -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
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment