From e33e37f68b0c849233aca01c938b205ec680e45f Mon Sep 17 00:00:00 2001 From: Jan Range Date: Thu, 21 Mar 2024 13:32:22 +0100 Subject: [PATCH] minor formatting --- .github/workflows/test-artifact.yml | 6 ++--- action.yml | 22 ++++++++-------- docker-compose.yml | 40 ++++++++++++++--------------- 3 files changed, 34 insertions(+), 34 deletions(-) diff --git a/.github/workflows/test-artifact.yml b/.github/workflows/test-artifact.yml index 26daa23..329d419 100644 --- a/.github/workflows/test-artifact.yml +++ b/.github/workflows/test-artifact.yml @@ -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 @@ -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 \ No newline at end of file + run: exit 0 diff --git a/action.yml b/action.yml index 4d7ec0e..7ae3f63 100644 --- a/action.yml +++ b/action.yml @@ -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}" @@ -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() @@ -118,4 +118,4 @@ runs: uses: actions/upload-artifact@master with: name: logs.tgz - path: ./logs.tgz \ No newline at end of file + path: ./logs.tgz diff --git a/docker-compose.yml b/docker-compose.yml index 209a812..a35552f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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 @@ -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: @@ -33,18 +33,18 @@ 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 @@ -52,49 +52,49 @@ services: - 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