work with artifacts over HTTP API.
- Go v1.7.3
- A running PostgreSQL v9
- sqitch tool for managing database schema
- credentials for saving object into AWS S3
- a public key for verifying JWT token signed by a private key
$ make install
- Create a database named
test_artifacts
- Deploy schema by sqitch:
$ sqitch deploy db:pg://postgres@localhost:5432/test_artifacts
Make sure the environment variable JWT_PUBLIC_KEY
contains public key in PEM format.
E.g., export JWT_PUBLIC_KEY="$(cat public_key.pem)"
$ make test
Starting test server:
$ go run cmd/travis-artifacts/main.go
make build
Push to docker hub:
make TAG=<tag-name> release
Prerequisite: a secret object:
$ kubectl describe secret artifacts-drybag
Name: artifacts-drybag
Namespace: artifacts
Labels: <none>
Annotations: <none>
Type: Opaque
Data
====
aws_access_key_id: 21 bytes
aws_secret_access_key: 41 bytes
db_url: 105 bytes
jwt_public_key: 451 bytes
travis-artifacts-psql.crt: 1224 bytes
create distributed app on ready Kubernetes cluster:
$ kubectl create secret tls artifacts-tls --cert=<cert-file-path> --key=<key-file-path>
$ kubectl create -f k8s-app.yml