Merge branch 'master' into BetterEnv

This commit is contained in:
Lukas Gravley 2020-06-22 14:02:57 -05:00 committed by GitHub
commit e7d5365da1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 48 additions and 45 deletions

View file

@ -1,12 +1,12 @@
# .automation
This folder holds automation scripts to help `deploy` and `cleanup` **DockerHub** images of the **Super-Linter**
## cleanup-docker.md
## cleanup-docker.sh
This script uses **GitHub Actions** so that when a PR is merged and closed, the **GitHub Action** is triggered.
It will then search **DockerHub** for the image that was deployed during the development, and remove it.
## upload-docker.sh
This script uses **GitHub Actions** so that a push to the repository is committed, it will complete the following:
This script uses **GitHub Actions** so that when a push to the repository is committed, it will complete the following:
- Checkout the source code
- Build the **Docker** container for **Super-Linter** using that source code
- Upload the container to **DockerHub**
@ -16,7 +16,7 @@ When the script is triggered in a branch, it will push with the tag:**NameOfBran
- *testing*
- *troubleshooting*
- *debugging*
- **Note:** The branch name will be reduced to AlpaNumeric for consistency and uploading
- **Note:** The branch name will be reduced to alphanumeric for consistency and uploading
## test
This folder holds all **Test Cases** to help run the *CI/CT/CD* process for the **Super-Linter**.

View file

@ -115,9 +115,9 @@ ValidateInput()
# Check if we need to get the name of the branch #
##################################################
if [[ "$IMAGE_VERSION" != "latest" ]]; then
###################################
# Remove non alpha-numberic chars #
###################################
##################################
# Remove non alpha-numeric chars #
##################################
IMAGE_VERSION=$(echo "$IMAGE_VERSION" | tr -cd '[:alnum:]')
else
#############################################

View file

@ -42,9 +42,9 @@
group: admin
mode: 0644
#########################################################
# Set up Admin password, License, and Initial Setttings #
#########################################################
########################################################
# Set up Admin password, License, and Initial Settings #
########################################################
- name: Setup Grafana
# yamllint disable
shell: curl --fail -Lk \

View file

@ -57,10 +57,10 @@
group: admin
mode: 0644
#########################################################
# Set up Admin password, License, and Initial Setttings #
#########################################################
- name: Setup License, Admin Password, and Initial Setttings
########################################################
# Set up Admin password, License, and Initial Settings #
########################################################
- name: Setup License, Admin Password, and Initial Settings
command: curl --fail -Lk \
-X POST "https://{{ ansible_host }}:8443/setup/api/start" \
-F license=@/tmp/ghe-license.ghl \

View file

@ -42,9 +42,9 @@
group: admin
mode: 0644
#########################################################
# Set up Admin password, License, and Initial Setttings #
#########################################################
########################################################
# Set up Admin password, License, and Initial Settings #
########################################################
- name: Setup Splunk
# yamllint disable
shell: curl --fail -Lk \

View file

@ -60,7 +60,7 @@ module.exports = (robot) -> )
# Drop the hammer #
###################
robot.respond /drop the hammer/i, (msg) ->
msg.send "Commmencing the hammer dropping..."
msg.send "Commencing the hammer dropping..."
msg.send msg.random dropHammer
###############

View file

@ -62,7 +62,7 @@ module.exports = (robot) ->
# Drop the hammer #
###################
robot.respond /drop the hammer/i, (msg) ->
msg.send "Commmencing the hammer dropping..."
msg.send "Commencing the hammer dropping..."
msg.send msg.random dropHammer
###############

View file

@ -7,7 +7,7 @@ var userArray = [ 'user1' ]
here is some garbage = that
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 teamAccess = 'pull' // pull,push,admin options here

View file

@ -5,7 +5,7 @@ var handler = createHandler({ path: '/webhook', secret: (process.env.SECRET) })
var userArray = ['user1']
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 teamAccess = 'pull' // pull,push,admin options here

View file

