Skip to content

Commit

Permalink
Add sha option to bin/install.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
warrenvw committed Jul 11, 2017
1 parent f5ec8e9 commit b3f6b15
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
4 changes: 1 addition & 3 deletions images/stackstorm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,8 @@ RUN curl -s https://packagecloud.io/install/repositories/StackStorm/${ST2_REPO}/
# the st2-docker repo used to fetch this Dockerfile.
ARG ST2_DOCKER_SHA1="unknown"


# Override these values if you want to specify different package versions
ARG ST2_TAG=$(date)
RUN echo $ST2_TAG
ARG ST2_TAG
ARG ST2_VERSION
ARG ST2WEB_VERSION
ARG ST2MISTRAL_VERSION
Expand Down
13 changes: 10 additions & 3 deletions images/stackstorm/bin/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

# Parse options
while [[ "$#" > 1 ]]; do case $1 in
--tag) ST2_TAG="$2";;
--sha) ST2_DOCKER_SHA1="$2";;
--st2) ST2_VERSION="$2";;
--st2web) ST2WEB_VERSION="$2";;
--st2mistral) ST2MISTRAL_VERSION="$2";;
--tag) ST2_TAG="$2";;
*) break;;
esac; shift; shift;
done
Expand All @@ -20,8 +21,14 @@ if [ -z ${ST2MISTRAL_VERSION} ]; then
ST2MISTRAL_VERSION=`apt-cache madison st2mistral | cut -f 2 -d '|' | tr -d '[ \t]' | grep ${ST2_TAG} | head -1`
fi

echo "Installed versions: st2-${ST2_VERSION} st2web-${ST2WEB_VERSION} st2mistral-${ST2MISTRAL_VERSION}" > /st2-manifest.txt
echo "Image built at $(date) using st2-docker:${ST2_DOCKER_SHA1}" >> /st2-manifest.txt
MANIFEST="/st2-manifest.txt"

echo "Image built at $(date) using st2-docker:${ST2_DOCKER_SHA1}" > $MANIFEST
echo "" >> $MANIFEST
echo "Installed versions:" >> $MANIFEST
echo " - st2-${ST2_VERSION}" >> $MANIFEST
echo " - st2web-${ST2WEB_VERSION}" >> $MANIFEST
echo " - st2mistral-${ST2MISTRAL_VERSION}" >> $MANIFEST

# Install st2, st2web, and st2mistral
sudo apt-get install -y st2=${ST2_VERSION} st2web=${ST2WEB_VERSION} st2mistral=${ST2MISTRAL_VERSION}

0 comments on commit b3f6b15

Please sign in to comment.