Skip to content

Commit

Permalink
include galaxy plugin in webservice docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
svonworl authored Oct 25, 2022
1 parent 0445d07 commit 1d3eac3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 18 deletions.
1 change: 0 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ services:
- ./config/web.yml:/home/web.yml
- ./config/init_webservice.sh:/home/init_webservice.sh
- ${GITHUB_APP_PRIVATE_KEY_FILE}:/dockstore/github-key/dockstore-github-private-key.pem
- ../language-plugins/:/root/.dockstore/language-plugins
command: ["bash", "/home/init_webservice.sh"]
ports:
- "8081:8081"
Expand Down
14 changes: 0 additions & 14 deletions install_bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -66,27 +66,13 @@ function template()
for f in $(ls templates/rules/); do mustache dockstore_launcher_config/compose.config templates/rules/$f > config/rules/$f; done
}

# Delete any galaxy plugin versions already in folder and download if a version has been specified.
function download_galaxy()
{
if [ ! -d "../language-plugins" ] ; then
mkdir ../language-plugins
fi

find ../language-plugins -regextype posix-extended -regex '.*dockstore-galaxy-interface.*' -delete
wget -nc -P ../language-plugins/ https://artifacts.oicr.on.ca/artifactory/collab-release/com/github/galaxyproject/dockstore-galaxy-interface/dockstore-galaxy-interface/${GALAXY_PLUGIN_VERSION}/dockstore-galaxy-interface-${GALAXY_PLUGIN_VERSION}.jar

}

#Read the config file if it exists
if [ -f dockstore_launcher_config/compose.config ] ; then
source <(jq -r 'to_entries|map("\(.key)=\"\(.value|tostring)\"")|.[]' dockstore_launcher_config/compose.config)
fi

template

download_galaxy "$*"

if [ $IS_FARGATE_DEPLOY == "false" ]; then
# We need to set the environment variable for the image digest
source .env
Expand Down
7 changes: 4 additions & 3 deletions scripts/webservice-image-digest.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,10 @@ def get_commit_from_github(tag_or_branch):
def get_digest_from_s3(directory):
# downloads the image-digest.txt from a directory in S3
base_url = "https://gui.dockstore.org"
response = requests.get("{}/{}/image-digest.txt".format(base_url, directory))
digest_url = "{}/{}/image-digest.txt".format(base_url, directory.replace("/", "_"))
response = requests.get(digest_url)
if (response.status_code != 200):
print("Expected a file at {}".format("{}/{}/image-digest.txt".format(base_url, directory)))
print("Expected a file at {}".format(digest_url))
print("The image-digest.txt was not found in S3, did the build succeed?")
exit(1)
# There is a newline at the end of the file we rstrip
Expand All @@ -70,7 +71,7 @@ def get_digest_from_s3(directory):
# slashes are replaced with _ in docker image tags
# check to see if input includes a dash followed by 7 chars
parsed = args.tag.split('-')
if len(parsed) == 2 and len(parsed[1]) == 7 and all(c in string.hexdigits for c in parsed[1]):
if len(parsed) >= 2 and len(parsed[-1]) == 7 and all(c in string.hexdigits for c in parsed[-1]):
directory = args.tag
else:
commit = get_commit_from_github(args.tag)
Expand Down

0 comments on commit 1d3eac3

Please sign in to comment.