typo: Fix some minor typos.

Signed-off-by: Guillaume Coguiec <guillaume@logical.work>
This commit is contained in:
Guillaume Coguiec
2022-02-07 13:53:49 -05:00
parent c04d0cdd0b
commit bd0f276d30
22 changed files with 39 additions and 39 deletions

View File

@@ -18,7 +18,7 @@ import (
// ArgoCD project
project: *"default" | dagger.#Input & {string}
// Basic authentification to login
// Basic authentication to login
basicAuth: {
// Username
username: dagger.#Input & {string}

View File

@@ -5,7 +5,7 @@ import (
"alpha.dagger.io/os"
)
// Sync an application to its targer state
// Sync an application to its target state
#Sync: {
// ArgoCD configuration
config: #Config

View File

@@ -46,14 +46,14 @@ import (
"pipefail",
#"""
echo "dbType: $DB_TYPE"
sql="CREATE DATABASE \`"$NAME" \`"
if [ "$DB_TYPE" = postgres ]; then
sql="CREATE DATABASE \""$NAME"\""
fi
echo "$NAME" >> /db_created
aws rds-data execute-statement \
--resource-arn "$DB_ARN" \
--secret-arn "$SECRET_ARN" \
@@ -107,7 +107,7 @@ import (
// Database type MySQL or PostgreSQL (Aurora Serverless only)
dbType: "mysql" | "postgres" @dagger(input)
// Outputed username
// Outputted username
out: {
string
@@ -127,14 +127,14 @@ import (
"pipefail",
#"""
echo "dbType: $DB_TYPE"
sql="CREATE USER '"$USERNAME"'@'%' IDENTIFIED BY '"$PASSWORD"'"
if [ "$DB_TYPE" = postgres ]; then
sql="CREATE USER \""$USERNAME"\" WITH PASSWORD '"$PASSWORD"'"
fi
echo "$USERNAME" >> /username
aws rds-data execute-statement \
--resource-arn "$DB_ARN" \
--secret-arn "$SECRET_ARN" \
@@ -146,24 +146,24 @@ import (
if [ $exit_code -ne 0 ]; then
grep -q "Operation CREATE USER failed for\|ERROR" tmp/out || exit $exit_code
fi
sql="SET PASSWORD FOR '"$USERNAME"'@'%' = PASSWORD('"$PASSWORD"')"
if [ "$DB_TYPE" = postgres ]; then
sql="ALTER ROLE \""$USERNAME"\" WITH PASSWORD '"$PASSWORD"'"
fi
aws rds-data execute-statement \
--resource-arn "$DB_ARN" \
--secret-arn "$SECRET_ARN" \
--sql "$sql" \
--database "$DB_TYPE" \
--no-include-result-metadata
sql="GRANT ALL ON \`"$GRAND_DATABASE"\`.* to '"$USERNAME"'@'%'"
if [ "$DB_TYPE" = postgres ]; then
sql="GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO \""$USERNAME"\"; GRANT ALL PRIVILEGES ON DATABASE \""$GRAND_DATABASE"\" to \""$USERNAME"\"; GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO \""$USERNAME"\"; ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL PRIVILEGES ON TABLES TO \""$USERNAME"\"; ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL PRIVILEGES ON SEQUENCES TO \""$USERNAME"\"; GRANT USAGE ON SCHEMA public TO \""$USERNAME"\";"
fi
if [ -s "$GRAND_DATABASE ]; then
aws rds-data execute-statement \
--resource-arn "$DB_ARN" \

View File

@@ -103,7 +103,7 @@ for added readability, starting on the next line. This is called
status : 1
output (2 lines):
Error! Something went terribly wrong!
Our engineers are panicing... \`>`;/
Our engineers are panicking... \`>`;/
--
```

View File

@@ -2,7 +2,7 @@
package op
// Full resolution schema enforciong the complete op spec
// Full resolution schema enforcing the complete op spec
#Op: (#Export |
#FetchContainer |
#PushContainer |

View File

@@ -132,7 +132,7 @@ import (
for registry in registries {
op.#Exec & {
args: ["/bin/bash", "-c", #"""
echo "$TARGER_HOST" | docker login --username "$DOCKER_USERNAME" --password-stdin "$(cat /password)"
echo "$TARGET_HOST" | docker login --username "$DOCKER_USERNAME" --password-stdin "$(cat /password)"
"""#,
]
env: {