Skip to content

Commit

Permalink
chore: enable ct lint-and-install
Browse files Browse the repository at this point in the history
  • Loading branch information
ialejandro committed Aug 29, 2024
1 parent 0342324 commit a24929f
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 91 deletions.
2 changes: 1 addition & 1 deletion .github/ct.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# See https://github.com/helm/chart-testing#configuration
chart-dirs: charts
check-version-increment: false
debug: true
debug: false
remote: origin
target-branch: main
upgrade: true
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/auto-assign.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
name: Auto-assign Issue

on:
issues:
types: [opened]
pull_request:
types: [opened, edited, synchronize, reopened]

jobs:
run:
runs-on: ubuntu-latest
Expand Down
27 changes: 16 additions & 11 deletions .github/workflows/lint-test.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: Lint and Test Charts
name: Lint and test PR OpenBAS

on: pull_request
on:
workflow_dispatch:
pull_request:

jobs:
lint-test:
Expand Down Expand Up @@ -31,15 +33,18 @@ jobs:
echo "changed=true" >> "$GITHUB_OUTPUT"
fi
- name: Run chart-testing (lint)
if: steps.list-changed.outputs.changed == 'true'
- name: Run ct lint
if: steps.list-changed.outputs.changed == 'true' || github.event_name == 'workflow_dispatch'
run: ct lint --config .github/ct.yaml

# TODO: uncomment when we've self-managed nodes
# - name: Create kind cluster
# if: steps.list-changed.outputs.changed == 'true'
# uses: helm/kind-action@v1
- name: Create kind cluster
if: steps.list-changed.outputs.changed == 'true' || github.event_name == 'workflow_dispatch'
uses: helm/kind-action@v1

- name: Run ct install
if: steps.list-changed.outputs.changed == 'true'
run: ct install --config .github/ct.yaml --helm-extra-args '--timeout 600s'

# - name: Run chart-testing (install)
# if: steps.list-changed.outputs.changed == 'true'
# run: ct install --config ct.yaml
- name: (workflow_dispatch) Run ct install
if: github.event_name == 'workflow_dispatch'
run: ct install --config .github/ct.yaml --helm-extra-args '--timeout 600s --debug' --all
19 changes: 8 additions & 11 deletions charts/openbas/ci/ci-common-values.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
replicaCount: 1
fullnameOverride: openbas-ci

secrets:
OPENCTI_TOKEN: my-ci-cd

env:
INJECTOR_CALDERA_API_KEY: 0ce2182d-3e1a-4117-a1d4-8100a7b01d82
INJECTOR_CALDERA_PUBLIC_URL: http://openbas-ci-caldera:8888
Expand All @@ -26,7 +23,7 @@ env:
SPRING_DATASOURCE_URL: jdbc:postgresql://openbas-ci-postgresql:5432/openbas
SPRING_DATASOURCE_USERNAME: user

testConnection: false
testConnection: true

autoscaling:
enabled: true
Expand Down Expand Up @@ -86,17 +83,17 @@ collectors:
- name: atomic-red-team
enabled: true
replicas: 1
image: {}
serviceAccount:
create: true
name: openbas-collector-ci
deploymentAnnotations:
ci: "true"
podAnnotations:
ci: "true"
env:
OPENBAS_URL: http://localhost
OPENBAS_TOKEN: ChangeMe
COLLECTOR_ID: ChangeMe
OPENBAS_URL: http://openbas-ci:8080
OPENBAS_TOKEN: b1976749-8a53-4f49-bf04-cafa2a3458c1
COLLECTOR_ID: e668aa07-e1a3-41d8-8748-786be5df9dab
COLLECTOR_NAME: "Atomic Red Team"
COLLECTOR_LOG_LEVEL: error

Expand All @@ -111,9 +108,9 @@ injectors:
podAnnotations:
ci: "true"
env:
OPENBAS_URL: http://localhost
OPENBAS_TOKEN: ChangeMe
INJECTOR_ID: ChangeMe
OPENBAS_URL: http://openbas-ci:8080
OPENBAS_TOKEN: b1976749-8a53-4f49-bf04-cafa2a3458c1
INJECTOR_ID: e668aa07-e1a3-41d8-8748-786be5df9dab
INJECTOR_NAME: "HTTP query"
INJECTOR_LOG_LEVEL: error

Expand Down
68 changes: 0 additions & 68 deletions charts/openbas/ci/ci-secrets-values.yaml

This file was deleted.

0 comments on commit a24929f

Please sign in to comment.