Skip to content

Commit e10817f

Browse files
togashidmtmetschobiTrinobiIntelzapotoxadrianhoban
committed
initial release
Co-Authored-By: tmetsch <tmetsch@users.noreply.github.com> Co-Authored-By: obiTrinobiIntel <obiTrinobiIntel@users.noreply.github.com> Co-Authored-By: togashidm <togashidm@users.noreply.github.com> Co-Authored-By: zapotox <zapotox@users.noreply.github.com> Co-Authored-By: adrianhoban <adrianhoban@users.noreply.github.com>
0 parents  commit e10817f

File tree

144 files changed

+17635
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

144 files changed

+17635
-0
lines changed

.github/workflows/sca.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: static
2+
on:
3+
push:
4+
branches: [ '**' ]
5+
pull_request:
6+
branches: [ '**' ]
7+
jobs:
8+
shellcheck:
9+
name: Shellcheck
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
- run: |
14+
wget -q https://github.com/koalaman/shellcheck/releases/download/stable/shellcheck-stable.linux.x86_64.tar.xz
15+
tar -xvf shellcheck-stable.linux.x86_64.tar.xz
16+
shellcheck-stable/shellcheck -V; find . -name '*.sh' -print -exec sha256sum {} \;; find . -type f \( -name "*.sh" \) -print -exec shellcheck-stable/shellcheck -a -s bash -S warning -f gcc {} \;;
17+
shell: bash
18+
hadolint:
19+
runs-on: ubuntu-latest
20+
name: Hadolint
21+
steps:
22+
- uses: actions/checkout@v3
23+
- run: wget -q https://github.com/hadolint/hadolint/releases/download/v2.10.0/hadolint-Linux-x86_64 -O hadolint; chmod +x hadolint ; find . -type f \( -name "Dockerfile*" \) -print0 | xargs -n 1 -0 ./hadolint ;
24+
gofmt-imports:
25+
runs-on: ubuntu-latest
26+
name: Go Fmt and Go Import
27+
steps:
28+
- uses: actions/checkout@v3
29+
- uses: actions/setup-go@v3
30+
with:
31+
go-version-file: 'go.mod'
32+
- run: |
33+
go install golang.org/x/tools/cmd/goimports@v0.1.12 && goimports -l . && gofmt -l .
34+
shell: bash
35+
golangci:
36+
runs-on: ubuntu-latest
37+
name: lint
38+
steps:
39+
- uses: actions/setup-go@v3
40+
with:
41+
go-version: 1.19
42+
- uses: actions/checkout@v3
43+
- name: golangci-lint
44+
uses: golangci/golangci-lint-action@v3
45+
with:
46+
version: v1.50.0
47+
# Additional linting tools can be added here
48+
args: --enable=revive,errcheck,goimports,govet,nilerr,gosec --timeout=5m

.github/workflows/test-build.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: test-build
2+
on:
3+
push:
4+
branches: [ '**' ]
5+
pull_request:
6+
branches: [ '**' ]
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
- name: Set up Go
13+
uses: actions/setup-go@v3
14+
with:
15+
go-version-file: 'go.mod'
16+
- name: Build
17+
run: make build && make build-plugins
18+
utests:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v3
22+
- name: Set up Go
23+
uses: actions/setup-go@v3
24+
with:
25+
go-version-file: 'go.mod'
26+
- name: Unit test
27+
run: make utest
28+
race:
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: actions/checkout@v3
32+
- name: Set up Go
33+
uses: actions/setup-go@v3
34+
with:
35+
go-version-file: 'go.mod'
36+
- name: Test race
37+
run: go test -count=1 -race ./...

.gitignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
_attic/
2+
vendor/
3+
bin/
4+
# coverage outputs etc.
5+
*.out
6+
*.dot*
7+
coverage.html
8+
# IDE related stuff.
9+
.vscode/
10+
.idea/
11+
# profiling
12+
*.test
13+
*.profile
14+
*.cpuprofile

