-
Notifications
You must be signed in to change notification settings - Fork 13
/
.travis.yml
55 lines (55 loc) · 2.41 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Use the newer Travis-CI build templates based on the
# Debian Linux distribution "Xenial" release.
os: linux
dist: focal
language: minimal
env:
global:
- DOCKER_CLI_EXPERIMENTAL=enabled
addons:
sonarcloud:
organization: fred78290-github
token:
secure: "X6QTVwIX6ZGN3CSozfvTevW6XxvVFBXuZZxTSIsloldJ4uwxGZiKUyfO83PSov7I7FghKTaMppPxMgO6ZT5FlBqFNGJZ53QfrajGJ8//tS+fYZ94SucEYMZ4W7B4K+YjEMJERgBSw2mgrMIy6mZ+P4j0mhuHbAtvloFA7tJIjXYMTuoPqfHzeYkuBPGcWJ0r2n0zQTMNGVnjnsbZlj50BPoMx9H7S6dvtp1L67yyom4NnrDKwNNnq/dy5O0lhlIR3KzBXlf8E+pzC+CCDIXiasENhtJawez4yQ63gPtbJSR+9FbUmdoEX3Lr83HnhGrXnWJ5BsxYdjrQSV7E3B9EMJpP2C5pIjKC9HVgNyoeHgLT8nxcKtsQpmSyS/+lbus8/Vj+lTlir7vmcPDlehUHOeIemJajB23kmNiwWfo71MvfSnVt+4MqAYgegUW5G6fJAqEahVA2hgo/o58RXnD6m61EyPOlC273CpLJ8qrFqa6+cHspGkWa9KQ5RNfDIkj8i2iHR+HXkaeNy4L1KM2+6KIx7sJl1R1fo6RYwYM3S0HfL6Qm+HGqYesOhH9tTs2X27whzqBb+GzgwFuxYrBR6X+rAD/SXjF7ubqroJNmN+o4uGeVVevMCkFZc5vI2Q3XW8TU28orhHXm+aGHaq9GJ7I83om+69dcSi9uiNixFNA="
cache:
directories:
- $HOME/.sonar/cache
- vendor
jobs:
include:
- stage: build
if: NOT(tag IS present OR commit_message =~ /\/ci-deploy/)
install: true
script:
- make -e REGISTRY=fred78290 -e TAG=$TRAVIS_TAG container
- sonar-scanner
- stage: test
if: NOT(tag IS present OR commit_message =~ /\/ci-deploy/)
install: true
script: make test-unit
- stage: deploy
if: tag IS present OR commit_message =~ /\/ci-deploy/
services:
- docker
before_install:
- mkdir -vp ~/.docker/cli-plugins/
- curl --silent -L "https://github.com/docker/buildx/releases/download/v0.5.1/buildx-v0.5.1.linux-amd64" > ~/.docker/cli-plugins/docker-buildx
- chmod a+x ~/.docker/cli-plugins/docker-buildx
install: true
script:
- docker buildx version
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker buildx create --use
- make -e REGISTRY=fred78290 -e TAG=$TRAVIS_TAG container-push-manifest
- cp out/linux/amd64/vsphere-autoscaler vsphere-autoscaler-amd64
- cp out/linux/arm64/vsphere-autoscaler vsphere-autoscaler-arm64
deploy:
provider: releases
api_key: $GITHUB_OAUTH_TOKEN
skip_cleanup: true
on:
tags: true
repo: Fred78290/kubernetes-vmware-autoscaler
file:
- vsphere-autoscaler-amd64
- vsphere-autoscaler-arm64