Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-phylum authored Apr 4, 2023
0 parents commit 289d375
Show file tree
Hide file tree
Showing 9 changed files with 311 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#Specify Codeowners for this repo like so:
#* @phylum-dev/data-engineering @phylum-dev/core-platform
#/src/src/processors/ @phylum-dev/core-platform
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Bug Report
about: File a new bug report
title: ''
labels: bug, needs triage
assignees: ''

---

# Overview
A clear and concise description of what the bug is.

# How To Reproduce
Steps to reproduce this behavior:
1. Go to '...'
2. Click on '...'
3. See error

# Expected Behavior
A clear and concise description of what you expected to happen.

# Additional Context
Add any other context about the issue here.
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: New Feature/Component
about: Create a new feature/component request for a user story
title: ''
labels: enhancement, needs triage
assignees: ''

---

# Overview
A concise description of the new feature component.

# Acceptance Criteria
- [ ] Outputs XYZ when ...
- [ ] New endpoint ABC exists ...

## Associated User Story
https://www.notion.so/phylum/...

12 changes: 12 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Overview
Provide information on what this PR does and any context necessary to understand its implementation.

# Checklist
- [ ] Does this PR have an associated issue?
- [ ] Have you ensured that you have met the expected acceptance criteria?
- [ ] Have you created sufficient tests?

Be sure to review additional expectations on the [developments standards page](https://www.notion.so/phylum/Development-Standards-and-Expectations-07f01c12f56b4bc099840d6074c92615#15d11ce9c55540cb90d604a4a178ee86).

# Issue
What issue(s) does this PR close. Use the `closes #<issueNum>` here.
131 changes: 131 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
name: CI

# Controls when the action will run.
on:
# Triggers the workflow on any pushes to any branch
push:

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

env:
CARGO_TERM_COLOR: always

# A baseline workflow that does `cargo fmt -- --check`, `cargo clippy --all-targets -- -D warnings`, and `cargo test` in parallel jobs
# Repos should append any additional CI/CD needs as neccessary
# Additional jobs like pushing up a docker image are provided but disabled by default via the "if" conditional and has other "# SET ME" things to set if enabled
jobs:
format-check:
runs-on: amd64
steps:
- uses: actions/checkout@v2
- name: Install minimal stable rustfmt
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt
- name: Format Check
#run cargo fmt to fix if in violation
run: cargo fmt -- --check
build:
runs-on: amd64
steps:
- uses: actions/checkout@v2
- name: Install minimal stable with clippy
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: clippy
- name: Build
run: cargo build
- name: Clippy Linting
# --all-targets means apply to test code too. Without it just applies to application code
run: cargo clippy --all-targets -- -D warnings
test:
runs-on: amd64
steps:
- uses: actions/checkout@v2
- name: Install minimal stable
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
# - name: Start Docker Compose
# run: docker-compose up -d
# - name: Check containers after spinup
# run: docker ps -a
- name: Run tests
run: cargo test --verbose
# - name: Stop containers
# if: ${{ always() }}
# run: docker-compose down
build_image:
# The type of runner that the job will run on
runs-on: amd64
needs: [test, build, format-check]
if: ${{ false }} # Disable for the template, users should opt into enabling the job
#if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/development' || startsWith(github.ref, 'refs/tags/v')
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repsitory under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
with:
token: ${{secrets.BOT_SUBMODULE_TOKEN}}
submodules: recursive
- uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.MACHINE_USER_SSH_KEY }}
- name: Inject slug/short variables
uses: rlespinasse/[email protected]
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v1
with:
install: true
driver-opts: network=host

- name: Login to Harbor
uses: docker/login-action@v1
with:
registry: harbor.prod-aws.phylum.dev
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Build and push Docker images
# You may pin to the exact commit or the version.
# uses: docker/build-push-action@4a531fa5a603bab87dfa56578bd82b28508c9547
uses: docker/[email protected]
with:
# Build's context is the set of files located in the specified PATH or URL
context: # SET ME
# Path to the Dockerfile
file: # optional
# List of build-time variables
build-args:
# List of metadata for an image
labels: # optional
# List of tags
tags: # SET ME harbor.prod-aws.phylum.dev/phylum/NAME_HERE:${{ env.GITHUB_REF_SLUG }}
# Always attempt to pull a newer version of the image
pull: true
# Sets the target stage to build
target: # optional
# Do not use cache when building the image
no-cache: # optional, default is false
# List of target platforms for build
platforms: # optional
# Load is a shorthand for --output=type=docker
load: # optional, default is false
# Push is a shorthand for --output=type=registry
push: true
# List of output destinations (format: type=local,dest=path)
outputs: # optional
# List of external cache sources for buildx (eg. user/app:cache, type=local,src=path/to/dir)
cache-from: type=registry,ref=harbor.prod-aws.phylum.dev/phylum/phylum-janusgraph:${{ env.GITHUB_REF_SLUG }}
# List of cache export destinations for buildx (eg. user/app:cache, type=local,dest=path/to/dir)
cache-to: type=inline
# List of secrets to expose to the build (eg. key=value, GIT_AUTH_TOKEN=mytoken)
secrets: # optional
# GitHub Token used to authenticate against a repository for Git context
github-token: # optional, default is ${{ github.token }}
ssh: default
104 changes: 104 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Cargo.lock

**/*.envrc

# Generated by Cargo
# will have compiled files and executables
debug/
target/

# These are backup files generated by rustfmt
**/*.rs.bk

# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb

# Created by https://www.toptal.com/developers/gitignore/api/vim,macos,linux,visualstudiocode
# Edit at https://www.toptal.com/developers/gitignore?templates=vim,macos,linux,visualstudiocode

### Linux ###
*~

# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*

# KDE directory preferences
.directory

# Linux trash folder which might appear on any partition or disk
.Trash-*

# .nfs files are created when an open file is removed but is still being accessed
.nfs*

### macOS ###
# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon


# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

### Vim ###
# Swap
[._]*.s[a-v][a-z]
!*.svg # comment out if you don't need vector files
[._]*.sw[a-p]
[._]s[a-rt-v][a-z]
[._]ss[a-gi-z]
[._]sw[a-p]

# Session
Session.vim
Sessionx.vim

# Temporary
.netrwhist
# Auto-generated tag files
tags
# Persistent undo
[._]*.un~

### VisualStudioCode ###
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace

# Local History for Visual Studio Code
.history/

### VisualStudioCode Patch ###
# Ignore all local history of files
.history
.ionide

# Support for Project snippet scope
!.vscode/*.code-snippets

# End of https://www.toptal.com/developers/gitignore/api/vim,macos,linux,visualstudiocode
8 changes: 8 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[package]
name = "repo-template"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Project Name

## Introduction

## Manually Starting Integration Testing Environment

## Running

3 changes: 3 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
println!("Hello, world!");
}

0 comments on commit 289d375

Please sign in to comment.