forked from plus3it/terraform-aws-codecommit-pr-reminders
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
57 lines (52 loc) · 2.46 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
56
57
dist: focal
language: minimal
stages:
- lint
- test
- 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: test
name: Apply Terraform test configs in mockstack
install:
- make docker-compose/install
- make mockstack/up
script: make mockstack/pytest
after_script:
- make mockstack/clean
- stage: deploy
if: branch = master AND type = push AND repo = plus3it/terraform-aws-codecommit-pr-reminders
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-codecommit-pr-reminders v$RELEASE_VERSION CHANGELOG](https://github.com/plus3it/terraform-aws-codecommit-pr-reminders/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: GKWwchhCE8DQoA6yCTYI2QDqXK9ydPnwCM9JfEmr2dogjGqX3xs5RJJk4xKmIV12w1uLXMS9xi4E/CoFKBNl9DueoKjQmCzx016cdb/clfMYTth75nJSsmc42GVUq2fWlrbNWbhIRQGhJmr6ePKu+wn/wcpnpKrllTH/3y/30T0oRr2m61r5af61I+Vv+ebadHn1cnDlmMu93pkQXkiyCtmYQyyuRlIzYb0xX56BTF2g1ivmIv1mgLolcz9MlFbe0p3+m+8esonSlNMJOiMy6lH199brGkyKYCb/gW8TWDjP/jQz3E+lgLCIDzeTR55no0yjivR6gxP5RCJL7Q+WiEAu/cDyhMrlqevNvrRuJTHBHmHXUuAzidPrILw7LfAFv6+CsytwqfqbOFZDGXpunM/PrMXuBaNCnBJfcNNpgqS+sgvxDd/KrDjxhUOVaIl8bG6HP/fpeKgZJdL89CxNQIeUyrE45Sv+xMqqkuy0olTjDXExx7rar4AFW2W9p/9TsjFeFHIvh8RrkfowwJw/Wcl3fMbLrBZvpEGxlxcajrh3xLtPXmiHSaXnD+g91usLGqf/se5gqNXJ0nYp0YXH3itA2DSYUo1a+LWN+UXJ0BxrtpH5DyOZ5kZpi9gAyRBTePacoNvBxjaJVDASYbSSVcf3Ft0JDbCB1Y+IDaFkzWI=
name: $RELEASE_VERSION
body: $RELEASE_BODY
tag_name: $RELEASE_VERSION
target_commitish: $TRAVIS_COMMIT
draft: false
on:
branch: master
repo: plus3it/terraform-aws-codecommit-pr-reminders
condition: '"$PRIOR_VERSION" != "$RELEASE_VERSION"'