Skip to content

Commit f758b09

Browse files
committed
Merge branch 'develop' into 11004-docker-block-solr #11004
Conflicts: doc/sphinx-guides/source/container/running/demo.rst
2 parents 55d0f41 + 6ddd86d commit f758b09

File tree

6 files changed

+168
-2
lines changed

6 files changed

+168
-2
lines changed

.github/workflows/codeql.yml

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL Advanced"
13+
14+
on:
15+
push:
16+
branches: [ "develop", "master" ]
17+
pull_request:
18+
branches: [ "develop", "master" ]
19+
schedule:
20+
- cron: '30 6 * * 4'
21+
22+
jobs:
23+
analyze:
24+
name: Analyze (${{ matrix.language }})
25+
# Runner size impacts CodeQL analysis time. To learn more, please see:
26+
# - https://gh.io/recommended-hardware-resources-for-running-codeql
27+
# - https://gh.io/supported-runners-and-hardware-resources
28+
# - https://gh.io/using-larger-runners (GitHub.com only)
29+
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
30+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
31+
permissions:
32+
# required for all workflows
33+
security-events: write
34+
35+
# required to fetch internal or private CodeQL packs
36+
packages: read
37+
38+
# only required for workflows in private repositories
39+
actions: read
40+
contents: read
41+
42+
strategy:
43+
fail-fast: false
44+
matrix:
45+
include:
46+
- language: actions
47+
build-mode: none
48+
- language: java-kotlin
49+
build-mode: none # This mode only analyzes Java. Set this to 'autobuild' or 'manual' to analyze Kotlin too.
50+
- language: javascript-typescript
51+
build-mode: none
52+
- language: python
53+
build-mode: none
54+
# CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
55+
# Use `c-cpp` to analyze code written in C, C++ or both
56+
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
57+
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
58+
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
59+
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
60+
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
61+
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
62+
steps:
63+
- name: Checkout repository
64+
uses: actions/checkout@v4
65+
66+
# Add any setup steps before running the `github/codeql-action/init` action.
67+
# This includes steps like installing compilers or runtimes (`actions/setup-node`
68+
# or others). This is typically only required for manual builds.
69+
# - name: Setup runtime (example)
70+
# uses: actions/setup-example@v1
71+
72+
# Initializes the CodeQL tools for scanning.
73+
- name: Initialize CodeQL
74+
uses: github/codeql-action/init@v3
75+
with:
76+
languages: ${{ matrix.language }}
77+
build-mode: ${{ matrix.build-mode }}
78+
# If you wish to specify custom queries, you can do so here or in a config file.
79+
# By default, queries listed here will override any specified in a config file.
80+
# Prefix the list here with "+" to use these queries and those in the config file.
81+
82+
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
83+
# queries: security-extended,security-and-quality
84+
85+
# If the analyze step fails for one of the languages you are analyzing with
86+
# "We were unable to automatically build your code", modify the matrix above
87+
# to set the build mode to "manual" for that language. Then modify this step
88+
# to build your code.
89+
# ℹ️ Command-line programs to run using the OS shell.
90+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
91+
- if: matrix.build-mode == 'manual'
92+
shell: bash
93+
run: |
94+
echo 'If you are using a "manual" build mode for one or more of the' \
95+
'languages you are analyzing, replace this with the commands to build' \
96+
'your code, for example:'
97+
echo ' make bootstrap'
98+
echo ' make release'
99+
exit 1
100+
101+
- name: Perform CodeQL Analysis
102+
uses: github/codeql-action/analyze@v3
103+
with:
104+
category: "/language:${{matrix.language}}"

