Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,18 @@ jobs:
- pip install -r tests/acceptance/requirements.txt
script:
- pytest -vv -rA --diff-type=split tests/acceptance/test_acceptance/ --host http://localhost:8080
- stage: 'Building Optimizely Agent'
if: (branch = master AND type = push) OR type = pull_request OR tag IS present
env:
SDK=agent
SDK_BRANCH=$(if [ -z "$TRAVIS_PULL_REQUEST_BRANCH" ]; then echo ${TRAVIS_BRANCH}; else echo "$TRAVIS_PULL_REQUEST_BRANCH"; fi)
cache: false
before_install:
./scripts/pull_travis_ci_tools.sh
install: skip
script:
- "$HOME/travisci-tools/trigger-script-with-status-update.sh"


- stage: Test Build using latest tag (no upload)
name: linux
Expand Down
2 changes: 1 addition & 1 deletion scripts/Makefile.ci
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.DEFAULT_GOAL := help

ci_build_static_binary: ## build static binary
ci_build_static_binary: check-go ## build static binary
CGO_ENABLED=0 $(GOBUILD) $(LDFLAGS) -o $(GOBIN)/$(TARGET) cmd/optimizely/main.go

ci_build_dockerimage: ## build minimal docker image of optimizely
Expand Down
1 change: 1 addition & 0 deletions scripts/dockerfiles/Dockerfile.static
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ FROM golang:$GO_VERSION as builder
WORKDIR /go/src/github.com/optimizely/agent
COPY . .
RUN make install
RUN make static
RUN make ci_build_static_binary

FROM scratch
Expand Down
6 changes: 6 additions & 0 deletions scripts/pull_travis_ci_tools.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

set -e
BRANCH_NAME=${1:-master}
mkdir $HOME/travisci-tools && pushd $HOME/travisci-tools && git init && git pull https://$CI_USER_TOKEN@github.com/optimizely/travisci-tools.git $BRANCH_NAME && popd