Skip to content

Commit

Permalink
Merge pull request #568 from 23andMe/SEC-1819-remove-deps-checker
Browse files Browse the repository at this point in the history
SEC-1819 Fixing git tree.
  • Loading branch information
sarahc23 authored May 11, 2022
2 parents 5d66c49 + 7f041f5 commit 6110c2e
Show file tree
Hide file tree
Showing 131 changed files with 14,657 additions and 5,292 deletions.
2 changes: 1 addition & 1 deletion .automation/test/ansible/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This folder holds the test cases for **Ansible**.

## Additional Docs

The folder **ghe-initialize** is pulled from the **GitHub-Demo-Stack** and is a valid **Ansible** role.
The folder **roles/ghe-initialize** is pulled from the **GitHub-Demo-Stack** and is a valid **Ansible** role.

## Good Test Cases

Expand Down
39 changes: 0 additions & 39 deletions .automation/test/ansible/ansible_bad_1.yml

This file was deleted.

42 changes: 0 additions & 42 deletions .automation/test/ansible/ansible_good_1.yml

This file was deleted.

5 changes: 5 additions & 0 deletions .automation/test/ansible/inventory/hosts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
all:
hosts:
test.example.com: null
...
8 changes: 8 additions & 0 deletions .automation/test/ansible/playbooks/ansible_good_1.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
- hosts: github_primary
vars:
demo_github_initial_user: "{{ hostvars['localhost'].local_user }}"
github_host: "{{ hostvars['github_primary'].ansible_host }}"
probot_server_ip: "{{ hostvars['backup-utils'].ansible_host }}"
roles:
- role: ghe_initialize
4 changes: 4 additions & 0 deletions .automation/test/ansible/requirements.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
collections:
- ansible.posix
...
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
# GHE config apply #
####################
- name: ghe config apply
command: ghe-config-apply
ansible.builtin.command: ghe-config-apply
poll: 0
async: 300
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
- name: Wait for Admin port to come up (Port 8443)
## Doc: http://docs.ansible.com/ansible/latest/modules/wait_for_module.html
## Helpful Google: ansible wait_for
wait_for:
ansible.builtin.wait_for:
host: "{{ ansible_host }}"
port: 8443
delay: 5
Expand All @@ -19,7 +19,7 @@
#################################
- name: Wait for http status 200
changed_when: false
uri:
ansible.builtin.uri:
url: "https://{{ ansible_host }}:8443"
validate_certs: "no"
register: http_result
Expand All @@ -35,7 +35,7 @@
# and place it on the new remote machine
- name: Copy collectd-settings.json File to GHE
become: true
template:
ansible.builtin.template:
src: "collectd-settings.json.j2"
dest: /tmp/collectd-settings.json
owner: admin
Expand All @@ -47,7 +47,7 @@
########################################################
- name: Setup Grafana
# yamllint disable
shell: curl --fail -Lk \
ansible.builtin.shell: curl --fail -Lk \
-X PUT "https://api_key:{{ github_admin_password }}@{{ ansible_host }}:8443/setup/api/settings" \
--data-urlencode "settings=`cat /tmp/collectd-settings.json`"
# yamllint enable
Expand All @@ -63,7 +63,7 @@
#####################################
- name: Copy forwarding.conf File to GHE
become: true
template:
ansible.builtin.template:
force: true
src: "forwarding.conf.j2"
dest: /etc/collectd/conf.d/forwarding.conf
Expand All @@ -76,7 +76,7 @@
###########################################
- name: Restart Collectd service
become: true
service:
ansible.builtin.service:
name: collectd
state: restarted

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# Run config to take in settings #
##################################
- name: Run Configure for Settings to Take Effect
uri:
ansible.builtin.uri:
url: "https://{{ ansible_host }}:8443/setup/api/configure"
method: POST
return_content: "yes"
Expand All @@ -31,7 +31,7 @@
# https://docs.ansible.com/ansible/uri_module.html
# yamllint disable-line
# https://developer.github.com/enterprise/v3/enterprise-admin/management_console/#check-configuration-status
uri:
ansible.builtin.uri:
url: "https://{{ ansible_host }}:8443/setup/api/configcheck"
method: GET
return_content: "yes"
Expand All @@ -51,7 +51,7 @@
# files that were copied to the ghe server
- name: Remove temp Files from GHE
become: true
file:
ansible.builtin.file:
path: "{{ item }}"
state: absent
with_items:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
########################################
- name: Copy the script to the GHE instance
become: true
template:
ansible.builtin.template:
force: 'yes'
src: "ghe-config-apply.sh"
dest: /tmp/ghe-config-apply.sh
Expand All @@ -17,7 +17,7 @@
# Run config to take in settings #
##################################
- name: Run ghe-config-apply for Settings to Take Effect
shell: "nohup ./tmp/ghe-config-apply.sh </dev/null >/dev/null 2>&1 &"
ansible.builtin.shell: "nohup ./tmp/ghe-config-apply.sh </dev/null >/dev/null 2>&1 &"
async: 300
poll: 0
args:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# yamllint disable-line
## Documentation: http://docs.ansible.com/ansible/latest/modules/wait_for_module.html
## Helpful Google: ansible wait_for
wait_for:
ansible.builtin.wait_for:
host: "{{ ansible_host }}"
port: 8443
delay: 5
Expand All @@ -20,7 +20,7 @@
#################################
- name: Wait for http status 200
changed_when: false
uri:
ansible.builtin.uri:
url: "https://{{ ansible_host }}:8443"
validate_certs: "no"
register: http_result
Expand All @@ -36,7 +36,7 @@
# and place it on the new remote machine
- name: Copy License File to GHE
become: true
copy:
ansible.builtin.copy:
src: "{{ role_path }}/files/ghe-license.ghl"
dest: /tmp/ghe-license.ghl
owner: admin
Expand All @@ -50,7 +50,7 @@
# and place it on the new remote machine
- name: Copy settings.json File to GHE
become: true
template:
ansible.builtin.template:
src: "settings.json.j2"
dest: /tmp/settings.json
owner: admin
Expand All @@ -61,7 +61,7 @@
# Set up Admin password, License, and Initial Settings #
########################################################
- name: Setup License, Admin Password, and Initial Settings
command: curl --fail -Lk \
ansible.builtin.command: curl --fail -Lk \
-X POST "https://{{ ansible_host }}:8443/setup/api/start" \
-F license=@/tmp/ghe-license.ghl \
-F "password={{ github_admin_password }}" \
Expand All @@ -75,7 +75,7 @@
# Set the GHE Admin Password fact #
###################################
- name: Set the GitHub Admin password fact
set_fact:
ansible.builtin.set_fact:
github_admin_password: "{{ github_admin_password }}"

