add travis arguments
This commit is contained in:
+1
-1
@@ -3,4 +3,4 @@ install:
|
||||
- docker-compose --version
|
||||
|
||||
script:
|
||||
- docker build --build-arg COVERALLS_TOKEN=$COVERALLS_TOKEN .
|
||||
- docker build --build-arg COVERALLS_TOKEN=$COVERALLS_TOKEN --build-arg TRAVIS_JOB_ID=$TRAVIS_JOB_ID --build-arg TRAVIS_PULL_REQUEST=$TRAVIS_PULL_REQUEST --build-arg TRAVIS_BRANCH=$TRAVIS_BRANCH .
|
||||
|
||||
+7
-1
@@ -3,6 +3,10 @@ FROM umputun/baseimage:buildgo-latest as build-backend
|
||||
ARG COVERALLS_TOKEN
|
||||
ENV COVERALLS_TOKEN=$COVERALLS_TOKEN
|
||||
|
||||
ARG TRAVIS_JOB_ID
|
||||
ARG TRAVIS_PULL_REQUEST
|
||||
ARG TRAVIS_BRANCH
|
||||
|
||||
WORKDIR /go/src/github.com/umputun/remark
|
||||
|
||||
ADD app /go/src/github.com/umputun/remark/app
|
||||
@@ -22,7 +26,9 @@ RUN if [ "x$COVERALLS_TOKEN" = "x" ] ; then \
|
||||
else go get github.com/mattn/goveralls && \
|
||||
goveralls -coverprofile=.cover/cover.out -service=travis-ci -repotoken $COVERALLS_TOKEN; fi
|
||||
|
||||
RUN go build -o remark -ldflags "-X main.revision=$(git rev-parse --abbrev-ref HEAD)-$(git describe --abbrev=7 --always --tags)-$(date +%Y%m%d-%H:%M:%S) -s -w" ./app
|
||||
RUN \
|
||||
echo "rev=$(git rev-parse --abbrev-ref HEAD)" && \
|
||||
go build -o remark -ldflags "-X main.revision=$(git rev-parse --abbrev-ref HEAD)-$(git describe --abbrev=7 --always --tags)-$(date +%Y%m%d-%H:%M:%S) -s -w" ./app
|
||||
|
||||
|
||||
FROM node:9.4-alpine as build-frontend
|
||||
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestMigrator_RemoveOldBackupFiles(t *testing.T) {
|
||||
func TestBackup_RemoveOldBackupFiles(t *testing.T) {
|
||||
loc := "/tmp/remark-backups.test"
|
||||
defer os.RemoveAll(loc)
|
||||
|
||||
@@ -37,7 +37,7 @@ func TestMigrator_RemoveOldBackupFiles(t *testing.T) {
|
||||
assert.Equal(t, "backup-site2-20171210.gz", ff[3].Name())
|
||||
}
|
||||
|
||||
func TestMigrator_MakeBackup(t *testing.T) {
|
||||
func TestBackup_MakeBackup(t *testing.T) {
|
||||
loc := "/tmp/remark-backups.test"
|
||||
defer os.RemoveAll(loc)
|
||||
os.MkdirAll(loc, 0700)
|
||||
@@ -53,7 +53,7 @@ func TestMigrator_MakeBackup(t *testing.T) {
|
||||
assert.Equal(t, int64(52), fi.Size())
|
||||
}
|
||||
|
||||
func TestMigrator_Do(t *testing.T) {
|
||||
func TestBackup_Do(t *testing.T) {
|
||||
loc := "/tmp/remark-backups.test"
|
||||
defer os.RemoveAll(loc)
|
||||
os.MkdirAll(loc, 0700)
|
||||
|
||||
Reference in New Issue
Block a user