@ -120,9 +120,9 @@ ValidateInput()
exit 1
fi
###################################
# Remove non alpha-numberic chars #
###################################
##################################
# Remove non alpha-numeric chars #
##################################
BRANCH_NAME=$(echo "$BRANCH_NAME" | tr -cd '[:alnum:]')
############################################

2
.github/CODEOWNERS vendored
View file

@ -1,4 +1,4 @@
######################################################################
# These owners will be the default owners for everything in the repo #
######################################################################
* @admiralawkbar @jwiebalk @zkoppert
* @admiralawkbar @jwiebalk @zkoppert @IAmHughes

View file

@ -18,3 +18,6 @@ A clear and concise description of any alternative solutions or features you've
**Additional context**
Add any other context or screenshots about the feature request here.
**Note**
If this is a request to add a new language, after submitting this issue check out [the wiki](https://github.com/github/super-linter/wiki/Adding-new-language-support) for more info on how to accomplish that.

View file

@ -3,7 +3,7 @@
# These are the rules used for #
# linting all the yaml files in the stack #
# NOTE: #
# You can disble line with: #
# You can disable line with: #
# # yamllint disable-line #
###########################################
rules:

View file

@ -163,7 +163,7 @@ The **Super-Linter** has *CI/CT/CD* configured utilizing **GitHub** Actions.
- `.automation/test` contains all test cases for each language that should be validated
- These **GitHub** Actions utilize the Checks API and Protected Branches to help follow the SDLC
- When the Pull Request is merged to master, the **Super-Linter** **Docker** container is then updated and deployed with the new codebase
- **Note:** The branches **Docker** container is also removed from **DockerHub** to cleanup after itself
- **Note:** The branch's **Docker** container is also removed from **DockerHub** to cleanup after itself
## Limitations
Below are a list of the known limitations for the **GitHub Super-Linter**:

View file

@ -20,8 +20,8 @@ Below is examples and documentation for each language and the various methods to
- [Golang](#golang)
- [Dockerfile](#dockerfile)
- [Terraform](#terraform)
- [CSS](#stylelint)
- [ENV](#dotenv-linter)
- [CSS](#css)
- [ENV](#env)
<!-- toc -->

View file

@ -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_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
# Typecript Vars
# Typescript Vars
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_STANDARD_LINTER_RULES='' # ENV string to pass when running js standard
@ -223,7 +223,7 @@ GetLinterVersions()
##############################
# Check the shell for errors #
##############################
if [ $ERROR_CODE -ne 0 ] | [ -z "${GET_VERSION_CMD[*]}" ]; then
if [ $ERROR_CODE -ne 0 ] || [ -z "${GET_VERSION_CMD[*]}" ]; then
echo "WARN! Failed to get version info for:[$LINTER]"
echo "---------------------------------------------"
else
@ -354,9 +354,9 @@ GetStandardRules()
ENV_STRING+="--env ${ENV} "
done
########################################
# Remove trailing and ending witespace #
########################################
#########################################
# Remove trailing and ending whitespace #
#########################################
if [[ "$LINTER" == "javascript" ]]; then
JAVASCRIPT_STANDARD_LINTER_RULES="$(echo -e "${ENV_STRING}" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')"
elif [[ "$LINTER" == "typescript" ]]; then
@ -1261,9 +1261,9 @@ BuildFileList()
echo "Generating Diff with:[git diff --name-only '$DEFAULT_BRANCH..$GITHUB_SHA' --diff-filter=d]"
fi
################################################
# Get the Array of files changed in the comits #
################################################
#################################################
# Get the Array of files changed in the commits #
#################################################
# shellcheck disable=SC2207
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
fi
#################################################
# Itterate through the array of all files found #
#################################################
################################################
# Iterate through the array of all files found #
################################################
echo ""
echo "----------------------------------------------"
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
# No files found in commit and user has asked to not validate code base
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
# We have files added to array of files to check
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
# for testing. That container is spun up, and ran,
# 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 #
@ -2075,9 +2075,9 @@ Header
# needed to connect back and update checks
GetGitHubVars
##########################################
# Get the langugages we need to validate #
##########################################
#########################################
# Get the languages we need to validate #
#########################################
GetValidationInfo
########################