Skip to content

Commit

Permalink
Check for schema version for 2.9
Browse files Browse the repository at this point in the history
  • Loading branch information
amercader committed Dec 13, 2024
1 parent 2df1f55 commit 51add10
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ jobs:
make build CKAN_VERSION=${{ inputs.ckan_version }} CKAN_BRANCH=${{ inputs.ckan_branch }}
- name: Assert the image has the right schema version
if: ${{ inputs.ckan_branch != 'dev-v2.9'}}
run: |
VERSION_IN_SCHEMA=$(
docker run --rm \
Expand All @@ -59,6 +60,20 @@ jobs:
exit 1
fi
- name: Assert the image has the right schema version (2.9)
if: ${{ inputs.ckan_branch == 'dev-v2.9'}}
run: |
VERSION_IN_SCHEMA=$(
docker run --rm \
ckan/ckan-solr:${{ inputs.ckan_version }}-solr${{ inputs.solr_version }} \
grep -o "<schema name=\"ckan\" version=\"[0-9]\.[0-9]*" /opt/solr/server/solr/configsets/ckan/conf/managed-schema | cut -d'-' -f2
)
if [ "$VERSION_IN_SCHEMA" != "${{ inputs.ckan_version }}" ]; then
echo "Version in schema $VERSION_IN_SCHEMA does not match CKAN version ${{ inputs.ckan_version }}"
exit 1
fi
- name: Run the built image
run: |
docker run --name ckan-solr -p 8983:8983 -d ckan/ckan-solr:${{ inputs.ckan_version }}-solr${{ inputs.solr_version }}
Expand Down

0 comments on commit 51add10

Please sign in to comment.