mirror of
https://github.com/getsops/sops.git
synced 2026-02-05 12:45:21 +01:00
* Add vault/api to vendor/ * Adds support for sops publish-ing to Vault * Adds support for publishing secrets (unencrypted) to Vault * Adds a new EmitAsMap for TreeBanches * Adds documentation about sops publish-ing to Vault * Initial integration/functional test for publishing to vault
54 lines
1.6 KiB
YAML
54 lines
1.6 KiB
YAML
language: go
|
|
go: 1.12
|
|
go_import_path: go.mozilla.org/sops/
|
|
|
|
env:
|
|
- VAULT_VERSION=1.1.3 VAULT_TOKEN=root VAULT_ADDR='http://127.0.0.1:8200'
|
|
|
|
addons:
|
|
apt:
|
|
packages:
|
|
- rpm
|
|
- ruby
|
|
- python3
|
|
- unzip
|
|
|
|
before_install:
|
|
- gem install fpm || sudo gem install fpm
|
|
- curl https://sh.rustup.rs -sSf | sh -s -- -y
|
|
- source ~/.cargo/env
|
|
- curl -O "https://releases.hashicorp.com/vault/${VAULT_VERSION}/vault_${VAULT_VERSION}_linux_amd64.zip" && sudo unzip vault_${VAULT_VERSION}_linux_amd64.zip -d /usr/local/bin/
|
|
|
|
before_script:
|
|
- vault server -dev -dev-root-token-id="$VAULT_TOKEN" &
|
|
|
|
script:
|
|
- 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then make; fi'
|
|
- 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then make origin-build; fi'
|
|
- bash <(curl -s https://codecov.io/bash)
|
|
|
|
before_deploy:
|
|
- mkdir dist
|
|
- make deb-pkg rpm-pkg
|
|
- mv *.deb *.rpm dist/
|
|
- GOOS=darwin CGO_ENABLED=0 go build -o dist/sops-${TRAVIS_TAG}.darwin go.mozilla.org/sops/cmd/sops
|
|
- GOOS=windows CGO_ENABLED=0 go build -o dist/sops-${TRAVIS_TAG}.exe go.mozilla.org/sops/cmd/sops
|
|
- GOOS=linux CGO_ENABLED=0 go build -o dist/sops-${TRAVIS_TAG}.linux go.mozilla.org/sops/cmd/sops
|
|
- |
|
|
if [ ! -z "$TRAVIS_TAG" ]; then
|
|
version="$(grep '^const Version' version/version.go |cut -d '"' -f 2)"
|
|
if [ "$version" != "$TRAVIS_TAG" ]; then
|
|
echo "Git tag $TRAVIS_TAG does not match version $version, update the source!"
|
|
exit 1
|
|
fi
|
|
fi
|
|
|
|
deploy:
|
|
provider: releases
|
|
api_key: "${GITHUB_OAUTH_TOKEN}"
|
|
file_glob: true
|
|
file: dist/*
|
|
skip_cleanup: true
|
|
on:
|
|
tags: true
|