######################
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# and place it on the new remote machine
- name: Copy ldap-settings.json File to GHE
become: true
template:
ansible.builtin.template:
src: "ldap-settings.json.j2"
dest: /tmp/ldap-settings.json
owner: admin
Expand All @@ -18,7 +18,7 @@
# Set up LDAP with ldap-settings.json #
#######################################
- name: Setup ldap with ldap-settings.json
shell: curl --fail -Lk -X PUT 'https://api_key:{{ github_admin_password }}@{{ ansible_host }}:8443/setup/api/settings' --data-urlencode "settings=`cat /tmp/ldap-settings.json`" # yamllint disable-line
ansible.builtin.shell: curl --fail -Lk -X PUT 'https://api_key:{{ github_admin_password }}@{{ ansible_host }}:8443/setup/api/settings' --data-urlencode "settings=`cat /tmp/ldap-settings.json`" # yamllint disable-line
retries: 10
delay: 2
register: http_ldapconfig_result
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# Need to run the tasks to stand up the GHE instance #
######################################################
# Configure the base system
- include_tasks: ghe-initial-configuration.yml
- ansible.builtin.include_tasks: ghe-initial-configuration.yml

######################
# Set the tags block #
Expand All @@ -32,7 +32,7 @@
# Need to run the tasks to config LDAP on the GHE instance #
############################################################
# Configure the base system
- include_tasks: ghe-ldap-configuration.yml
- ansible.builtin.include_tasks: ghe-ldap-configuration.yml

######################
# Set the tags block #
Expand All @@ -53,7 +53,7 @@
# Need to run the tasks to stand up the GHE instance #
######################################################
# Configure the base system
- include_tasks: ghe-api-config-apply.yml
- ansible.builtin.include_tasks: ghe-api-config-apply.yml

######################
# Set the tags block #
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
- name: Wait for Admin port to come up (Port 8443)
## Doc: http://docs.ansible.com/ansible/latest/modules/wait_for_module.html
## Helpful Google: ansible wait_for
wait_for:
ansible.builtin.wait_for:
host: "{{ ansible_host }}"
port: 8443
delay: 5
Expand All @@ -19,7 +19,7 @@
#################################
- name: Wait for http status 200
changed_when: false
uri:
ansible.builtin.uri:
url: "https://{{ ansible_host }}:8443"
validate_certs: "no"
register: http_result
Expand All @@ -35,7 +35,7 @@
# and place it on the new remote machine
- name: Copy splunk-settings.json File to GHE
become: true
template:
ansible.builtin.template:
src: "splunk-settings.json.j2"
dest: /tmp/splunk-settings.json
owner: admin
Expand All @@ -47,7 +47,7 @@
########################################################
- name: Setup Splunk
# yamllint disable
shell: curl --fail -Lk \
ansible.builtin.shell: curl --fail -Lk \
-X PUT "https://api_key:{{ github_admin_password }}@{{ ansible_host }}:8443/setup/api/settings" \
--data-urlencode "settings=`cat /tmp/splunk-settings.json`"
# yamllint enable
Expand Down
1 change: 1 addition & 0 deletions .automation/test/cloudformation/cloudformation_bad_2.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
AWSTemplateFormatVersion: "2010-09-09"
Description: A sample template
Resources:
Expand Down
1 change: 1 addition & 0 deletions .automation/test/cloudformation/cloudformation_good_2.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
AWSTemplateFormatVersion: "2010-09-09"
Description: A sample template
Resources:
Expand Down
1 change: 1 addition & 0 deletions .automation/test/github_actions/actions_bad_01.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Github Actions Bad
on:
push:
Expand Down
1 change: 1 addition & 0 deletions .automation/test/github_actions/actions_good_01.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: GitHub Actions Good
on:
push:
Expand Down
25 changes: 25 additions & 0 deletions .automation/test/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
module github.com/github/super-linter

go 1.17

require (
github.com/go-playground/validator/v10 v10.10.1
github.com/labstack/echo/v4 v4.7.2
)

require (
github.com/go-playground/locales v0.14.0 // indirect
github.com/go-playground/universal-translator v0.18.0 // indirect
github.com/golang-jwt/jwt v3.2.2+incompatible // indirect
github.com/labstack/gommon v0.3.1 // indirect
github.com/leodido/go-urn v1.2.1 // indirect
github.com/mattn/go-colorable v0.1.11 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasttemplate v1.2.1 // indirect
golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3 // indirect
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 // indirect
golang.org/x/sys v0.0.0-20211103235746-7861aae1554b // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 // indirect
)
Loading

0 comments on commit 6110c2e

Please sign in to comment.