Skip to content

feat(ci): integration with fsc #202

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Mar 25, 2020
Merged
12 changes: 12 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,18 @@ jobs:
script:
- pytest -vv --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
os: linux
Expand Down
3 changes: 2 additions & 1 deletion scripts/dockerfiles/Dockerfile.static
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ FROM golang:$GO_VERSION as builder

WORKDIR /go/src/github.com/optimizely/agent
COPY . .
RUN make install
RUN make install build
RUN make ci_build_static_binary

FROM scratch
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=builder /go/src/github.com/optimizely/agent/bin/optimizely /optimizely
CMD ["/optimizely"]

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