Skip to content

Commit

Permalink
Migrating to scripts repository
Browse files Browse the repository at this point in the history
  • Loading branch information
ViBiOh committed Nov 14, 2019
1 parent 7b60d73 commit 2811c60
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 335 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# scripts
scripts/

# Golang
bin/
release/
Expand Down
14 changes: 7 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ jobs:
- stage: Build

sudo: required
language: minimal
services:
- docker
script: docker build --build-arg CODECOV_TOKEN --build-arg "APP_VERSION=$(make version)" -t "${DOCKER_USER}/$(make name):$(make version)" .
Expand All @@ -13,28 +14,27 @@ jobs:
- stage: Publish

sudo: required
language: minimal
services:
- docker
script:
- echo "${DOCKER_PASS}" | docker login -u "${DOCKER_USER}" --password-stdin
- docker pull "${DOCKER_USER}/$(make name):$(make version)"
- docker tag "${DOCKER_USER}/$(make name):$(make version)" "${DOCKER_USER}/$(make name):latest"
- docker push "${DOCKER_USER}/$(make name):latest"
- curl -q -sSL --max-time 10 "https://raw.githubusercontent.com/ViBiOh/scripts/master/bootstrap" | bash -s "docker_promote"
- scripts/docker_promote "${DOCKER_USER}/$(make name)" "$(make version)"
after_success:
- curl -q -sSL --max-time 10 -X POST https://goreportcard.com/checks?repo=github.com/ViBiOh/goweb

- stage: Deploy

language: minimal
script: |
sed \
-e "s|\${DOCKER_USER}|${DOCKER_USER}|g" \
-e "s|\${DOMAIN}|${DOMAIN}|g" \
-e "s|\\\$|\$\$|g" \
docker-compose.yml > docker-compose-env.yml
deploy:
provider: script
skip_cleanup: true
script: bash script/deploy "$(make name)" "@docker-compose-env.yml"
curl -q -sSL --max-time 10 "https://raw.githubusercontent.com/ViBiOh/scripts/master/bootstrap" | bash -s "deploy"
scripts/deploy "$(make name)" "@docker-compose-env.yml"
stages:
- Build
Expand Down
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SHELL = /bin/sh
SHELL = /bin/bash

ifneq ("$(wildcard .env)","")
include .env
Expand Down Expand Up @@ -45,6 +45,7 @@ app: init dev
## init: Download dependencies
.PHONY: init
init:
@curl -q -sSL --max-time 10 "https://raw.githubusercontent.com/ViBiOh/scripts/master/bootstrap" | bash -s "git_hooks" "coverage"
go get github.com/kisielk/errcheck
go get golang.org/x/lint/golint
go get golang.org/x/tools/cmd/goimports
Expand All @@ -65,7 +66,7 @@ style:
## test: Test with coverage
.PHONY: test
test:
script/coverage
scripts/coverage
go test $(PACKAGES) -bench . -benchmem -run Benchmark.*

## build: Build binary
Expand Down
34 changes: 0 additions & 34 deletions script/coverage

This file was deleted.

17 changes: 0 additions & 17 deletions script/deploy

This file was deleted.

53 changes: 0 additions & 53 deletions script/hooks/pre-commit

This file was deleted.

22 changes: 0 additions & 22 deletions script/install_hooks

This file was deleted.

Loading

0 comments on commit 2811c60

Please sign in to comment.