Skip to content

Commit c14eb01

Browse files
authored
Feat: Pipeline Cron Trigger (#90)
## What * Add resource for Pipeline Cron Trigger * Fix Terraform Acceptance tests * Add Acceptance Tests to CI * Add release automation (release drafter, labeler, automatic changelog drafting) * GH Repo best practices (PULL_REQUEST_TEMPLATE, CODEOWNERS, etc) * Misc documentation fixes ## Why * Only git triggers are currently supported. * Triggers should be a standalone resource. The next minor release (`0.2.0`) will support remaining standalone triggers (registry, helm, git). ## Notes * Closes #39 * Closes #88 * #84 Co-authored-by: Yonatan Koren <[email protected]> Co-authored-by: korenyoni <[email protected]>
1 parent 6225574 commit c14eb01

37 files changed

+1210
-200
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @codefresh-io/devops @yaroslav-codefresh @denis-codefresh

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
## What
2+
3+
## Why
4+
5+
## Notes

.github/labeler.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
source:
2+
- 'client/**/*'
3+
- 'codefresh/**/*'
4+
- '*.go'
5+
- '*.mod'
6+
- '*.sum'
7+
8+
docs:
9+
- README.md
10+
- docs/**/*
11+
- examples/**/*
12+
- tf_modules/**/*
13+
- CHANGELOG.md
14+
15+
automation:
16+
- scripts/**/*
17+
- .github/**/*
18+
- codefresh.yml
19+
- .goreleaser.yml
20+
- GNUmakefile

.github/release-drafter.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name-template: "v$RESOLVED_VERSION"
2+
tag-template: "v$RESOLVED_VERSION"
3+
categories:
4+
- title: "🚀 Features"
5+
labels:
6+
- "feature"
7+
- "enhancement"
8+
- title: "🐛 Bug Fixes"
9+
labels:
10+
- "fix"
11+
- "bugfix"
12+
- "bug"
13+
- title: "🧰 Maintenance"
14+
label: "chore"
15+
change-template: "- $TITLE @$AUTHOR (#$NUMBER)"
16+
change-title-escapes: '\<*_&'
17+
version-resolver:
18+
major:
19+
labels:
20+
- "major"
21+
minor:
22+
labels:
23+
- "minor"
24+
- "feature"
25+
- "enhancement"
26+
patch:
27+
labels:
28+
- "patch"
29+
- "fix"
30+
- "bugfix"
31+
- "bug"
32+
default: patch
33+
template: |
34+
## Changes
35+
$CHANGES
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: "Changelog from Release"
2+
3+
on:
4+
release:
5+
types: [published, released]
6+
7+
jobs:
8+
update_changelog:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
with:
13+
ref: master
14+
- uses: rhysd/changelog-from-release/action@v3
15+
with:
16+
file: CHANGELOG.md
17+
github_token: ${{ secrets.GITHUB_TOKEN }}
18+
commit_summary_template: 'Update CHANGELOG.md for %s'

.github/workflows/draft-release.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Draft Release
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
types: [opened, reopened, synchronize]
9+
10+
jobs:
11+
update_release_draft:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: release-drafter/release-drafter@v5
15+
env:
16+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17+
with:
18+
publish: false
19+
config-name: release-drafter.yaml

.github/workflows/update-labels.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: "Pull Request Labeler"
2+
on:
3+
- pull_request_target
4+
5+
jobs:
6+
triage:
7+
permissions:
8+
contents: read
9+
pull-requests: write
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/labeler@v4
13+
with:
14+
repo-token: "${{ secrets.GITHUB_TOKEN }}"

.goreleaser.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,4 @@ signs:
3232
- "${signature}"
3333
- "--detach-sign"
3434
- "${artifact}"
35-
release:
36-
# draft: true
37-
changelog:
38-
sort: asc
39-
filters:
40-
exclude:
41-
- '^docs:'
42-
- '^test:'
4335

CHANGELOG.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
1-
# Changelog
21

3-
## [1.0.0 (Unreleased)](https://github.com/codefresh-io/terraform-provider-codefresh/tree/HEAD)
4-
5-
[Full Changelog](https://github.com/codefresh-io/terraform-provider-codefresh/compare/17fe7e1b0003bda492682d06ba1917cae91d6faf...HEAD)

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ terraform {
4848
```
4949

5050

51-
## [Documentations](./docs)
51+
## [Documentation](./docs)
5252

5353
## [Examples](./examples)
5454

@@ -77,9 +77,14 @@ export CODEFRESH_API_KEY='xyz'
7777

7878
## Testing the Provider
7979

80+
```bash
81+
export TF_ACC="test"
82+
export CODEFRESH_API_KEY=[YOUR API TOKEN]
83+
go test -v ./...
84+
```
85+
8086
## License
8187

82-
Copyright 2020 Codefresh.
88+
Copyright 2022 Codefresh.
8389

8490
The Codefresh Provider is available under [MPL2.0 license](./LICENSE).
85-

0 commit comments

Comments
 (0)