Skip to content

Commit

Permalink
minor formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
JR-1991 committed Mar 21, 2024
1 parent e95ccaf commit e33e37f
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 34 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test-artifact.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
id: dataverse
uses: ./
with:
image_tag: "burritohasbeeneaten"
image_tag: "burritohasbeeneaten"
postgresql_version: 15
jvm_options: |
dataverse.api.signature-secret=eikaizieb2Oghaex
Expand All @@ -24,7 +24,7 @@ jobs:
if: ${{ failure(steps.dataverse) }}
uses: xSAVIKx/artifact-exists-action@v0
with:
name: "logs.tgz"
name: "logs.tgz"
- name: Set GitHub Action as success if "dataverse" has failed
if: ${{ success(steps.artifact-check) }}
run: exit 0
run: exit 0
22 changes: 11 additions & 11 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,23 +50,23 @@ runs:
if [[ -z "${PG_VERSION}" ]]; then
echo "Cannot find PostgreSQL version"; exit 1
else
echo "POSTGRES_VERSION=$PG_VERSION" | tee -a "${GITHUB_ENV}"
echo "POSTGRES_VERSION=$PG_VERSION" | tee -a "${GITHUB_ENV}"
fi
# Get Solr version from action config or application image metadata, fail otherwise
SOLR_VERSION=${{ inputs.solr_version }}
SOLR_VERSION="${SOLR_VERSION:-$(docker inspect -f '{{ index .Config.Labels "org.dataverse.deps.solr.version"}}' '${{ inputs.image_dataverse }}:${{ inputs.image_tag }}')}"
if [[ -z "${SOLR_VERSION}" ]]; then
echo "Cannot find Solr version"; exit 1
else
echo "SOLR_VERSION=$SOLR_VERSION" | tee -a "${GITHUB_ENV}"
echo "SOLR_VERSION=$SOLR_VERSION" | tee -a "${GITHUB_ENV}"
fi
echo "CONFIGBAKER_IMAGE=${{ inputs.image_configbaker }}:${{ inputs.image_tag }}" | tee -a "${GITHUB_ENV}"
echo "DATAVERSE_IMAGE=${{ inputs.image_dataverse }}:${{ inputs.image_tag }}" | tee -a "${GITHUB_ENV}"
echo "DATAVERSE_DB_USER=dataverse" | tee -a "${GITHUB_ENV}"
echo "DATAVERSE_DB_PASSWORD=secret" | tee -a "${GITHUB_ENV}"
# We use the MicroProfile Config Source trick of reading properties from a directory.
# See also https://docs.payara.fish/community/docs/Technical%20Documentation/MicroProfile/Config/Directory.html
echo "CONFIG_DIR=${RUNNER_TEMP}/dv/conf" | tee -a "${GITHUB_ENV}"
Expand All @@ -90,25 +90,25 @@ runs:
echo "::group::🤖 Bootstrap Dataverse service"
mkdir -p "${RUNNER_TEMP}/dv"
touch "${RUNNER_TEMP}/dv/bootstrap.exposed.env"
docker run -i --network apitest_dataverse \
-v "${RUNNER_TEMP}/dv/bootstrap.exposed.env:/.env" \
"${CONFIGBAKER_IMAGE}" bootstrap.sh -e /.env dev
# Expose outputs
grep "API_TOKEN" "${RUNNER_TEMP}/dv/bootstrap.exposed.env" >> "$GITHUB_OUTPUT"
echo "base_url=http://localhost:8080/" >> "$GITHUB_OUTPUT"
# Expose version
version=$(curl -s 'http://localhost:8080/api/info/version' | jq -r '.data.version')
echo "dv_version=$version" >>"$GITHUB_OUTPUT"
echo "::endgroup::"
- name: Dump docker logs on failure
if: failure()
uses: jwalton/gh-docker-logs@v2
with:
dest: './logs'
dest: "./logs"
- name: Tar logs
shell: bash
if: failure()
Expand All @@ -118,4 +118,4 @@ runs:
uses: actions/upload-artifact@master
with:
name: logs.tgz
path: ./logs.tgz
path: ./logs.tgz
40 changes: 20 additions & 20 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
version: '2.4'
version: "2.4"

services:
dataverse:
container_name: 'dataverse'
container_name: "dataverse"
hostname: dataverse
image: ${DATAVERSE_IMAGE}
restart: on-failure
Expand All @@ -12,7 +12,7 @@ services:
- DATAVERSE_DB_USER=${DATAVERSE_DB_USER}
- DATAVERSE_DB_PASSWORD=${DATAVERSE_DB_PASSWORD}
ports:
- '8080:8080'
- "8080:8080"
networks:
- dataverse
depends_on:
Expand All @@ -33,68 +33,68 @@ services:
privileged: false

dv_initializer:
container_name: 'dv_initializer'
container_name: "dv_initializer"
image: ${CONFIGBAKER_IMAGE}
restart: 'no'
restart: "no"
command:
- sh
- -c
- 'fix-fs-perms.sh dv'
- "fix-fs-perms.sh dv"
volumes:
- ${RUNNER_TEMP}/dv/data:/dv

postgres:
container_name: 'postgres'
container_name: "postgres"
hostname: postgres
image: postgres:${POSTGRES_VERSION}
restart: on-failure
environment:
- POSTGRES_USER=${DATAVERSE_DB_USER}
- POSTGRES_PASSWORD=${DATAVERSE_DB_PASSWORD}
ports:
- '5432:5432'
- "5432:5432"
networks:
- dataverse

solr_initializer:
container_name: 'solr_initializer'
container_name: "solr_initializer"
image: ${CONFIGBAKER_IMAGE}
restart: 'no'
restart: "no"
command:
- sh
- -c
- 'fix-fs-perms.sh solr && cp -a /template/* /solr-template'
- "fix-fs-perms.sh solr && cp -a /template/* /solr-template"
volumes:
- ${RUNNER_TEMP}/solr/data:/var/solr
- ${RUNNER_TEMP}/solr/conf:/solr-template

solr:
container_name: 'solr'
hostname: 'solr'
container_name: "solr"
hostname: "solr"
image: solr:${SOLR_VERSION}
depends_on:
solr_initializer:
condition: service_completed_successfully
restart: on-failure
ports:
- '8983:8983'
- "8983:8983"
networks:
- dataverse
command:
- 'solr-precreate'
- 'collection1'
- '/template'
- "solr-precreate"
- "collection1"
- "/template"
volumes:
- ${RUNNER_TEMP}/solr/data:/var/solr
- ${RUNNER_TEMP}/solr/conf:/template

smtp:
container_name: 'smtp'
hostname: 'smtp'
container_name: "smtp"
hostname: "smtp"
image: maildev/maildev:2.0.5
restart: on-failure
expose:
- '25' # smtp server
- "25" # smtp server
environment:
- MAILDEV_SMTP_PORT=25
- MAILDEV_MAIL_DIRECTORY=/mail
Expand Down

0 comments on commit e33e37f

Please sign in to comment.