mirror of
https://github.com/super-linter/super-linter.git
synced 2024-11-22 22:20:57 -05:00
commit
4b5cd0bc84
12 changed files with 37 additions and 37 deletions
|
@ -115,9 +115,9 @@ ValidateInput()
|
||||||
# Check if we need to get the name of the branch #
|
# Check if we need to get the name of the branch #
|
||||||
##################################################
|
##################################################
|
||||||
if [[ "$IMAGE_VERSION" != "latest" ]]; then
|
if [[ "$IMAGE_VERSION" != "latest" ]]; then
|
||||||
###################################
|
##################################
|
||||||
# Remove non alpha-numberic chars #
|
# Remove non alpha-numeric chars #
|
||||||
###################################
|
##################################
|
||||||
IMAGE_VERSION=$(echo "$IMAGE_VERSION" | tr -cd '[:alnum:]')
|
IMAGE_VERSION=$(echo "$IMAGE_VERSION" | tr -cd '[:alnum:]')
|
||||||
else
|
else
|
||||||
#############################################
|
#############################################
|
||||||
|
|
|
@ -42,9 +42,9 @@
|
||||||
group: admin
|
group: admin
|
||||||
mode: 0644
|
mode: 0644
|
||||||
|
|
||||||
#########################################################
|
########################################################
|
||||||
# Set up Admin password, License, and Initial Setttings #
|
# Set up Admin password, License, and Initial Settings #
|
||||||
#########################################################
|
########################################################
|
||||||
- name: Setup Grafana
|
- name: Setup Grafana
|
||||||
# yamllint disable
|
# yamllint disable
|
||||||
shell: curl --fail -Lk \
|
shell: curl --fail -Lk \
|
||||||
|
|
|
@ -57,10 +57,10 @@
|
||||||
group: admin
|
group: admin
|
||||||
mode: 0644
|
mode: 0644
|
||||||
|
|
||||||
#########################################################
|
########################################################
|
||||||
# Set up Admin password, License, and Initial Setttings #
|
# Set up Admin password, License, and Initial Settings #
|
||||||
#########################################################
|
########################################################
|
||||||
- name: Setup License, Admin Password, and Initial Setttings
|
- name: Setup License, Admin Password, and Initial Settings
|
||||||
command: curl --fail -Lk \
|
command: curl --fail -Lk \
|
||||||
-X POST "https://{{ ansible_host }}:8443/setup/api/start" \
|
-X POST "https://{{ ansible_host }}:8443/setup/api/start" \
|
||||||
-F license=@/tmp/ghe-license.ghl \
|
-F license=@/tmp/ghe-license.ghl \
|
||||||
|
|
|
@ -42,9 +42,9 @@
|
||||||
group: admin
|
group: admin
|
||||||
mode: 0644
|
mode: 0644
|
||||||
|
|
||||||
#########################################################
|
########################################################
|
||||||
# Set up Admin password, License, and Initial Setttings #
|
# Set up Admin password, License, and Initial Settings #
|
||||||
#########################################################
|
########################################################
|
||||||
- name: Setup Splunk
|
- name: Setup Splunk
|
||||||
# yamllint disable
|
# yamllint disable
|
||||||
shell: curl --fail -Lk \
|
shell: curl --fail -Lk \
|
||||||
|
|
|
@ -60,7 +60,7 @@ module.exports = (robot) -> )
|
||||||
# Drop the hammer #
|
# Drop the hammer #
|
||||||
###################
|
###################
|
||||||
robot.respond /drop the hammer/i, (msg) ->
|
robot.respond /drop the hammer/i, (msg) ->
|
||||||
msg.send "Commmencing the hammer dropping..."
|
msg.send "Commencing the hammer dropping..."
|
||||||
msg.send msg.random dropHammer
|
msg.send msg.random dropHammer
|
||||||
|
|
||||||
###############
|
###############
|
||||||
|
|
|
@ -62,7 +62,7 @@ module.exports = (robot) ->
|
||||||
# Drop the hammer #
|
# Drop the hammer #
|
||||||
###################
|
###################
|
||||||
robot.respond /drop the hammer/i, (msg) ->
|
robot.respond /drop the hammer/i, (msg) ->
|
||||||
msg.send "Commmencing the hammer dropping..."
|
msg.send "Commencing the hammer dropping..."
|
||||||
msg.send msg.random dropHammer
|
msg.send msg.random dropHammer
|
||||||
|
|
||||||
###############
|
###############
|
||||||
|
|
|
@ -7,7 +7,7 @@ var userArray = [ 'user1' ]
|
||||||
here is some garbage = that
|
here is some garbage = that
|
||||||
|
|
||||||
var teamDescription = Team of Robots
|
var teamDescription = Team of Robots
|
||||||
var teamPrivacy = 'closed' // closed (visibile) / secret (hidden) are options here
|
var teamPrivacy = 'closed' // closed (visible) / secret (hidden) are options here
|
||||||
|
|
||||||
var teamName = process.env.GHES_TEAM_NAME
|
var teamName = process.env.GHES_TEAM_NAME
|
||||||
var teamAccess = 'pull' // pull,push,admin options here
|
var teamAccess = 'pull' // pull,push,admin options here
|
||||||
|
|
|
@ -5,7 +5,7 @@ var handler = createHandler({ path: '/webhook', secret: (process.env.SECRET) })
|
||||||
var userArray = ['user1']
|
var userArray = ['user1']
|
||||||
|
|
||||||
var teamDescription = 'Team of Robots'
|
var teamDescription = 'Team of Robots'
|
||||||
var teamPrivacy = 'closed' // closed (visibile) / secret (hidden) are options here
|
var teamPrivacy = 'closed' // closed (visible) / secret (hidden) are options here
|
||||||
|
|
||||||
var teamName = process.env.GHES_TEAM_NAME
|
var teamName = process.env.GHES_TEAM_NAME
|
||||||
var teamAccess = 'pull' // pull,push,admin options here
|
var teamAccess = 'pull' // pull,push,admin options here
|
||||||
|
|
|
@ -120,9 +120,9 @@ ValidateInput()
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
###################################
|
##################################
|
||||||
# Remove non alpha-numberic chars #
|
# Remove non alpha-numeric chars #
|
||||||
###################################
|
##################################
|
||||||
BRANCH_NAME=$(echo "$BRANCH_NAME" | tr -cd '[:alnum:]')
|
BRANCH_NAME=$(echo "$BRANCH_NAME" | tr -cd '[:alnum:]')
|
||||||
|
|
||||||
############################################
|
############################################
|
||||||
|
|
2
.github/linters/.yaml-lint.yml
vendored
2
.github/linters/.yaml-lint.yml
vendored
|
@ -3,7 +3,7 @@
|
||||||
# These are the rules used for #
|
# These are the rules used for #
|
||||||
# linting all the yaml files in the stack #
|
# linting all the yaml files in the stack #
|
||||||
# NOTE: #
|
# NOTE: #
|
||||||
# You can disble line with: #
|
# You can disable line with: #
|
||||||
# # yamllint disable-line #
|
# # yamllint disable-line #
|
||||||
###########################################
|
###########################################
|
||||||
rules:
|
rules:
|
||||||
|
|
|
@ -81,7 +81,7 @@ RUN git clone https://github.com/replicatedhq/dockerfilelint.git && cd /dockerfi
|
||||||
RUN gem install rubocop:0.74.0 rubocop-rails rubocop-github:0.13.0
|
RUN gem install rubocop:0.74.0 rubocop-rails rubocop-github:0.13.0
|
||||||
|
|
||||||
# Need to fix the version as it installs 'rubocop:0.85.1' as a dep, and forces the default
|
# Need to fix the version as it installs 'rubocop:0.85.1' as a dep, and forces the default
|
||||||
# We then need to promot the correct verion, uninstall, and fix deps
|
# We then need to promote the correct version, uninstall, and fix deps
|
||||||
RUN sh -c 'gem install --default rubocop:0.74.0; yes | gem uninstall rubocop:0.85.1 -a -x -I; gem install rubocop:0.74.0'
|
RUN sh -c 'gem install --default rubocop:0.74.0; yes | gem uninstall rubocop:0.85.1 -a -x -I; gem install rubocop:0.74.0'
|
||||||
|
|
||||||
######################
|
######################
|
||||||
|
|
|
@ -32,7 +32,7 @@ COFFEESCRIPT_LINTER_RULES="$DEFAULT_RULES_LOCATION/$COFFEE_FILE_NAME" # Path to
|
||||||
JAVASCRIPT_FILE_NAME='.eslintrc.yml' # Name of the file
|
JAVASCRIPT_FILE_NAME='.eslintrc.yml' # Name of the file
|
||||||
JAVASCRIPT_LINTER_RULES="$DEFAULT_RULES_LOCATION/$JAVASCRIPT_FILE_NAME" # Path to the Javascript lint rules
|
JAVASCRIPT_LINTER_RULES="$DEFAULT_RULES_LOCATION/$JAVASCRIPT_FILE_NAME" # Path to the Javascript lint rules
|
||||||
JAVASCRIPT_STANDARD_LINTER_RULES='' # ENV string to pass when running js standard
|
JAVASCRIPT_STANDARD_LINTER_RULES='' # ENV string to pass when running js standard
|
||||||
# Typecript Vars
|
# Typescript Vars
|
||||||
TYPESCRIPT_FILE_NAME='.eslintrc.yml' # Name of the file
|
TYPESCRIPT_FILE_NAME='.eslintrc.yml' # Name of the file
|
||||||
TYPESCRIPT_LINTER_RULES="$DEFAULT_RULES_LOCATION/$TYPESCRIPT_FILE_NAME" # Path to the Typescript lint rules
|
TYPESCRIPT_LINTER_RULES="$DEFAULT_RULES_LOCATION/$TYPESCRIPT_FILE_NAME" # Path to the Typescript lint rules
|
||||||
TYPESCRIPT_STANDARD_LINTER_RULES='' # ENV string to pass when running js standard
|
TYPESCRIPT_STANDARD_LINTER_RULES='' # ENV string to pass when running js standard
|
||||||
|
@ -354,9 +354,9 @@ GetStandardRules()
|
||||||
ENV_STRING+="--env ${ENV} "
|
ENV_STRING+="--env ${ENV} "
|
||||||
done
|
done
|
||||||
|
|
||||||
########################################
|
#########################################
|
||||||
# Remove trailing and ending witespace #
|
# Remove trailing and ending whitespace #
|
||||||
########################################
|
#########################################
|
||||||
if [[ "$LINTER" == "javascript" ]]; then
|
if [[ "$LINTER" == "javascript" ]]; then
|
||||||
JAVASCRIPT_STANDARD_LINTER_RULES="$(echo -e "${ENV_STRING}" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')"
|
JAVASCRIPT_STANDARD_LINTER_RULES="$(echo -e "${ENV_STRING}" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')"
|
||||||
elif [[ "$LINTER" == "typescript" ]]; then
|
elif [[ "$LINTER" == "typescript" ]]; then
|
||||||
|
@ -1261,9 +1261,9 @@ BuildFileList()
|
||||||
echo "Generating Diff with:[git diff --name-only '$DEFAULT_BRANCH..$GITHUB_SHA' --diff-filter=d]"
|
echo "Generating Diff with:[git diff --name-only '$DEFAULT_BRANCH..$GITHUB_SHA' --diff-filter=d]"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
################################################
|
#################################################
|
||||||
# Get the Array of files changed in the comits #
|
# Get the Array of files changed in the commits #
|
||||||
################################################
|
#################################################
|
||||||
# shellcheck disable=SC2207
|
# shellcheck disable=SC2207
|
||||||
RAW_FILE_ARRAY=($(cd "$GITHUB_WORKSPACE" || exit; git diff --name-only "$DEFAULT_BRANCH..$GITHUB_SHA" --diff-filter=d 2>&1))
|
RAW_FILE_ARRAY=($(cd "$GITHUB_WORKSPACE" || exit; git diff --name-only "$DEFAULT_BRANCH..$GITHUB_SHA" --diff-filter=d 2>&1))
|
||||||
|
|
||||||
|
@ -1282,9 +1282,9 @@ BuildFileList()
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#################################################
|
################################################
|
||||||
# Itterate through the array of all files found #
|
# Iterate through the array of all files found #
|
||||||
#################################################
|
################################################
|
||||||
echo ""
|
echo ""
|
||||||
echo "----------------------------------------------"
|
echo "----------------------------------------------"
|
||||||
echo "Files that have been modified in the commit(s):"
|
echo "Files that have been modified in the commit(s):"
|
||||||
|
@ -1636,7 +1636,7 @@ LintCodebase()
|
||||||
if [ ${#FILE_ARRAY[@]} -eq 0 ] && [ "$VALIDATE_ALL_CODEBASE" == "false" ]; then
|
if [ ${#FILE_ARRAY[@]} -eq 0 ] && [ "$VALIDATE_ALL_CODEBASE" == "false" ]; then
|
||||||
# No files found in commit and user has asked to not validate code base
|
# No files found in commit and user has asked to not validate code base
|
||||||
SKIP_FLAG=1
|
SKIP_FLAG=1
|
||||||
# echo " - No files found in chageset to lint for language:[$FILE_TYPE]"
|
# echo " - No files found in changeset to lint for language:[$FILE_TYPE]"
|
||||||
elif [ ${#FILE_ARRAY[@]} -ne 0 ]; then
|
elif [ ${#FILE_ARRAY[@]} -ne 0 ]; then
|
||||||
# We have files added to array of files to check
|
# We have files added to array of files to check
|
||||||
LIST_FILES=("${FILE_ARRAY[@]}") # Copy the array into list
|
LIST_FILES=("${FILE_ARRAY[@]}") # Copy the array into list
|
||||||
|
@ -2018,7 +2018,7 @@ RunTestCases()
|
||||||
# version of linter.sh, and a new container is built with the latest codebase
|
# version of linter.sh, and a new container is built with the latest codebase
|
||||||
# for testing. That container is spun up, and ran,
|
# for testing. That container is spun up, and ran,
|
||||||
# with the flag: TEST_CASE_RUN=true
|
# with the flag: TEST_CASE_RUN=true
|
||||||
# So that the new code can be validated againt the test cases
|
# So that the new code can be validated against the test cases
|
||||||
|
|
||||||
#################
|
#################
|
||||||
# Header prints #
|
# Header prints #
|
||||||
|
@ -2075,9 +2075,9 @@ Header
|
||||||
# needed to connect back and update checks
|
# needed to connect back and update checks
|
||||||
GetGitHubVars
|
GetGitHubVars
|
||||||
|
|
||||||
##########################################
|
#########################################
|
||||||
# Get the langugages we need to validate #
|
# Get the languages we need to validate #
|
||||||
##########################################
|
#########################################
|
||||||
GetValidationInfo
|
GetValidationInfo
|
||||||
|
|
||||||
########################
|
########################
|
||||||
|
|
Loading…
Reference in a new issue