Skip to content

Commit 1933c29

Browse files
Setup sysdiglabs oracle TF repo (#1)
Change summary: ----------------- Initial commit setting up the repo for OCI.
1 parent b9da261 commit 1933c29

File tree

10 files changed

+457
-1
lines changed

10 files changed

+457
-1
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{{ range .Versions }} {{ range .CommitGroups -}}
2+
3+
{{ .Title }}
4+
{{ range .Commits -}}
5+
6+
{{ if .Scope }}{{ .Scope }}: {{ end }}{{ .Subject }} {{ if .Body }}> {{ .Body }} {{ end }} {{ end }} {{ end -}}
7+
{{- if .RevertCommits -}}
8+
9+
Reverts
10+
{{ range .RevertCommits -}}
11+
12+
{{ .Revert.Header }} {{ end }} {{ end -}}
13+
{{- if .NoteGroups -}} {{ range .NoteGroups -}}
14+
15+
{{ .Title }}
16+
{{ range .Notes }} {{ .Body }} {{ end }} {{ end -}} {{ end -}} {{ end -}}

.github/git-chglog/config.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
style: github
2+
template: CHANGELOG.tpl.md
3+
info:
4+
title: CHANGELOG
5+
repository_url: https://github.com/sysdiglabs/terraform-oracle-secure
6+
options:
7+
commits:
8+
commit_groups:
9+
title_maps:
10+
feat: Features
11+
fix: Bug Fixes
12+
perf: Performance Improvements
13+
refactor: Code Refactoring
14+
ci: Continuous Integration
15+
docs: Documentation
16+
chore: Small Modifications
17+
build: Compilation & Dependencies
18+
header:
19+
pattern: "^(\\w*)(?:\\(([\\w\\$\\.\\-\\*\\s]*)\\))?\\:\\s(.*)$"
20+
pattern_maps:
21+
- Type
22+
- Scope
23+
- Subject
24+
notes:
25+
keywords:
26+
- BREAKING CHANGE
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: CI - Pull Request
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
env:
8+
GO_VERSION: "^1.20"
9+
10+
jobs:
11+
format:
12+
name: Format
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v2
17+
- uses: hashicorp/setup-terraform@v2
18+
- run: make fmt
19+
20+
lint:
21+
name: Lint
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Set up Go
25+
uses: actions/setup-go@v2
26+
with:
27+
go-version: ${{ env.GO_VERSION }}
28+
- name: Check out code
29+
uses: actions/checkout@v2
30+
- name: Lint
31+
run: make lint
32+
33+
build-and-test:
34+
name: Build and Test
35+
runs-on: ubuntu-latest
36+
steps:
37+
- name: Set up Go
38+
uses: actions/setup-go@v2
39+
with:
40+
go-version: ${{ env.GO_VERSION }}
41+
- name: Check out code
42+
uses: actions/checkout@v2
43+
- name: Cache modules
44+
uses: actions/cache@v1
45+
with:
46+
path: ~/go/pkg/mod
47+
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
48+
restore-keys: |
49+
${{ runner.os }}-go-
50+
- name: Get dependencies
51+
run: |
52+
go install github.com/onsi/ginkgo/ginkgo@latest
53+
- name: Test
54+
run: make test

.github/workflows/release.yaml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- v*
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
with:
15+
fetch-depth: 0
16+
17+
- name: Setup Go
18+
uses: actions/setup-go@v2
19+
with:
20+
go-version: "^1.15"
21+
22+
- name: Setup go-chglog
23+
working-directory: /tmp
24+
env:
25+
VERSION: "0.10.0"
26+
run: |
27+
wget https://github.com/git-chglog/git-chglog/releases/download/v${VERSION}/git-chglog_${VERSION}_linux_amd64.tar.gz
28+
gunzip git-chglog_${VERSION}_linux_amd64.tar.gz
29+
tar -xvf git-chglog_${VERSION}_linux_amd64.tar
30+
sudo mv git-chglog /usr/local/bin/
31+
32+
- name: Generate changelog
33+
run: git-chglog -c .github/git-chglog/config.yml -o RELEASE_CHANGELOG.md $(git describe --tags $(git rev-list --tags --max-count=1))
34+
35+
- name: Create Release
36+
id: create_release
37+
uses: actions/create-release@v1
38+
env:
39+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40+
with:
41+
tag_name: ${{ github.ref }}
42+
release_name: ${{ github.ref }}
43+
draft: true
44+
prerelease: false
45+
body_path: RELEASE_CHANGELOG.md

.gitignore

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Local .terraform directories
2+
**/.terraform/*
3+
4+
# .tfstate files
5+
*.tfstate
6+
*.tfstate.*
7+
8+
# Lock files
9+
.terraform.lock.hcl
10+
.terraform.tfstate.lock.info
11+
12+
# Ignore override files as they are usually used for local settings
13+
override.tf
14+
override.tf.json
15+
*_override.tf
16+
*_override.tf.json
17+
18+
# Ignore CLI configuration files
19+
.terraformrc
20+
terraform.rc
21+
22+
# Ignore backup files
23+
terraform.tfstate.backup
24+
25+
# Ignore crash log files
26+
crash.log
27+
28+
# Ignore all .tfvars files, which are likely to contain sentitive data
29+
*.tfvars
30+
31+
.envrc
32+
.direnv
33+
.DS_Store
34+
.idea/

CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @sysdiglabs/team-secure-onboarding

CONTRIBUTING.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Contributing
2+
3+
## Scopes
4+
5+
When you need to use a scope in a commit message, use the directories under `pkg` as a reference
6+
to specify the scope. Some suggestions:
7+
8+
- aws
9+
- gcp
10+
- azure
11+
- oracle
12+
- ...
13+
14+
## When opening a new PR
15+
16+
- The following **requirements** are checked in a PR:
17+
- make build
18+
- make test-unit
19+
- make test-integration # These requires a real environment (`draios-demo`) and are slower than the others.
20+
- make test-e2e
21+
- make test-rules
22+
- make lint
23+
24+
<!--
25+
* We also use `pre-commit` plugin to automate this step, and **validate/detect** the issues when commiting from your local.
26+
* When opening a PR, **an image will be built** in the [project packages section](https://github.com/orgs/sysdiglabs/packages?repo_name=cloud-connector), with the tag `pr-xxx`
27+
-->
28+
29+
## Testing
30+
31+
It's recommended to use an .envrc file to keep environment variables under control. Check `.envrc.template` for a reference.
32+
33+
## Release
34+
35+
- push a new tag and the Github Action will draft a release (with notes)

0 commit comments

Comments
 (0)