Skip to content

Commit

Permalink
Merge branch 'main' into EW-1065
Browse files Browse the repository at this point in the history
  • Loading branch information
mkreuzkam-cap authored Nov 19, 2024
2 parents fb5e940 + 5678a4a commit ed9cf32
Showing 1 changed file with 44 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -519,43 +519,51 @@ data:
# ========== Start of the CTL seed data configuration section.
echo "Inserting ctl seed data secrets to external-tools..."

if [ -n "$CTL_SEED_SECRET_ONLINE_DIA_MATHE" ]; then
# Encrypt secrets of external tools that contain an lti11 config.
CTL_SEED_SECRET_ONLINE_DIA_MATHE=$(node scripts/secret.js -s $AES_KEY -e $CTL_SEED_SECRET_ONLINE_DIA_MATHE)
CTL_SEED_SECRET_ONLINE_DIA_DEUTSCH=$(node scripts/secret.js -s $AES_KEY -e $CTL_SEED_SECRET_ONLINE_DIA_DEUTSCH)

mongosh $DATABASE__URL --quiet --eval 'db.getCollection("external-tools").updateOne(
{
"name": "Product Test Onlinediagnose Grundschule - Mathematik",
},
{ $set: {
"config_secret": "'$CTL_SEED_SECRET_ONLINE_DIA_MATHE'",
} },
{
"upsert": true
}
);'
mongosh $DATABASE__URL --quiet --eval 'db.getCollection("external-tools").updateOne(
{
"name": "Product Test Onlinediagnose Grundschule - Deutsch",
},
{ $set: {
"config_secret": "'$CTL_SEED_SECRET_ONLINE_DIA_DEUTSCH'",
} },
{
"upsert": true
}
);'
mongosh $DATABASE__URL --quiet --eval 'db.getCollection("external-tools").updateOne(
{
"name": "Merlin Bibliothek",
},
{ $set: {
"config_secret": "'$CTL_SEED_SECRET_MERLIN'",
} },
{
"upsert": true
}
);'
CTL_SEED_SECRET_ONLINE_DIA_MATHE=$(node scripts/secret.js -s $AES_KEY -e $CTL_SEED_SECRET_ONLINE_DIA_MATHE)
mongosh $DATABASE__URL --quiet --eval 'db.getCollection("external-tools").updateOne(
{
"name": "Product Test Onlinediagnose Grundschule - Mathematik",
},
{ $set: {
"config_secret": "'$CTL_SEED_SECRET_ONLINE_DIA_MATHE'",
} },
{
"upsert": true
}
);'
fi
if [ -n "$CTL_SEED_SECRET_ONLINE_DIA_DEUTSCH" ]; then
# Encrypt secrets of external tools that contain an lti11 config.
CTL_SEED_SECRET_ONLINE_DIA_DEUTSCH=$(node scripts/secret.js -s $AES_KEY -e $CTL_SEED_SECRET_ONLINE_DIA_DEUTSCH)
mongosh $DATABASE__URL --quiet --eval 'db.getCollection("external-tools").updateOne(
{
"name": "Product Test Onlinediagnose Grundschule - Deutsch",
},
{ $set: {
"config_secret": "'$CTL_SEED_SECRET_ONLINE_DIA_DEUTSCH'",
} },
{
"upsert": true
}
);'
fi
if [ -n "$CTL_SEED_SECRET_MERLIN" ]; then
# Encrypt secrets of external tools that contain an lti11 config.
CTL_SEED_SECRET_MERLIN=$(node scripts/secret.js -s $AES_KEY -e $CTL_SEED_SECRET_MERLIN)
mongosh $DATABASE__URL --quiet --eval 'db.getCollection("external-tools").updateOne(
{
"name": "Merlin Bibliothek",
},
{ $set: {
"config_secret": "'$CTL_SEED_SECRET_MERLIN'",
} },
{
"upsert": true
}
);'
fi
echo "Inserted ctl seed data secrets to external-tools."

# ========== End of the CTL seed data configuration section.
Expand Down

0 comments on commit ed9cf32

Please sign in to comment.