Skip to content

Commit

Permalink
Merge 95e18f1 into b826caf
Browse files Browse the repository at this point in the history
  • Loading branch information
sanikolaev authored Oct 9, 2023
2 parents b826caf + 95e18f1 commit edac585
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -362,10 +362,11 @@ jobs:
cmake_command: |
mkdir build
cd build
cmake -DPACK=1 ..
cmake -DPACK=1 -DCMAKE_BUILD_TYPE=Debug ..
cmake --build . --target package
cache_key: pack_jammy_x86_64
artifact_list: "build/manticore*deb"
CTEST_CONFIGURATION_TYPE: "Debug"

build_test_kit_docker:
name: Test Kit docker image
Expand All @@ -386,7 +387,7 @@ jobs:
uses: manticoresoftware/download_artifact_with_retries@v2
continue-on-error: true
with:
name: build_jammy_RelWithDebInfo_x86_64
name: build_jammy_Debug_x86_64
path: .
# Uncomment this shortcut for debug to save time by not preparing the packages in the pack_jammy job
# - run: |
Expand Down
16 changes: 11 additions & 5 deletions dist/test_kit_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ cd docker
cat > manticore.conf << EOF
common {
plugin_dir = /usr/local/lib/manticore
lemmatizer_base = /usr/share/manticore/morph/
lemmatizer_base = /usr/share/manticore/
}
searchd {
listen = 9306:mysql41
Expand Down Expand Up @@ -141,16 +141,22 @@ docker exec manticore-test-kit bash -c \
docker exec manticore-test-kit bash -c \
"php -r \"copy('https://getcomposer.org/installer', 'composer-setup.php');\" && php -r \"if (hash_file('sha384', 'composer-setup.php') === 'e21205b207c3ff031906575712edab6f13eb0b361f2085f1f1237b7126d785e826a450292b6cfd1d64d92e6563bbde02') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;\" && php composer-setup.php && php -r \"unlink('composer-setup.php');\" && mv composer.phar /usr/bin/composer || true"

img_url="ghcr.io/manticoresoftware/manticoresearch:test-kit-$BUILD_COMMIT"
img_url_latest="ghcr.io/manticoresoftware/manticoresearch:test-kit-latest"
[[ $GITHUB_REF_NAME == "master" ]] && branch="" || branch="-${GITHUB_REF_NAME////-}"
img_url="ghcr.io/manticoresoftware/manticoresearch:test-kit-${BUILD_COMMIT}${branch}"
images=("$img_url")
[[ $GITHUB_REF_NAME == "master" ]] \
&& img_url_latest="ghcr.io/manticoresoftware/manticoresearch:test-kit-latest" \
&& images+=("$img_url_latest") \
|| img_url_latest=""

echo "Going to push to '$img_url' and '$img_url_latest' (if not empty) if there's access to the registry"

# exporting the image, it also squashes all the layers into one
docker export manticore-test-kit > ../manticore_test_kit.img
docker import ../manticore_test_kit.img $img_url
docker tag $img_url $img_url_latest
[ ! -z "$img_url_latest" ] && docker tag $img_url $img_url_latest

# pusing to ghcr.io
images=("$img_url" "$img_url_latest")
[ ! -z "$GHCR_USER" ] && for img in "${images[@]}"; do
docker push $img \
&& echo "❗ Pushed the image to $img" \
Expand Down

0 comments on commit edac585

Please sign in to comment.