forked from plus3it/terraform-aws-tardigrade-security-hub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
48 lines (43 loc) · 2.22 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
dist: focal
language: minimal
stages:
- lint
- deploy
if: branch = master OR type = pull_request
before_install:
- tmpdaemon=$(mktemp)
- sudo jq '."registry-mirrors" += ["https://mirror.gcr.io"]' /etc/docker/daemon.json > "$tmpdaemon"
- sudo mv "$tmpdaemon" /etc/docker/daemon.json
- sudo systemctl daemon-reload
- sudo systemctl restart docker
- docker system info
jobs:
include:
- stage: lint
name: Project Syntax Verification
script: make docker/run target=lint
- stage: deploy
if: branch = master AND type = push AND repo = plus3it/terraform-aws-tardigrade-security-hub
before_script:
- |
PRIOR_VERSION=$(git describe --abbrev=0 --tags)
RELEASE_VERSION=$(grep current_version $TRAVIS_BUILD_DIR/.bumpversion.cfg | sed 's/^.*= //' )
RELEASE_BODY="* [terraform-aws-tardigrade-security-hub v$RELEASE_VERSION CHANGELOG](https://github.com/plus3it/terraform-aws-tardigrade-security-hub/blob/$RELEASE_VERSION/CHANGELOG.md)"
export PRIOR_VERSION RELEASE_VERSION RELEASE_BODY
script: skip
before_deploy:
- |
(set -x; git tag -a $RELEASE_VERSION -m $RELEASE_VERSION)
deploy:
provider: releases
api_key:
secure: Ou2JpDnultpM5v/AtM6qfdHjlIQHF9yl3c0lz4ScYm/Gyr07EP0k3LxZ9c//YeiI9v10WKsDm3sVNqFRB0dSLSSfufToJOlh98s6zzUr8ayPuR9lkiaA35bKRhJvLzcbIm1W9GETioEZhCEa34bqXJ0lZ8J2CuA38K45DgJMZGOkS3S28nuc4MRGN7BMKCnkD6t+/J+al2IEIz/cIaohfhTqr/05y3U81fOAe3pFstro29fD+NI2LHGsjwE+mF7B1rm5QF+AFIl/6+1ZjA/xrGK/BaWpYmhAwWdJnCEJk26VYeJXftGxQ90opU/ISVsX/ptOPm/I8EQ3wDqLHhlixg+0/Bm7dbylU9akJP8gT/Gr1Ntc8Zo9eJI7KS+jIL3OSKkrVMJYwhoOgxcAUo537AlJkjEyvD8+he4VaDyJkpRmepViaYg4THP9Cr1G6Dtc2zaXtl23awOQJL0oKwsuWW3UqAH5psXTY9LYO4WaoKpk9Cjc9mCQsalVRsRj1jiCxhMnYtRVUFTGLDHpczlA/9d/zdVzuDI+R8OY4U9RVI2zsPXIqW8yCyNCsjLCfoyQSiStI4w/Dxc2OeHmjOlvmT5ntfsJNla6xGCRdnym2M5dTkibMHI0n8fBI+kkNTS0AqKUpPUeBPNP+AUUXW07f0tXXxvw9mG4Wt8cIQCgwwU=
name: $RELEASE_VERSION
body: $RELEASE_BODY
tag_name: $RELEASE_VERSION
target_commitish: $TRAVIS_COMMIT
draft: false
on:
branch: master
repo: plus3it/terraform-aws-tardigrade-security-hub
condition: '"$PRIOR_VERSION" != "$RELEASE_VERSION"'