Skip to content

Commit b83f8b4

Browse files
committed
Merge branch 'main' into paulgb-patch-2
2 parents 4b7e3c7 + d9680a0 commit b83f8b4

File tree

4 files changed

+63
-0
lines changed

4 files changed

+63
-0
lines changed

.github/workflows/rust.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Rust
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v3
19+
- name: Build
20+
run: cargo build --verbose
21+
- name: Run tests
22+
run: cargo test --verbose

.github/workflows/rustfmt.yaml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Check Rust formatting
2+
3+
on:
4+
pull_request:
5+
branches: [ "main" ]
6+
7+
jobs:
8+
check-rust-format:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- run: rustup component add rustfmt
13+
- name: Check format
14+
run: cargo fmt -- --check

Dockerfile

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
FROM rust:1.77-slim-buster as builder
2+
3+
WORKDIR /build
4+
5+
COPY Cargo.toml Cargo.lock ./
6+
RUN mkdir src
7+
RUN echo "fn main() {}" > src/main.rs
8+
9+
# Build dependencies
10+
RUN cargo build --release
11+
12+
COPY src src
13+
# We need to touch src/main.rs to force cargo to build it.
14+
RUN touch src/main.rs
15+
16+
# Build application
17+
RUN cargo build --release
18+
19+
FROM debian:buster-slim
20+
21+
COPY --from=builder /build/target/release/jamsocket-log-collector /usr/local/bin/jamsocket-log-collector
22+
23+
CMD ["jamsocket-log-collector"]

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Jamsocket Log Agent
2+
3+
This is the source to a log collector used by Jamsocket. It is not intended to be used by others, but it is open sourced for
4+
auditability.

0 commit comments

Comments
 (0)