Skip to content

Commit

Permalink
Merge pull request #22 from plus3it/nessus_ci_migration
Browse files Browse the repository at this point in the history
Implements github reusable actions for linux tests
  • Loading branch information
lorengordon authored Jun 15, 2023
2 parents 1bafad6 + 81361a2 commit 4f826d1
Show file tree
Hide file tree
Showing 10 changed files with 107 additions and 70 deletions.
36 changes: 36 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# see http://editorconfig.org
root = true

[*]
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 2
charset = utf-8
tab_width = 4

[*.md]
trim_trailing_whitespace = false

[*.py]
indent_size = 4

[go.mod]
indent_style = tab
indent_size = 1

[*.go]
indent_style = tab
indent_size = 1

[Makefile]
indent_style = tab
indent_size = 1

[Makefile.*]
indent_style = tab
indent_size = 1

[LICENSE]
indent_size = none
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly
# Maintain dependencies for dockerfiles
- package-ecosystem: docker
directory: /
schedule:
interval: weekly
11 changes: 11 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Run lint and static analyis checks
on:
pull_request:

concurrency:
group: lint-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
lint:
uses: plus3it/actions-workflows/.github/workflows/lint.yml@b1b7bdb32125ccb05afa36909954a75b9f2ab431
24 changes: 24 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Run salt tests
on:
pull_request:

concurrency:
group: test-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
test:
uses: plus3it/actions-workflows/.github/workflows/test-salt-linux.yml@b1b7bdb32125ccb05afa36909954a75b9f2ab431
strategy:
matrix:
os_version:
- 7
- 8
salt_state:
- nessus-agent
salt_pillar_root:
- ./tests/pillar/test-nessus-agent
with:
salt-os-version: ${{ matrix.os_version }}
salt-state: ${{ matrix.salt_state }}
salt-pillar-root: ${{ matrix.salt_pillar_root }}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ $RECYCLE.BIN/
*.msm
*.msp

# tardigrade-ci
.tardigrade-ci
tardigrade-ci/

# Windows shortcuts
*.lnk

Expand Down
15 changes: 15 additions & 0 deletions .mergify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
pull_request_rules:
- name: approve dependabot pull requests
conditions:
- author=dependabot[bot]
actions:
review:
type: APPROVE

- name: merge dependabot pull requests
conditions:
- author=dependabot[bot]
- "#approved-reviews-by>=1"
actions:
merge:
method: merge
68 changes: 0 additions & 68 deletions .travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM plus3it/tardigrade-ci:0.24.6
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include $(shell test -f .tardigrade-ci || curl -sSL -o .tardigrade-ci "https://raw.githubusercontent.com/plus3it/tardigrade-ci/master/bootstrap/Makefile.bootstrap"; echo .tardigrade-ci)
6 changes: 4 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
version: '{branch}-{build}'
image: Visual Studio 2019
build: off
environment:
global:
SALT_FILEROOT: '%APPVEYOR_BUILD_FOLDER%'
SALT_STATE: nessus-agent
SALT_URL: 'https://repo.saltproject.io/windows/Salt-Minion-3003-Py3-AMD64-Setup.exe'
SALT_URL: https://repo.saltproject.io/windows/Salt-Minion-3004.2-1-Py3-AMD64-Setup.exe
matrix:
- SALT_PILLARROOT: '%APPVEYOR_BUILD_FOLDER%\tests\pillar\test-windows-main'

init:
- ps: echo $env:PILLAR_HOME
install:
- ps: '[Net.ServicePointManager]::SecurityProtocol = "Tls12, Tls13"'
- ps: |
$null = `
(new-object net.webclient).DownloadFile(${env:SALT_URL}, `
"${env:temp}\salt-minion.exe")
- ps: |
$null = `
Start-Process -FilePath "${env:temp}\salt-minion.exe" `
-ArgumentList "/S" -NoNewWindow -PassThru -Wait
-ArgumentList @("/S", "/install-dir=c:\salt") -NoNewWindow -PassThru -Wait
- ps: C:\salt\salt-call.bat --versions-report

test_script:
Expand Down

0 comments on commit 4f826d1

Please sign in to comment.