CODE_OF_CONDUCT.md

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, caste, color, religion, or sexual
10+
identity and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
* Demonstrating empathy and kindness toward other people
21+
* Being respectful of differing opinions, viewpoints, and experiences
22+
* Giving and gracefully accepting constructive feedback
23+
* Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
* Focusing on what is best not just for us as individuals, but for the overall
26+
community
27+
28+
Examples of unacceptable behavior include:
29+
30+
* The use of sexualized language or imagery, and sexual attention or advances of
31+
any kind
32+
* Trolling, insulting or derogatory comments, and personal or political attacks
33+
* Public or private harassment
34+
* Publishing others' private information, such as a physical or email address,
35+
without their explicit permission
36+
* Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Enforcement Responsibilities
40+
41+
Community leaders are responsible for clarifying and enforcing our standards of
42+
acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
45+
46+
Community leaders have the right and responsibility to remove, edit, or reject
47+
comments, commits, code, wiki edits, issues, and other contributions that are
48+
not aligned to this Code of Conduct, and will communicate reasons for moderation
49+
decisions when appropriate.
50+
51+
## Scope
52+
53+
This Code of Conduct applies within all community spaces, and also applies when
54+
an individual is officially representing the community in public spaces.
55+
Examples of representing our community include using an official e-mail address,
56+
posting via an official social media account, or acting as an appointed
57+
representative at an online or offline event.
58+
59+
## Enforcement
60+
61+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62+
reported to the community leaders responsible for enforcement at
63+
CommunityCodeOfConduct AT intel DOT com.
64+
All complaints will be reviewed and investigated promptly and fairly.
65+
66+
All community leaders are obligated to respect the privacy and security of the
67+
reporter of any incident.
68+
69+
## Enforcement Guidelines
70+
71+
Community leaders will follow these Community Impact Guidelines in determining
72+
the consequences for any action they deem in violation of this Code of Conduct:
73+
74+
### 1. Correction
75+
76+
**Community Impact**: Use of inappropriate language or other behavior deemed
77+
unprofessional or unwelcome in the community.
78+
79+
**Consequence**: A private, written warning from community leaders, providing
80+
clarity around the nature of the violation and an explanation of why the
81+
behavior was inappropriate. A public apology may be requested.
82+
83+
### 2. Warning
84+
85+
**Community Impact**: A violation through a single incident or series of
86+
actions.
87+
88+
**Consequence**: A warning with consequences for continued behavior. No
89+
interaction with the people involved, including unsolicited interaction with
90+
those enforcing the Code of Conduct, for a specified period of time. This
91+
includes avoiding interactions in community spaces as well as external channels
92+
like social media. Violating these terms may lead to a temporary or permanent
93+
ban.
94+
95+
### 3. Temporary Ban
96+
97+
**Community Impact**: A serious violation of community standards, including
98+
sustained inappropriate behavior.
99+
100+
**Consequence**: A temporary ban from any sort of interaction or public
101+
communication with the community for a specified period of time. No public or
102+
private interaction with the people involved, including unsolicited interaction
103+
with those enforcing the Code of Conduct, is allowed during this period.
104+
Violating these terms may lead to a permanent ban.
105+
106+
### 4. Permanent Ban
107+
108+
**Community Impact**: Demonstrating a pattern of violation of community
109+
standards, including sustained inappropriate behavior, harassment of an
110+
individual, or aggression toward or disparagement of classes of individuals.
111+
112+
**Consequence**: A permanent ban from any sort of public interaction within the
113+
community.
114+
115+
## Attribution
116+
117+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118+
version 2.1, available at
119+
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
120+
121+
Community Impact Guidelines were inspired by
122+
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
123+
124+
For answers to common questions about this code of conduct, see the FAQ at
125+
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
126+
[https://www.contributor-covenant.org/translations][translations].
127+
128+
[homepage]: https://www.contributor-covenant.org
129+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
130+
[Mozilla CoC]: https://github.com/mozilla/diversity
131+
[FAQ]: https://www.contributor-covenant.org/faq

CONTRIBUTING.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Contributing
2+
3+
### License
4+
5+
*Intent-Driven Orchestration* is licensed under the terms in [LICENSE](LICENSE). By contributing to the project, you
6+
agree to the license and copyright terms therein and release your contribution under these terms.
7+
8+
### Sign your work
9+
10+
Please use the sign-off line at the end of the patch. Your signature certifies that you wrote the patch or otherwise
11+
have the right to pass it on as an open-source patch. The rules are pretty simple: if you can certify the below
12+
(from [developercertificate.org](http://developercertificate.org/)):
13+
14+
```
15+
Developer Certificate of Origin
16+
Version 1.1
17+
18+
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
19+
660 York Street, Suite 102,
20+
San Francisco, CA 94110 USA
21+
22+
Everyone is permitted to copy and distribute verbatim copies of this
23+
license document, but changing it is not allowed.
24+
25+
Developer's Certificate of Origin 1.1
26+
27+
By making a contribution to this project, I certify that:
28+
29+
(a) The contribution was created in whole or in part by me and I
30+
have the right to submit it under the open source license
31+
indicated in the file; or
32+
33+
(b) The contribution is based upon previous work that, to the best
34+
of my knowledge, is covered under an appropriate open source
35+
license and I have the right under that license to submit that
36+
work with modifications, whether created in whole or in part
37+
by me, under the same open source license (unless I am
38+
permitted to submit under a different license), as indicated
39+
in the file; or
40+
41+
(c) The contribution was provided directly to me by some other
42+
person who certified (a), (b) or (c) and I have not modified
43+
it.
44+
45+
(d) I understand and agree that this project and the contribution
46+
are public and that a record of the contribution (including all
47+
personal information I submit with it, including my sign-off) is
48+
maintained indefinitely and may be redistributed consistent with
49+
this project or the open source license(s) involved.
50+
```
51+
52+
Then you just add a line to every git commit message:
53+
54+
Signed-off-by: Joe Smith <joe.smith@email.com>
55+
56+
Use your real name (sorry, no pseudonyms or anonymous contributions.)
57+
58+
If you set your `user.name` and `user.email` git configs, you can sign your commit automatically with `git commit -s`.

Dockerfile

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Copyright (c) 2022 Intel Corporation
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
FROM golang:1.19 AS build
5+
6+
WORKDIR /app
7+
8+
COPY . ./
9+
10+
RUN make prepare-build build \
11+
&& go run github.com/google/go-licenses@v1.3.1 save "./..." --save_path licenses \
12+
&& hack/additional-licenses.sh
13+
14+
FROM alpine:3.16
15+
16+
RUN adduser -D nonroot
17+
18+
WORKDIR /app
19+
20+
COPY --from=build /app/bin/planner /app/bin/planner
21+
COPY --from=build /app/licenses ./licenses
22+
23+
USER nonroot:nonroot
24+
25+
EXPOSE 33333
26+
ENTRYPOINT ["/app/bin/planner"]

0 commit comments

Comments
 (0)