Skip to content

Commit

Permalink
init functional
Browse files Browse the repository at this point in the history
  • Loading branch information
cjimti committed Dec 3, 2019
1 parent d5f5581 commit cf15664
Show file tree
Hide file tree
Showing 7 changed files with 531 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.idea
67 changes: 67 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Build customization
build:
# Path to main.go file.
# Default is `main.go`
main: ./cmd/jwtpxy.go
binary: jwtpxy

env:
- CGO_ENABLED=0

# GOOS list to build in.
# For more info refer to https://golang.org/doc/install/source#environment
# Defaults are darwin and linux
goos:
- linux

# GOARCH to build in.
# For more info refer to https://golang.org/doc/install/source#environment
# Defaults are 386 and amd64
goarch:
- amd64

ldflags: -s -w -X main.Version={{.Version}}

release:
# Repo in which the release will be created.
# Default is extracted from the origin remote URL.
github:
owner: txn2
name: jwtpxy

# If set to true, will not auto-publish the release.
# Default is false.
draft: false

# If set to true, will mark the release as not ready for production.
# Default is false.
prerelease: false

# You can change the name of the GitHub release.
# Default is ``
name_template: "{{.ProjectName}}-v{{.Version}} {{.Env.USER}}"

# You can disable this pipe in order to not upload any artifacts to
# GitHub.
# Defaults to false.
disable: false

dockers:
-
goos: linux
goarch: amd64
goarm: ''
binaries:
- jwtpxy
dockerfile: Dockerfile
image_templates:
- "txn2/p3y:latest"
- "txn2/p3y:{{ .Tag }}"
- "txn2/p3y:v{{ .Tag }}"
- "txn2/p3y:v{{ .Major }}"
- "txn2/p3y:amd64-{{ .Tag }}"
- "txn2/p3y:amd64-v{{ .Major }}"
build_flag_templates:
- "--label=org.label-schema.schema-version=1.0"
- "--label=org.label-schema.version={{.Version}}"
- "--label=org.label-schema.name={{.ProjectName}}"
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM alpine3.10 AS util

RUN echo "nobody:x:65534:65534:Nobody:/:" > /etc_passwd

FROM scratch

ENV PATH=/bin

COPY jwtpxy /bin/
COPY --from=util /etc_passwd /etc/passwd

WORKDIR /

USER nobody
ENTRYPOINT ["/bin/jwtpxy"]
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,15 @@
# jwtpxy

## Development

### Test Release

```bash
goreleaser --skip-publish --rm-dist --skip-validate
```

### Release

```bash
GITHUB_TOKEN=$GITHUB_TOKEN goreleaser --rm-dist
```
Loading

0 comments on commit cf15664

Please sign in to comment.