File tree Expand file tree Collapse file tree 3 files changed +13
-12
lines changed Expand file tree Collapse file tree 3 files changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -82,7 +82,6 @@ class SnowflakeRefreshSnowpipe {
82
82
}
83
83
publishers common_publishers(allVars)
84
84
steps {
85
- shell(dslFactory. readFileFromWorkspace(' dataeng/resources/secrets-manager-setup.sh' ))
86
85
shell(dslFactory. readFileFromWorkspace(' dataeng/resources/snowflake-refresh-snowpipe.sh' ))
87
86
}
88
87
}
Original file line number Diff line number Diff line change 35
35
exit 1
36
36
fi
37
37
fetch_specific_key " $1 " " $2 "
38
- fi
38
+ fi
Original file line number Diff line number Diff line change @@ -10,16 +10,14 @@ source "${PYTHON_VENV}/bin/activate"
10
10
cd $WORKSPACE /analytics-tools/snowflake
11
11
make requirements
12
12
13
- # Source the secrets-manager.sh script to make the function available
14
- source $WORKSPACE /secrets-manager.sh
15
- # Fetch the secrets from AWS
16
- set +x
17
13
18
14
19
- secrets-manager.sh -w analytics-secure/job-configs/SNOWFLAKE_REFRESH_SNOWPIPE_JOB_EXTRA_VARS snowflake/rsa_key_snowpipe_user.p8
20
- secrets-manager.sh -w analytics-secure/job-configs/SNOWFLAKE_REFRESH_SNOWPIPE_JOB_EXTRA_VARS snowflake/rsa_key_passphrase_snowpipe_user
15
+ python3 secrets-manager.py -w -n analytics-secure/snowflake/rsa_key_snowpipe_user.p8 -v rsa_key_snowpipe_user
16
+ python3 secrets-manager.py -w -n analytics-secure/snowflake/rsa_key_passphrase_snowpipe_user -v rsa_key_passphrase_snowpipe_user
17
+ # set -x
21
18
22
- set -x
19
+ unset KEY_PATH
20
+ unset PASSPHRASE_PATH
23
21
24
22
python refresh_snowpipe.py \
25
23
--user ' SNOWPIPE' \
@@ -28,6 +26,10 @@ python refresh_snowpipe.py \
28
26
--pipe_name $PIPE_NAME \
29
27
--table_name $TABLE_NAME \
30
28
--delay $DELAY \
31
- --limit $LIMIT
32
- --key_file $KEY_PATH \
33
- --passphrase_file $PASSPHRASE_PATH
29
+ --limit $LIMIT \
30
+ --key_file " $( cat " rsa_key_snowpipe_user" ) " \
31
+ --passphrase_file " $( cat " rsa_key_passphrase_snowpipe_user" ) "
32
+
33
+ rm rsa_key_snowpipe_user
34
+ rm rsa_key_passphrase_snowpipe_user
35
+
You can’t perform that action at this time.
0 commit comments