1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2024-12-14 11:57:51 +00:00
node-feature-discovery/.travis.yml
Alexander Kanevskiy eb8fe6393a Update builder image to Go 1.13.12
Go versions after 1.13.7 contain fix for CVE-2020-7919
2020-07-10 14:24:01 +03:00

43 lines
1.5 KiB
YAML

language: go
go:
- "1.13.12"
env:
global:
# Sanitize git branch name into a valid docker tag name
- IMAGE_TAG_NAME=$(echo -n $TRAVIS_BRANCH | tr -c "[a-zA-Z0-9._'" "_")
- GO111MODULE=on
services:
- docker
before_script:
- curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $(go env GOPATH)/bin v1.27.0
script:
- make gofmt-verify
- make ci-lint
- make image -e
- if [ "$TRAVIS_BRANCH" == master -a -n "$IMAGE_REPO_USER" ]; then
set -e;
echo "$IMAGE_REPO_PASSWORD" | docker login -u "$IMAGE_REPO_USER" --password-stdin quay.io;
make push -e;
curl -o $HOME/bin/aws-iam-authenticator --create-dirs https://amazon-eks.s3-us-west-2.amazonaws.com/1.10.3/2018-07-26/bin/linux/amd64/aws-iam-authenticator;
chmod a+x $HOME/bin/aws-iam-authenticator;
export PATH=$PATH:$HOME/bin;
echo "$KUBECONFIG_AWS" > kubeconfig_aws;
echo "$E2E_TEST_CONFIG_DATA" > e2e-test-config;
make e2e-test -e KUBECONFIG=`pwd`/kubeconfig_aws E2E_TEST_CONFIG=`pwd`/e2e-test-config;
fi
deploy:
- on:
branch: master
condition: -n "$IMAGE_REPO_USER"
provider: script
script: echo "$IMAGE_REPO_PASSWORD" | docker login -u "$IMAGE_REPO_USER" --password-stdin quay.io && make push -e
- on:
tags: true
condition: -n "$IMAGE_REPO_USER"
provider: script
script: echo "$IMAGE_REPO_PASSWORD" | docker login -u "$IMAGE_REPO_USER" --password-stdin quay.io && make push -e