.github/workflows/container_base_push.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
# Configure a remote ARM64 build host in addition to the local AMD64 in two steps.
5454
- name: Setup SSH agent
5555
if: ${{ github.event_name != 'schedule' }}
56-
uses: webfactory/[email protected].0
56+
uses: webfactory/[email protected].1
5757
with:
5858
ssh-private-key: ${{ secrets.BUILDER_ARM64_SSH_PRIVATE_KEY }}
5959
- name: Provide the known hosts key and the builder config
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
### File Previews Available in Dev Environment, More Docs
2+
3+
In Dataverse 6.5 File Previewers were enabled in the "demo or eval" containerized (Dockerized) environment (#11025). These previewers are now available in the development environment as well and [documentation](https://dataverse-guide--11181.org.readthedocs.build/en/11181/container/running/demo.html#file-previewers) has been added explaining how to configure them. See also #10506 and #11181.

doc/sphinx-guides/source/container/running/demo.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,28 @@ PID Providers
192192

193193
Dataverse supports multiple Persistent ID (PID) providers. The ``compose.yml`` file uses the Permalink PID provider. Follow :ref:`pids-configuration` to reconfigure as needed.
194194

195+
File Previewers
196+
+++++++++++++++
197+
198+
By default, all available file previewers are enabled (see :ref:`file-previews` in the User Guide for details). Specifically, we enable all the previewers that are available in the `trivadis/dataverse-previewers-provider <https://hub.docker.com/r/trivadis/dataverse-previewers-provider>`_ image (`code <https://github.com/TrivadisPF/docker-register-dataverse-previewers>`_). You can run the following command to see a list of available previewers:
199+
200+
``docker run --rm trivadis/dataverse-deploy-previewers:latest previewers``
201+
202+
You should expect to see output like this:
203+
204+
.. code-block:: text
205+
206+
name description
207+
----------------------------
208+
text Read the text file.
209+
html View the html file.
210+
...
211+
212+
If you want to specify fewer previewers, you can edit the ``compose.yml`` file. Uncomment "INCLUDE_PREVIEWERS" and list the previewers you want, separated by commas, like this:
213+
214+
``INCLUDE_PREVIEWERS=text,html,pdf,csv``
215+
216+
195217
.. _additional-metadata-blocks:
196218

197219
Additional Metadata Blocks

docker-compose-dev.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,42 @@ services:
241241
MINIO_ROOT_PASSWORD: s3cr3t_4cc355_k3y
242242
command: server /data
243243

244+
previewers-provider:
245+
container_name: previewers-provider
246+
hostname: previewers-provider
247+
image: trivadis/dataverse-previewers-provider:latest
248+
ports:
249+
- "9080:9080"
250+
networks:
251+
- dataverse
252+
environment:
253+
# have nginx match the port we run previewers on
254+
- NGINX_HTTP_PORT=9080
255+
- PREVIEWERS_PROVIDER_URL=http://localhost:9080
256+
- VERSIONS="v1.4,betatest"
257+
# https://docs.docker.com/reference/compose-file/services/#platform
258+
# https://github.com/fabric8io/docker-maven-plugin/issues/1750
259+
platform: linux/amd64
260+
261+
register-previewers:
262+
container_name: register-previewers
263+
hostname: register-previewers
264+
image: trivadis/dataverse-deploy-previewers:latest
265+
networks:
266+
- dataverse
267+
environment:
268+
- DATAVERSE_URL=http://dataverse:8080
269+
- TIMEOUT=10m
270+
- PREVIEWERS_PROVIDER_URL=http://localhost:9080
271+
# Uncomment to specify which previewers you want. Otherwise you get all of them.
272+
#- INCLUDE_PREVIEWERS=text,html,pdf,csv,comma-separated-values,tsv,tab-separated-values,jpeg,png,gif,markdown,x-markdown
273+
- EXCLUDE_PREVIEWERS=
274+
- REMOVE_EXISTING=true
275+
command:
276+
- deploy
277+
restart: "no"
278+
platform: linux/amd64
279+
244280
networks:
245281
dataverse:
246282
driver: bridge

docker/compose/demo/compose.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ services:
9797
- DATAVERSE_URL=http://dataverse:8080
9898
- TIMEOUT=10m
9999
- PREVIEWERS_PROVIDER_URL=http://${MACHINE_IP:-localhost}:9000
100-
- INCLUDE_PREVIEWERS=text,html,pdf,csv,comma-separated-values,tsv,tab-separated-values,jpeg,png,gif,markdown,x-markdown
100+
# Uncomment to specify which previewers you want. Otherwise you get all of them.
101+
#- INCLUDE_PREVIEWERS=text,html,pdf,csv,comma-separated-values,tsv,tab-separated-values,jpeg,png,gif,markdown,x-markdown
101102
- EXCLUDE_PREVIEWERS=
102103
- REMOVE_EXISTING=True
103104
command:

0 commit comments

Comments
 (0)