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

merge changes in active branch to development #142

Open
wants to merge 228 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
228 commits
Select commit Hold shift + click to select a range
954bbc2
Update standaardenregister.json
KristofVDB1 May 6, 2024
1d5061e
Standaardenregister 2.0 flow
KristofVDB1 May 6, 2024
42f7183
test2
bertvannuffelen Apr 15, 2024
cfab45c
make test early
bertvannuffelen Apr 15, 2024
a2a8ccb
test3
bertvannuffelen Apr 15, 2024
c45e8b4
New and improved config file for standaardenregister
KristofVDB1 May 6, 2024
eb25db6
Added list items statement inside circleCI
KristofVDB1 Apr 24, 2024
870936d
New config file for circleCI
KristofVDB1 Apr 24, 2024
8671314
Added correct `cp` command
KristofVDB1 Apr 25, 2024
33c9ec7
Added list files step inside dockerfile
KristofVDB1 Apr 25, 2024
3350097
Also add ls ./ to see where we are when building
KristofVDB1 Apr 25, 2024
f4fe5ac
some extra logging during build
KristofVDB1 Apr 25, 2024
ddc0b62
Trying to copy content into root of project
KristofVDB1 Apr 25, 2024
b62114c
More logs in the root
KristofVDB1 Apr 25, 2024
1cffb47
Migrated content logic from ci to makefile
KristofVDB1 Apr 25, 2024
2735bd1
Migrated fetch content step into makefile
KristofVDB1 Apr 25, 2024
1ea6653
Readded echo for Docker connection
KristofVDB1 Apr 25, 2024
d0b4a5a
Added an extra script for sanitizing the configurations
KristofVDB1 May 6, 2024
842542f
New circleCI config for conversion
KristofVDB1 Apr 29, 2024
274d4e7
Changed `ls` command
KristofVDB1 Apr 29, 2024
800015f
SOme more ls commands inside config
KristofVDB1 Apr 29, 2024
3837fdc
Final `ls` added to config
KristofVDB1 Apr 29, 2024
791b33a
Added new `js` file to convert the standards to a new format
KristofVDB1 Apr 29, 2024
fc18b01
Hardcoded path in `sanitizeConfigurations` file
KristofVDB1 Apr 29, 2024
6a57124
New version of script without `__dirname`
KristofVDB1 Apr 29, 2024
c3fc53d
Removed `ls` commands and renamed `workdir` to `working_directory` to…
KristofVDB1 Apr 29, 2024
f625fc2
Added cronjob to /scripts
KristofVDB1 Apr 29, 2024
2f9da20
Potential fix for special characters like ë not working (cfr financië…
KristofVDB1 Apr 29, 2024
315518b
Added comment inside CRONJOB
KristofVDB1 Apr 29, 2024
95f8b87
Made the `rm -rf` command conditional
KristofVDB1 Apr 29, 2024
29f0912
Different option for failing `rm -rf`
KristofVDB1 Apr 29, 2024
66355a9
Remove `rm -rf` command
KristofVDB1 Apr 29, 2024
c34de18
Try again with linux conform build-base
KristofVDB1 Apr 30, 2024
7a85347
Let the CI/CD push to the `dev` branch of OSLO-standaardenregister ra…
KristofVDB1 Apr 30, 2024
cba563b
Changed scripts to fetch from `dev` rather than circleCI
KristofVDB1 Apr 30, 2024
e1a3802
Added echo date object to CRONJOB
KristofVDB1 Apr 30, 2024
2be9f04
Added a new sanitizeConfiguration script that converts uris from rela…
KristofVDB1 Apr 30, 2024
79bc0af
added logs into sanitizeConfiguration script
KristofVDB1 Apr 30, 2024
ae8bc44
Extra logs inside script and removed`cleanupConfig` for now
KristofVDB1 May 6, 2024
4da667f
More logs inside nuxt scripts
KristofVDB1 May 6, 2024
28db890
Store repository name inside config file
KristofVDB1 May 6, 2024
9e6b1e1
Introduced new branch "standaarden" as source of truth for standaarde…
KristofVDB1 May 6, 2024
1897657
Added extra echo statement to see the output of the config
KristofVDB1 May 6, 2024
b178e3c
Added new key `repository` into config for correct urls
KristofVDB1 May 6, 2024
aee3c88
Final version of the `sanitizeConfigurations` script
KristofVDB1 May 6, 2024
79fdf6e
Added support for multiple services to be restarted (standaardenregis…
KristofVDB1 May 6, 2024
21b56d1
Dummy run trigger
KristofVDB1 May 6, 2024
47add45
Merge branch 'dev' into configuratie
KristofVDB1 May 6, 2024
3a594ca
Added all jobs to run
KristofVDB1 May 6, 2024
387348d
Update cronjob
KristofVDB1 May 7, 2024
82fdedd
Update standaardenregister.json
jitsedc May 7, 2024
810d413
Update standaardenregister.json
KristofVDB1 May 8, 2024
de4780d
Updated CRONJOB to pull SHA from latest image in registry
KristofVDB1 May 8, 2024
de3ee28
Update standaardenregister.json
KristofVDB1 May 8, 2024
d947eec
Update standaardenregister.json
KristofVDB1 May 8, 2024
182b626
Update standaardenregister.json
KristofVDB1 May 8, 2024
670ba37
Update standaardenregister.json
KristofVDB1 May 8, 2024
fb7f614
Update standaardenregister.json
KristofVDB1 May 13, 2024
33681e3
Add support to copy `statistics.json` as well as the standaarden conf…
KristofVDB1 May 13, 2024
15b4d02
Change MAKEFILE `fetch-content` to include `statistics.json`
KristofVDB1 May 13, 2024
0427260
Update standaardenregister.json
KristofVDB1 May 13, 2024
9e9583f
Update standaardenregister.json
KristofVDB1 May 13, 2024
5cb0b5e
Update standaardenregister.json
KristofVDB1 May 14, 2024
9762ab9
Added new `sanitizeConfigurations` script to add support for an array…
KristofVDB1 May 14, 2024
1c0357f
Fix for `sanitizeConfigurations` file
KristofVDB1 May 14, 2024
7583fd1
Update standaardenregister.json
LouiseYsewijn May 14, 2024
e5dc922
new version of `sanitizeConfigurations.js`
KristofVDB1 May 14, 2024
4812ff8
Update standaardenregister.json
KristofVDB1 May 14, 2024
6826df9
Update standaardenregister.json
KristofVDB1 May 14, 2024
b92d6b2
Renamed `studentenattesten` to `leerinschrijfcredential`
KristofVDB1 May 16, 2024
9b5ffe6
Update standaardenregister.json
KristofVDB1 May 16, 2024
c724162
Added leerinschrijfcredential
KristofVDB1 May 16, 2024
665dafb
Dummy increase for `omgevingsvergunning`
KristofVDB1 May 16, 2024
e214b65
Dummy increase leerinschrijfcredential
KristofVDB1 May 16, 2024
9b6d692
Dummy
KristofVDB1 May 16, 2024
425dd37
Dummy
KristofVDB1 May 16, 2024
d9d25a2
dummy
KristofVDB1 May 16, 2024
391989a
dummy
KristofVDB1 May 16, 2024
f93e2c7
dummy
KristofVDB1 May 16, 2024
6150a2b
Extra console log
KristofVDB1 May 16, 2024
03a2c48
Update to script
KristofVDB1 May 16, 2024
e544fb8
Disable layer caching to see if it affect standards
KristofVDB1 May 16, 2024
0f7b549
Readded caching of layers docker
KristofVDB1 May 16, 2024
934f748
New script
KristofVDB1 May 16, 2024
ceb748b
Update standaardenregister.json
jitsedc May 21, 2024
08d9778
Toevoeging voc & ap digitale watermeter
jitsedc May 21, 2024
22041f2
Update standaardenregister.json
jitsedc May 21, 2024
e1940a1
Update standaardenregister.json
jitsedc May 21, 2024
1b8ee5d
Update standaardenregister.json
KristofVDB1 May 21, 2024
3f77916
Added `ls` statement to see what's inside `nuxt-sanitized` folder
KristofVDB1 May 21, 2024
6012c56
extra `ls` command for the /tmp folder
KristofVDB1 May 22, 2024
763e86a
Improved `ls` command
KristofVDB1 May 22, 2024
b326e8e
Extra edit to `ls` statement
KristofVDB1 May 22, 2024
71b1db6
improved `ls` command
KristofVDB1 May 22, 2024
b57ce9c
Update standaardenregister.json
williamverbeeck May 22, 2024
d709cfc
Update standaardenregister.json
yarondassonneville May 22, 2024
f372c19
Update standaardenregister.json
williamverbeeck May 22, 2024
51551eb
Update standaardenregister.json
jitsedc May 22, 2024
a0a16ed
Update standaardenregister.json
jitsedc May 22, 2024
c2bd926
Update standaardenregister.json
jitsedc May 22, 2024
ed7720f
improved `ls` command
KristofVDB1 May 22, 2024
f98f1fa
Update standaardenregister.json
jitsedc May 22, 2024
fe1b1fe
Added extra `ls` statement in git step
KristofVDB1 May 22, 2024
3329c59
Added extra content to `ls `
KristofVDB1 May 22, 2024
1b9aad1
introduced new `sanitizeConfigurations` script to allow for new dates
KristofVDB1 May 23, 2024
cf7b5c9
Dummy commit
KristofVDB1 May 23, 2024
992acc1
Update standaardenregister.json
jitsedc May 23, 2024
8005492
Update standaardenregister.json
jitsedc May 23, 2024
5044d94
Update standaardenregister.json
jitsedc May 23, 2024
17b65c8
Update standaardenregister.json
jitsedc May 23, 2024
6c5ee0e
Normalisering datum
jitsedc May 23, 2024
99ab075
Update standaardenregister.json
jitsedc May 23, 2024
98ca74d
Update standaardenregister.json
jitsedc May 23, 2024
9eb761e
Opsplitsing ap & voc cultuurparticipatie
jitsedc May 23, 2024
77c3fb5
Update documentatie CE ap en vocs
jitsedc May 23, 2024
de1194d
Merge branch 'configuratie' of https://github.com/Informatievlaandere…
jitsedc May 23, 2024
5bcfbf2
Update standaardenregister.json
jitsedc May 23, 2024
c2022d9
Update standaardenregister.json
jitsedc May 23, 2024
6e25b51
Update standaardenregister.json
jitsedc May 23, 2024
309f2ac
Update standaardenregister.json
jitsedc May 23, 2024
7ac9290
Update standaardenregister.json
jitsedc May 23, 2024
5c074b2
Update standaardenregister.json
jitsedc May 23, 2024
acdaf39
date normalisatie verkeersmetingen
jitsedc May 23, 2024
ec7c97a
Update standaardenregister.json
jitsedc May 23, 2024
156bb3a
Update standaardenregister.json
yarondassonneville May 24, 2024
7bb8b25
Update standaardenregister.json
jitsedc May 24, 2024
07a8b21
Update standaardenregister.json
SamVangramberen May 24, 2024
0ac6154
Fix for dummy value of 01 to 1 to be JSON-compliant
KristofVDB1 May 27, 2024
052f1a9
Removed `ls` statement
KristofVDB1 May 27, 2024
749f013
RELEASE STANDAARDENREGISTER 2.0 | 29/05/2024
KristofVDB1 May 29, 2024
15b3188
RELEASE STANDAARDENREGISTER 2.0 | 29/05/2024
KristofVDB1 May 29, 2024
fed8fde
RELEASE STANDAARDENREGISTER 2.0 | 29/05/2024
KristofVDB1 May 29, 2024
b666baa
Renamed `ap-config` to `impl-config` for OSLOthema-wegenEnWegmarkeringen
KristofVDB1 May 29, 2024
ab57706
Cleanup of `circleCI` script
KristofVDB1 May 29, 2024
db8093b
RELEASE STANDAARDENREGISTER 2.0 | 29/05/2024
KristofVDB1 May 29, 2024
ede1de1
Temp disabled the `create-statistics` step
KristofVDB1 May 29, 2024
48c5868
Change `requires` for `prepare-nuxt` step
KristofVDB1 May 29, 2024
ba330d9
disabled requirement of `prepare-statistics`
KristofVDB1 May 29, 2024
2eb6369
disable `cp statistics.json` step
KristofVDB1 May 29, 2024
58a2834
Update standaardenregister.json
jitsedc May 30, 2024
a9a0bcf
Update standaardenregister.json
jitsedc May 31, 2024
7cbe257
Update standaardenregister.json
jitsedc May 31, 2024
69fe17e
Update standaardenregister.json
LouiseYsewijn Jun 3, 2024
4b22124
Update standaardenregister.json
KristofVDB1 Jun 3, 2024
981460a
Reenabled `create_statistics` step
KristofVDB1 Jun 3, 2024
7a9d02c
Added a `cat statistics.json` command to the CI
KristofVDB1 Jun 3, 2024
f14a4b4
Updated `extract-info.sh` with new keys of standaardenregister's conf…
KristofVDB1 Jun 4, 2024
f0f0ae2
Update standaardenregister.json
williamverbeeck Jun 4, 2024
cb25d49
Added some `echo` statements to the extract-info.sh script
KristofVDB1 Jun 4, 2024
98c6b85
Update to `extract-info.sh` script
KristofVDB1 Jun 4, 2024
5560004
Fix for statistieken not working
KristofVDB1 Jun 4, 2024
d2a6d84
Extension to `statistics.sh` method for organisations/people
KristofVDB1 Jun 5, 2024
4212f10
Added`circleci/node` image and fixes to `statistics.sh` script
KristofVDB1 Jun 5, 2024
bfeebd5
Explicitly install `jq`
KristofVDB1 Jun 5, 2024
450c8ae
Install `jq` directly from `statistics.sh`
KristofVDB1 Jun 5, 2024
785cbd6
remove `sudo`
KristofVDB1 Jun 5, 2024
f1288bd
Fix for `statistics.sh` script
KristofVDB1 Jun 5, 2024
12c5689
new shell script for contributors and terms
KristofVDB1 Jun 5, 2024
3c0c1d5
Remove unneeded ` `
KristofVDB1 Jun 5, 2024
d4f0322
Working on `contributors-and-terms.sh`
KristofVDB1 Jun 5, 2024
d5390ec
Statistics
KristofVDB1 Jun 5, 2024
aaa559a
statistics
KristofVDB1 Jun 5, 2024
ab304ff
Don't overwrite existing content
KristofVDB1 Jun 5, 2024
8f0e0c2
Final fix and cleanup
KristofVDB1 Jun 5, 2024
e4a4f52
Republish openbaar domein
KristofVDB1 Jun 6, 2024
0bfdbe3
Collapse OSLOthema-leer* repos.
saxomoose Jun 7, 2024
31a95dd
Update standaardenregister.json
jitsedc Jun 7, 2024
3462d2c
Collapse OSLOthema-leer* repos.
saxomoose Jun 7, 2024
843e51c
Republish leerinschrijfcredential standard
s-minoo Jun 7, 2024
b52192d
Rebuild Leercredential related sites
s-minoo Jun 12, 2024
c476b2c
Update standaardenregister.json
jitsedc Jun 14, 2024
eade83d
Rebuild leerinschrijfcredential
s-minoo Jun 14, 2024
beb66e8
Update standaardenregister.json
jitsedc Jun 14, 2024
56a3940
Rebuild leerinschrijf site
s-minoo Jun 14, 2024
c7c1aa0
AP VOC update dwm
williamverbeeck Jun 14, 2024
9739962
Update standaardenregister.json
jitsedc Jun 14, 2024
65618c3
Update standaardenregister.json
yarondassonneville Jun 17, 2024
9012003
Update standaardenregister.json
yarondassonneville Jun 18, 2024
210d18a
Update standaardenregister.json
jitsedc Jun 20, 2024
b0b2d45
Update standaardenregister.json
jitsedc Jun 20, 2024
e1509d3
Update standaardenregister.json
yarondassonneville Jun 24, 2024
1d1283c
Rebuild of DCAT-AP-VL
KristofVDB1 Jun 25, 2024
7a3fbb8
Trigger a run
KristofVDB1 Jun 27, 2024
845d6cb
Update standaardenregister.json
jitsedc Jun 28, 2024
2618aa9
Update standaardenregister.json
yarondassonneville Jul 12, 2024
11206fd
Update standaardenregister.json
yarondassonneville Jul 16, 2024
d530d98
Update standaardenregister.json
yarondassonneville Jul 16, 2024
dcb19c2
Update standaardenregister.json
yarondassonneville Jul 17, 2024
98d6a13
Update standaardenregister.json
elsdvlee Jul 18, 2024
a158716
Update standaardenregister.json
elsdvlee Jul 18, 2024
2f9d017
Update standaardenregister.json
elsdvlee Jul 18, 2024
e445b15
Update standaardenregister.json
elsdvlee Jul 19, 2024
9d21578
Update standaardenregister.json
elsdvlee Jul 23, 2024
242b025
Update standaardenregister.json
williamverbeeck Jul 23, 2024
6598870
Update standaardenregister.json
elsdvlee Jul 26, 2024
17984ce
Update standaardenregister.json
elsdvlee Jul 29, 2024
5affe00
Update standaardenregister.json
LorenzoVylders Jul 30, 2024
6b2d4b4
Update standaardenregister.json
LorenzoVylders Jul 30, 2024
2e1bf7d
Update standaardenregister.json
williamverbeeck Jul 30, 2024
d5c457a
Update standaardenregister.json
yarondassonneville Aug 8, 2024
caec4a4
Update standaardenregister.json
yarondassonneville Aug 8, 2024
910a182
Update standaardenregister.json
KristofVDB1 Aug 13, 2024
e4b02c7
Trigger build for slimme Stadsdistributie
KristofVDB1 Aug 19, 2024
cba0ad6
Update standaardenregister.json
LouiseYsewijn Aug 19, 2024
480e08d
Update standaardenregister.json
yarondassonneville Aug 19, 2024
32e3c1b
Dummy increase schuldbeheer
KristofVDB1 Aug 21, 2024
9028db0
Update standaardenregister.json
KristofVDB1 Aug 26, 2024
ea9dd82
Update standaardenregister.json
KristofVDB1 Aug 26, 2024
2b4f2d0
Update standaardenregister.json
KristofVDB1 Aug 27, 2024
34799e2
Update standaardenregister.json
KristofVDB1 Aug 27, 2024
8eaa9ac
Update standaardenregister.json
KristofVDB1 Aug 27, 2024
7d5886b
Update standaardenregister.json
KristofVDB1 Aug 28, 2024
9a79f4a
Update standaardenregister.json
KristofVDB1 Aug 28, 2024
6ceadec
Update standaardenregister.json
KristofVDB1 Aug 28, 2024
5947ec9
Update standaardenregister.json
KristofVDB1 Aug 29, 2024
2985a20
Update standaardenregister.json
KristofVDB1 Aug 29, 2024
69b7dff
Merge branch 'dev' into config-dev
bertvannuffelen Aug 30, 2024
3dd6699
add translations
AxellePenninger Sep 4, 2024
007fb6a
add translations
AxellePenninger Sep 4, 2024
7eb6f95
add translations
AxellePenninger Sep 4, 2024
fe5adf4
add convert config script to single lang
AxellePenninger Sep 6, 2024
75c6f9f
add convert config script to single lang
AxellePenninger Sep 6, 2024
1551476
add convert config script to single lang
AxellePenninger Sep 6, 2024
d50f43b
add convert config script to single lang
AxellePenninger Sep 6, 2024
86d38ad
add memory for md
AxellePenninger Sep 6, 2024
aaa37ba
add memory for config
AxellePenninger Sep 6, 2024
232b0fe
add memory for config
AxellePenninger Sep 6, 2024
6ad57c5
add memory for config
AxellePenninger Sep 6, 2024
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
21 changes: 19 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,14 @@ jobs:
- statistics.json
prepare-nuxt:
docker:
- image: cimg/node:20.15.0
- image: informatievlaanderen/oslo-specification-generator:multilingual-dev4.0
steps:
- checkout
- attach_workspace:
at: /tmp/workspace
- add_ssh_keys:
fingerprints:
- "81:37:0b:68:3b:e9:c9:64:b8:f2:1f:c9:03:46:74:b0"
- run: bash $PWD/scripts/copy-to-nuxt.sh /tmp/workspace
- persist_to_workspace:
root: /tmp/workspace
Expand Down Expand Up @@ -134,13 +137,13 @@ jobs:
name: Push results to 'standaarden' branch of OSLO-Standaardenregister
working_directory: /tmp/OSLO-Standaardenregister
command: |
ls ./content/standaarden/
git config user.email "oslo@oslo"
git config user.name "Circle CI Builder"
git add .
git status
git commit -m "Applying changes from commit ${CIRCLE_SHA1}" --allow-empty
export TAG=`echo "${CIRCLE_SHA1}" | cut -c1-15`
git tag "${TAG}"
git push --force origin standaarden
build-state:
docker:
Expand Down Expand Up @@ -176,6 +179,13 @@ jobs:
- add_ssh_keys:
fingerprints:
- "15:51:57:05:3f:2c:a3:23:44:2a:52:5a:a6:aa:4c:c5"
- run:
name: download translation memory
working_directory: /tmp/workspace
command: |
export CIRCLEWKD=$( eval echo "${CIRCLE_WORKING_DIRECTORY}" )
GENERATEDREPO=$(jq --arg bt "${CIRCLE_BRANCH}" -r '.generatedrepository + {"filepath":"nuxtmemory.tgz", "branchtag":"\($bt)"}' ${CIRCLEWKD}/config/config.json)
if ${CIRCLEWKD}/scripts/downloadFileGithub.sh "${GENERATEDREPO}" nuxtmemory.tgz ${TOOLCHAIN_TOKEN} ; then tar -xzf nuxtmemory.tgz ; fi
- run:
name: Checkout target repository
working_directory: /tmp
Expand Down Expand Up @@ -205,6 +215,12 @@ jobs:
if [ -d html_pages/geregistreerde-standaard ] ; then if [ ! "$(ls -A html_pages/geregistreerde-standaard)" ] ; then echo "Directory html_pages/geregistreerde-standaard is empty" ; else cp -R html_pages/geregistreerde-standaard/* /tmp/OSLO-StandaardenregisterGenerated/public/geregistreerde-standaard/ ; fi fi
if [ -d html_pages/standaard-in-ontwikkeling ] ; then if [ ! "$(ls -A html_pages/standaard-in-ontwikkeling)" ] ; then echo "Directory html_pages/standaard-in-ontwikkeling is empty" ; else cp -R html_pages/standaard-in-ontwikkeling/* /tmp/OSLO-StandaardenregisterGenerated/public/standaard-in-ontwikkeling/ ; fi fi
if [ -d html_pages/zonder-status ] ; then if [ ! "$(ls -A html_pages/zonder-status)" ] ; then echo "Directory html_pages/zonder-status is empty" ; else cp -R html_pages/zonder-status/* /tmp/OSLO-StandaardenregisterGenerated/public/zonder-status/; fi fi
- run:
name: Create new autotranslate memory of the nuxt directory
working_directory: /tmp/workspace
command: |
ls -1
if [ -d nuxtmemory ] ; then tar -zcf nuxtmemory.tgz nuxtmemory ; cp nuxtmemory.tgz /tmp/OSLO-StandaardenregisterGenerated/nuxtmemory.tgz ; fi
- run:
name: Insert the commit
command: |
Expand Down Expand Up @@ -253,3 +269,4 @@ workflows:
# - checkout
# - prepare-nuxt
# - push-to-nuxt

3 changes: 3 additions & 0 deletions Dockerfile.build
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ RUN rm -rf /app/content/standaarden
# Copy all items from the content/standaarden directory
COPY content/standaarden /app/content/standaarden

# Copy the statistics file from content directory
COPY content/statistics.json /app/content/statistics.json

RUN npm run build

FROM node:20-alpine
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ fetch-content:
cd OSLO-Standaardenregister && \
git checkout standaarden && \
ls && \
cp -R ./content/standaarden/* ../content/standaarden/
cp -R ./content/* ../content/
rm -rf OSLO-Standaardenregister

# first build-base should have been run
Expand Down
27 changes: 27 additions & 0 deletions scripts/contributors-and-terms.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash

ROOTDIR=$1

# Fetch the content from the URL
content=$(curl -s "https://raw.githubusercontent.com/Informatievlaanderen/data.vlaanderen.be-statistics/production/aggr.stat")

TOTAL_TERMS=$(echo "$content" | jq -r '.totalterms')

echo "$TOTAL_TERMS"

# Query certain keys and concatenate them into a JSON object
uniqueContributors=$(echo "$content" | jq -r '(.authors | tonumber) + (.editors | tonumber) + (.contributors | tonumber) + (.participants | tonumber)')
json=$(echo "$content" | jq -r --argjson uc "$uniqueContributors" '{uniqueContributors: $uc}')

uniqueAffiliations=$(echo "$content" | jq -r '.totalorganisations | tonumber')
json=$(echo "$json" | jq -r --argjson to "$uniqueAffiliations" '. + {uniqueAffiliations: $to}')


# Read the existing content of statistics.json into a variable
existingContent=$(cat "$ROOTDIR/statistics.json")

# Add the new keys to the existing content
updatedContent=$(echo "$existingContent" "$json" | jq -s add)

# Write the updated content back to statistics.json
echo "$updatedContent" >"$ROOTDIR/statistics.json"
75 changes: 69 additions & 6 deletions scripts/copy-to-nuxt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
ROOTDIR=$1
REPODIR=$ROOTDIR/repositories
NUXTDIR=$ROOTDIR/nuxt
NUXTMEMORYDIR=$ROOTDIR/nuxtmemory

# Define list of possible languages
LANGUAGES=("en" "nl" "fr" "de")
LANGUAGE_STRING=$(IFS=','; echo "${LANGUAGES[*]}")

mkdir -p "$NUXTDIR"

Expand All @@ -21,25 +26,83 @@ do


## this needs to change to .title if the new json structure is used
SPEC_NAME=$(jq -r '.naam' "$CONFIG_NAME.json")
SPEC_NAME=$(jq -r '.title' "$CONFIG_NAME.json")
## this needs to change to .descriptionFileName if the new json structure is used
DESCRIPTION_NAME=$(jq -r '.beschrijving' "$CONFIG_NAME.json")
DESCRIPTION_NAME=$(jq -r '.descriptionFileName' "$CONFIG_NAME.json")

echo "SPEC_NAME: $SPEC_NAME"
echo "DESCRIPTION_NAME: $DESCRIPTION_NAME"

## Normalizing spec name to be used as directory name
NORMALIZED_SPEC_NAME="$(echo $SPEC_NAME | iconv -f utf8 -t ascii//TRANSLIT | tr -c '[:alnum:]\n\r' '-' | tr -s '-' | tr '[:upper:]' '[:lower:]')"
NUXTMEMORYNORMALIZED_SPEC_NAME="$NUXTMEMORYDIR/$NORMALIZED_SPEC_NAME"

echo "NORMALIZED_SPEC_NAME: $NORMALIZED_SPEC_NAME"

mkdir -p "$NUXTDIR/$NORMALIZED_SPEC_NAME"
mkdir -p "$NUXTMEMORYNORMALIZED_SPEC_NAME"

# Store the repository name in the configuration file
jq --arg REPOSITORY "$REPO_NAME" '. + {"repository": $REPOSITORY}' "$CONFIG_NAME.json" > "temp.json" && mv "temp.json" "$CONFIG_NAME.json"

## Copy the generated configuration file and description file to the nuxt directory
cp "$CONFIG_NAME.json" "$NUXTDIR/$NORMALIZED_SPEC_NAME/configuration.json"
CONFIGMD5SUM="$NUXTMEMORYNORMALIZED_SPEC_NAME/nl/configuration.json.md5sum"
if [ -f "$NUXTMEMORYNORMALIZED_SPEC_NAME/nl/configuration.json" ]; then
# Check if md5sum is the same
CURSUM=$(md5sum "$CONFIG_NAME.json")
OLDSUM=$(cat "$CONFIGMD5SUM")
if [ "$CURSUM" == "$OLDSUM" ]; then
echo "Use old configuration file"
for lang in "${LANGUAGES[@]}"; do
cp "$NUXTMEMORYNORMALIZED_SPEC_NAME/$lang/configuration.json" "$NUXTDIR/$NORMALIZED_SPEC_NAME/$lang/configuration.json"
done
else
translate_and_copy_config
fi
else
translate_and_copy_config
fi

# Check if the description file exists and didn't change in the memory
cp "descriptions/$DESCRIPTION_NAME" "$NUXTDIR/$NORMALIZED_SPEC_NAME/description.md"

done < "$ROOTDIR/tmp-register.txt"
DESCRIPTIONFILE="$NUXTDIR/$NORMALIZED_SPEC_NAME/description.md"
MD5SUMFILE="$NUXTMEMORYNORMALIZED_SPEC_NAME/nl/description.md.md5sum"
# Check if file is in memory
if [ -f "$NUXTMEMORYNORMALIZED_SPEC_NAME/nl/descriptions.md" ]; then
# Check if md5sum is the same
CURSUM=$(md5sum "$DESCRIPTIONFILE")
OLDSUM=$(cat "$MD5SUMFILE")
if [ "$CURSUM" == "$OLDSUM" ]; then
echo "Use old description file"
for lang in "${LANGUAGES[@]}"; do
cp "$NUXTMEMORYNORMALIZED_SPEC_NAME/$lang/description.md" "$NUXTDIR/$NORMALIZED_SPEC_NAME/$lang/description.md"
done
else
md5sum "$DESCRIPTIONFILE" > "$MD5SUMFILE"
node /app/autotranslate-md.js -i "$DESCRIPTIONFILE" -m "nl" -g "$LANGUAGE_STRING" -s "$AZURETRANSLATIONKEY"
fi
else
md5sum "$DESCRIPTIONFILE" > "$MD5SUMFILE"
node /app/autotranslate-md.js -i "$DESCRIPTIONFILE" -m "nl" -g "$LANGUAGE_STRING" -s "$AZURETRANSLATIONKEY"
fi

rm "$NUXTDIR/$NORMALIZED_SPEC_NAME/description.md"

# Copy the translations to the memory
cp -r "$NUXTDIR/$NORMALIZED_SPEC_NAME/"* "$NUXTMEMORYNORMALIZED_SPEC_NAME"

done < "$ROOTDIR/tmp-register.txt"

translate_and_copy_config() {
md5sum "$CONFIG_NAME.json" > "$CONFIGMD5SUM"
node /app/autotranslate-config.js -i "$CONFIG_NAME.json" -o "$CONFIG_NAME-multilang.json" -m "nl" -g "$LANGUAGE_STRING" -s "$AZURETRANSLATIONKEY"
cp "$CONFIG_NAME-multilang.json" "$NUXTDIR/$NORMALIZED_SPEC_NAME/configuration.json"
## Convert config file to single language and copy the generated configuration file to the nuxt directory
for lang in "${LANGUAGES[@]}"; do
mkdir -p "$NUXTDIR/$NORMALIZED_SPEC_NAME/$lang"
if ! node /app/convert-config.js -i "$CONFIG_NAME-multilang.json" -l "$lang" -o "$NUXTDIR/$NORMALIZED_SPEC_NAME/$lang/configuration.json"; then
echo "Convert config: failed"
else
echo "Convert config: Files successfully translated"
fi
done
}
13 changes: 6 additions & 7 deletions scripts/cronjob
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# THIS IS THE CRONJOB THAT SHOULD RUN ON THE SERVER TO CHECK FOR NEW IMAGES AND UPDATE THE SERVICE IF NEEDED

#!/bin/bash

Expand All @@ -9,7 +8,12 @@ echo "Cron job run at: $(date)"
IMAGE_NAME="terraformtestcontainerregistry.azurecr.io/oslo2/oslo-standaardenregister-run"

# Define an array of service names
SERVICE_NAMES=("oslo_dev-standardsregister" "oslo_test-standardsregister")
SERVICE_NAMES=("oslo_test-standardsregister" "oslo_dev-standardsregister")

# Pull the latest version of the image
docker pull $IMAGE_NAME:latest

LATEST_IMAGE_SHA=$(docker inspect --format='{{index .RepoDigests 0}}' $IMAGE_NAME:latest | perl -wnE'say /sha256.*/g')

# Loop over the array of service names
for SERVICE_NAME in "${SERVICE_NAMES[@]}"; do
Expand All @@ -19,11 +23,6 @@ for SERVICE_NAME in "${SERVICE_NAMES[@]}"; do
CURRENT_IMAGE=$(docker service inspect --format '{{ (.Spec.TaskTemplate.ContainerSpec.Image) }}' $SERVICE_NAME)
CURRENT_IMAGE_SHA=$(docker inspect --format='{{.Id}}' $CURRENT_IMAGE)

# Pull the latest version of the image
docker pull $IMAGE_NAME:latest

LATEST_IMAGE_SHA=$(docker inspect --format='{{.Id}}' $IMAGE_NAME:latest)

echo $CURRENT_IMAGE_SHA
echo $LATEST_IMAGE_SHA

Expand Down
25 changes: 9 additions & 16 deletions scripts/extract-info.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ REPODIR=$ROOTDIR/repositories
ls "$ROOTDIR"

## Constructing file names for description
while IFS= read -r line
do
while IFS= read -r line; do
REPO_NAME=$(echo "$line" | cut -d ":" -f 1)

cd "$REPODIR/$REPO_NAME"
Expand All @@ -19,20 +18,20 @@ do
## Extract information about the files containing the description for the detail page
DESCRIPTION_NAME=$(jq -r '.beschrijving' "$CONFIG_NAME.json")

echo "$CONFIG_NAME:$DESCRIPTION_NAME" >> "$ROOTDIR/description-paths.txt"
echo "$CONFIG_NAME:$DESCRIPTION_NAME" >>"$ROOTDIR/description-paths.txt"

#### Constructing file name ####
SPECIAL_CHARACTERS_REMOVED="${SPEC_NAME//[:&]/}"
MULTI_SPACE_REMOVED="${SPECIAL_CHARACTERS_REMOVED// /}"
SPACE_REPLACED="${MULTI_SPACE_REMOVED// /-}"

echo "$CONFIG_NAME:$SPACE_REPLACED" >> "$ROOTDIR/filenames.txt"
done < "$ROOTDIR/tmp-register.txt"
echo "$CONFIG_NAME:$SPACE_REPLACED" >>"$ROOTDIR/filenames.txt"
done <"$ROOTDIR/tmp-register.txt"

## Creating statistics config file
echo "Creating statistics configuration file"
touch "$ROOTDIR/statistics_config.json"
echo "[]" > "$ROOTDIR/statistics_config.json"
echo "[]" >"$ROOTDIR/statistics_config.json"

## Constructing statistics configuration file
if cat "$REGISTER" | jq -e . >/dev/null 2>&1; then
Expand All @@ -44,7 +43,6 @@ if cat "$REGISTER" | jq -e . >/dev/null 2>&1; then
REPOSITORY=$(_jq '.repository')
THEME_NAME=$(echo "$REPOSITORY" | cut -d '/' -f 5)
CONFIG=$(_jq '.configuration')
STATUS=$(_jq '.status')

if [ ! -d "$REPODIR/$THEME_NAME" ]; then
git clone "$REPOSITORY" "$REPODIR/$THEME_NAME"
Expand All @@ -53,16 +51,11 @@ if cat "$REGISTER" | jq -e . >/dev/null 2>&1; then
cd "$REPODIR/$THEME_NAME"
git checkout standaardenregister

NAME=$(cat "$CONFIG" | jq -r '.naam')
REPORT_FILE=$(cat "$CONFIG" | jq -r '.rapport')
PUB_DATE=$(cat "$CONFIG" | jq -r ".publicatiedatum")
NAME=$(cat "$CONFIG" | jq -r '.title')
PUB_DATE=$(cat "$CONFIG" | jq -r ".publicationDate")
STATUS=$(cat "$CONFIG" | jq -r ".status")


if [ -z "$REPORT_FILE" ]; then
jq --arg REPOSITORY "$THEME_NAME" --arg NAAM "$NAME" --arg STATUS "$STATUS" --arg REPORT "$REPORT_FILE" --arg PUB_DATE "$PUB_DATE" '. += [{"name": $NAAM, "repository": $REPOSITORY, "report" : null, "status" : $STATUS, "publicationDate" : $PUB_DATE}]' "$ROOTDIR/statistics_config.json" > "$ROOTDIR/statistics_config.json.tmp" && mv "$ROOTDIR/statistics_config.json.tmp" "$ROOTDIR/statistics_config.json"
else
jq --arg REPOSITORY "$THEME_NAME" --arg NAAM "$NAME" --arg STATUS "$STATUS" --arg REPORT "$REPORT_FILE" --arg PUB_DATE "$PUB_DATE" '. += [{"name": $NAAM, "repository": $REPOSITORY, "report" : $REPORT, "status" : $STATUS, "publicationDate" : $PUB_DATE}]' "$ROOTDIR/statistics_config.json" > "$ROOTDIR/statistics_config.json.tmp" && mv "$ROOTDIR/statistics_config.json.tmp" "$ROOTDIR/statistics_config.json"
fi
jq --arg REPOSITORY "$THEME_NAME" --arg NAAM "$NAME" --arg STATUS "$STATUS" --arg PUB_DATE "$PUB_DATE" '. += [{"name": $NAAM, "repository": $REPOSITORY, "status" : $STATUS, "publicationDate" : $PUB_DATE}]' "$ROOTDIR/statistics_config.json" >"$ROOTDIR/statistics_config.json.tmp" && mv "$ROOTDIR/statistics_config.json.tmp" "$ROOTDIR/statistics_config.json"
done
fi

Expand Down
1 change: 1 addition & 0 deletions scripts/sanitize-configurations.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@

JS_FILE_PATH="scripts/sanitizeConfigurations.js"


# Use Node.js to run the JavaScript file
node $JS_FILE_PATH
Loading