Skip to content
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

[CI] Added workflow for publishing the Solr image #303

Merged
merged 1 commit into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/solr.yaml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

naming: let's have here more specific name: gha-docker-solr.yaml, solr can lead to many expectations, while the purpose of this is to create image for gha-run tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I will include this note in a follow-up as well

Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Build and publish Solr Docker image
on:
workflow_dispatch: ~

env:
IMAGE_NAME: ghcr.io/ibexa/core/solr

jobs:
build-and-publish:
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- uses: actions/checkout@v3
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build image
run: docker build -t "$IMAGE_NAME:latest" docker/solr
- name: Push image
if: github.event_name == 'workflow_dispatch'
run: docker push "$IMAGE_NAME"

14 changes: 14 additions & 0 deletions docker/solr/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM alpine:3.18.5 as builder
RUN apk add --no-cache --upgrade bash git curl
RUN adduser --disabled-password user
USER user
WORKDIR /home/user
RUN git clone --depth=1 https://github.com/ibexa/solr.git solr
RUN ./solr/bin/generate-solr-config.sh --destination-dir=config --solr-version=8.6.3

FROM solr:8.6.3
USER root
RUN rm -rf server/solr/configsets/_default/conf/*
USER solr
COPY --from=builder /home/user/config server/solr/configsets/_default/conf
CMD ["solr-precreate", "collection1"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure where this comment ended up, but my question here was if we're able to run multicore tests somehow. collection1 is dedicated to single core tests, while we have several jobs (do we still in core?) testing also multi-core behavior.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The multicore tests are run in the solr package. I believe it should be possible to include them in this repository - and in the Solr image - we would have create different cores.

I wouldn't do this now, can we come back to this after the release?

Loading