Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ do
BIN_DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
done
BIN_DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
source $BIN_DIR/env.sh
source $BIN_DIR/env_template.sh


if [ "$#" -ne 2 ]; then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ do
BIN_DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
done
BIN_DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
source $BIN_DIR/env.sh
source $BIN_DIR/env_template.sh

if [ "$#" -ne 2 ]; then
echo "Usage: $0 pipeline_name generator_name" >&2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ done
BIN_DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"

# Populate necessary environment variables
source $BIN_DIR/env.sh
source $BIN_DIR/env_template.sh

if [ "$#" -ne 1 ]; then
echo "Usage: $0 pipeline_name " >&2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ done
BIN_DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"

# Populate necessary environment variables
source $BIN_DIR/env.sh
source $BIN_DIR/env_template.sh

if [ "$#" -ne 2 ]; then
echo "Usage: $0 pipeline_name parser_name" >&2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ done
BIN_DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"

# Populate necessary environment variables
source $BIN_DIR/env.sh
source $BIN_DIR/env_template.sh

if [ "$#" -ne 2 ]; then
echo "Usage: $0 pipeline_name profile_name" >&2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ done
BIN_DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"

# Populate necessary environment variables
source $BIN_DIR/env.sh
source $BIN_DIR/env_template.sh

if [ "$#" -ne 1 ]; then
echo "Usage: $0 pipeline_name " >&2
Expand Down
28 changes: 28 additions & 0 deletions flink-cyber/cyber-jobs/src/main/resources/scripts/env_template.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/env bash

#
# Copyright 2020 - 2022 Cloudera. All Rights Reserved.
#
# This file is licensed under the Apache License Version 2.0 (the "License"). You may not use this file
# except in compliance with the License. You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0.
#
# This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
# either express or implied. Refer to the License for the specific permissions and
# limitations governing your use of the file.
#

# Determine the location of the script to locate parcel
# Reference: http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in
SOURCE="${BASH_SOURCE[0]}"
BIN_DIR="$( dirname "$SOURCE" )"
while [ -h "$SOURCE" ]
do
SOURCE="$(readlink "$SOURCE")"
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE"
BIN_DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
done
BIN_DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"

ETC_DIR=$BIN_DIR/../etc
TEMPLATES_DIR="$ETC_DIR"/conf/templates
5 changes: 5 additions & 0 deletions flink-cyber/cyber-parcel/src/main/meta/permissions.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
"group": "cybersec",
"permissions": "0755"
},
"bin/env_template.sh": {
"user": "cybersec",
"group": "cybersec",
"permissions": "0755"
},
"bin/cs-add-generator": {
"user": "cybersec",
"group": "cybersec",
Expand Down