Skip to content

test_status_lists

test_status_lists #67

name: test_status_lists
on: workflow_dispatch
env:
RELEASE: ${{ github.ref_name }}
DOCKERVERSION: develop
jobs:
run_test:
runs-on: [self-hosted, runner3]
steps:
- name: Get dockers
run: |
docker pull genomehubs/genomehubs:$DOCKERVERSION
docker run --rm genomehubs/genomehubs sh -c 'echo $CONTAINER_VERSION'
- uses: actions/checkout@v3
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token.
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
- name: Check es health
run: curl -s "es1:9200/_cat/health"
- name: Delete indices for this branch/$RELEASE
run: |
curl -s -X DELETE "es1:9200/*--$RELEASE"
- name: Restore and rename snapshot to current branch
run: |
curl -s -X POST "es1:9200/_snapshot/dev/initassembly/_restore?wait_for_completion=true&pretty" \
-H 'Content-Type: application/json' \
-d' {
"ignore_unavailable": true,
"include_global_state": false,
"include_aliases": false,
"rename_pattern" : "--goat--202.*",
"rename_replacement" : "--goat--${{ env.RELEASE }}"
}'
- name: Add ES index.mapping.nested_objects.limit 1000000
run: |
curl -s -X PUT "es1:9200/taxon--ncbi--goat--${RELEASE}/_settings" \
-H 'Content-Type: application/json' \
-d '{ "index.mapping.nested_objects.limit" : 1000000 }'
- name: update config.yaml version
run: |
perl -i -plne 's/^(\s*version:) .*/$1 ${{ env.RELEASE }}/' sources/goat.yaml
- name: genomehubs index taxon status_lists
run: |
docker run --rm --network=host \
-v `pwd`/sources:/genomehubs/sources \
genomehubs/genomehubs:$DOCKERVERSION bash -c \
"genomehubs index \
--es-host es1:9200 \
--taxonomy-source ncbi \
--config-file sources/goat.yaml \
--taxon-dir sources/status_lists \
--taxon-lookup any --taxon-spellcheck"
- name: genomehubs index taxon genomesizekaryotype
run: |
docker run --rm --network=host \
-v `pwd`/sources:/genomehubs/sources \
genomehubs/genomehubs:$DOCKERVERSION bash -c \
"genomehubs index \
--es-host es1:9200 \
--taxonomy-source ncbi \
--config-file sources/goat.yaml \
--taxon-dir sources/genomesize_karyotype \
--taxon-lookup any --taxon-spellcheck"
- name: genomehubs index taxon assembly-data-taxon
run: |
docker run --rm --network=host \
-v `pwd`/sources:/genomehubs/sources \
genomehubs/genomehubs:$DOCKERVERSION bash -c \
"genomehubs index \
--es-host es1:9200 \
--taxonomy-source ncbi \
--config-file sources/goat.yaml \
--taxon-dir sources/assembly-data-taxon"
- name: genomehubs fill
run: |
docker run --rm --network=host \
-v `pwd`/sources:/genomehubs/sources \
genomehubs/genomehubs:$DOCKERVERSION bash -c \
"genomehubs fill \
--es-host es1:9200 \
--taxonomy-source ncbi \
--config-file sources/goat.yaml \
--traverse-root 2759 \
--traverse-infer-both"
- name: restart dockers
run: |
mkdir -p /volumes/docker/logs/$RELEASE
docker pull genomehubs/genomehubs-api:$DOCKERVERSION
docker rm -f goat-api
docker run -d \
--restart=always \
--net net-es \
-p 3010:3000 \
--user $UID:$GROUPS \
-e GH_ORIGINS="http://172.27.18.167:8010 http://172.27.18.167 null http://localhost:8010" \
-e GH_HUBNAME=goat -e GH_HUBPATH="/genomehubs/resources/" \
-e GH_NODE=http://es1:9200 \
-e GH_RELEASE=$RELEASE \
-e GH_SOURCE=https://github.com/genomehubs/goat-data/tree/$RELEASE \
-e GH_ACCESS_LOG=/genomehubs/logs/access.log \
-e GH_API_URL=https://172.27.18.167:3010/api/v2 \
-e GH_ERROR_LOG=/genomehubs/logs/error.log \
-v /volumes/docker/logs/$RELEASE:/genomehubs/logs \
-v /volumes/docker/resources:/genomehubs/resources \
--name goat-api \
genomehubs/genomehubs-api:$DOCKERVERSION
docker pull genomehubs/goat:$DOCKERVERSION
docker rm -f goat-ui
docker run -d --restart always \
--net net-es \
-p 8010:8880 \
--user $UID:$GROUPS \
-e GH_CLIENT_PORT=8880 \
-e GH_API_URL=http://172.27.18.167:3010/api/v2 \
-e GH_SUGGESTED_TERM=Canidae \
-e GH_BASENAME=/ \
-e GH_SITENAME=GoaT \
-e GH_ARCHIVE=latest \
--name goat-ui \
genomehubs/goat:$DOCKERVERSION