-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding MySQL Support #18
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,14 @@ else | |
echo "-> Extracting to $BAMBOO_DIR ..." | ||
tar xzf /tmp/atlassian-bamboo.tar.gz -C /opt | ||
rm -f /tmp/atlassian-bamboo.tar.gz | ||
|
||
echo "Add MySQL" | ||
MYSQL_CONNECTOR_VERSION="5.1.38" | ||
wget http://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-$MYSQL_CONNECTOR_VERSION.tar.gz -O /tmp/mysql-connector.tar.gz | ||
tar xzf /tmp/mysql-connector.tar.gz -C /tmp | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Extracting into /tmp is poor practice, I'd recommend creating a temporary directory (MYSQL_TMP_DIR= |
||
mv /tmp/mysql-connector-java-$MYSQL_CONNECTOR_VERSION/mysql-connector-java-$MYSQL_CONNECTOR_VERSION-bin.jar /opt/atlassian-bamboo-5.1/lib/ | ||
rm -Rf /tmp/* | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is too greedy and may have unintended side effects. It can be avoided with a wrapping temporary directory. |
||
|
||
echo "-> Installation completed" | ||
fi | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not everyone will want to use MySQL and need this connector. I'd add a BAMBOO_DB env var in the Dockerfile, defaulting to embedded but also supporting mysql and postgresql. You could then check that and see if it's appropriate to download a particular driver.