Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 4b31b7262be8dd57994ff936662dbebd03073ae2
Author: Gunter Grodotzki <gunter.grodotzki@tidal.com>
Date:   Fri Sep 18 14:01:14 2020 +0200

    Squashed commit of the following:

    commit 5634bb9
    Author: Gunter Grodotzki <gunter.grodotzki@tidal.com>
    Date:   Fri Sep 18 14:00:15 2020 +0200

        Squashed commit of the following:

        commit 35ebf55
        Author: Gunter Grodotzki <gunter.grodotzki@tidal.com>
        Date:   Fri Sep 18 13:59:25 2020 +0200

            bumb sdk

commit 9189ab3
Author: Bishwa Shrestha <bishwa.shrestha@tidal.com>
Date:   Mon Sep 14 23:49:49 2020 +0200

    Publish on v* tag

commit 7a9ed84
Author: Bishwa Shrestha <bishwa.shrestha@tidal.com>
Date:   Mon Sep 14 23:26:12 2020 +0200

    goreleaser changes

commit 3388675
Author: Bishwa Shrestha <bishwa.shrestha@tidal.com>
Date:   Mon Sep 14 22:03:18 2020 +0200

    changelog

commit 2392c9c
Merge: e857b66 4f707e3
Author: Bishwa Shrestha <bishwa.shrestha@gmail.com>
Date:   Mon Sep 14 21:55:52 2020 +0200

    Merge pull request #1 from tidal-engineering/github_workflows

    Goreleaser + GH workflows

commit 4f707e3
Author: Bishwa Shrestha <bishwa.shrestha@tidal.com>
Date:   Mon Sep 14 21:53:17 2020 +0200

    Separate workflows for branches and tags

commit de1f6e9
Author: Bishwa Shrestha <bishwa.shrestha@tidal.com>
Date:   Mon Sep 14 21:28:42 2020 +0200

    terraform registry scaffolding

commit bbe2fbb
Author: Bishwa Shrestha <bishwa.shrestha@tidal.com>
Date:   Mon Sep 14 16:34:10 2020 +0200

    PR builds

commit 3c50f42
Author: Bishwa Shrestha <bishwa.shrestha@tidal.com>
Date:   Mon Sep 14 16:12:18 2020 +0200

    Goreleaser + GH workflows

commit e857b66
Author: Paul Rondeau <paulrondeau07@gmail.com>
Date:   Tue Jan 14 06:04:11 2020 -0800

    added dash to allowable application name regex (armory-io#41)

commit d503979
Author: Damian Myerscough <dmyerscough@users.noreply.github.com>
Date:   Thu Nov 28 14:40:59 2019 -0800

    Fix Terraform syntax (armory-io#34)

commit 2559f91
Author: Damian Myerscough <dmyerscough@users.noreply.github.com>
Date:   Thu Nov 28 14:40:08 2019 -0800

    Fix Apache Thrift location (armory-io#33)

commit 73e60f5
Author: Bishwa Shrestha <bishwa.shrestha@gmail.com>
Date:   Thu Nov 28 23:37:44 2019 +0100

    Add validation for spinnaker application name (armory-io#37)
  • Loading branch information
Gunter Grodotzki committed Sep 18, 2020
1 parent b623116 commit f232f95
Show file tree
Hide file tree
Showing 19 changed files with 349 additions and 356 deletions.
28 changes: 0 additions & 28 deletions .circleci/config.yml

This file was deleted.

36 changes: 36 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: goreleaser

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Unshallow
run: git fetch --prune --unshallow
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.14
- name: Import GPG key
id: import_gpg
uses: paultyng/ghaction-import-gpg@v2.1.0
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
PASSPHRASE: ${{ secrets.PASSPHRASE }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist --skip-publish --snapshot
env:
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33 changes: 33 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: goreleaser

on:
push:
tags:
- "v*"

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Unshallow
run: git fetch --prune --unshallow
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.14
- name: Import GPG key
id: import_gpg
uses: paultyng/ghaction-import-gpg@v2.1.0
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
PASSPHRASE: ${{ secrets.PASSPHRASE }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ terraform-provider-spinnaker
*.tf
*.log
pipelines
vendor/*
vendor/*
/dist/
*.key
54 changes: 54 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Visit https://goreleaser.com for documentation on how to customize this
# behavior.
before:
hooks:
- go mod download
- go generate ./...
builds:
- env:
# goreleaser does not work with CGO, it could also complicate
# usage by users in CI/CD systems like Terraform Cloud where
# they are unable to install libraries.
- CGO_ENABLED=0
mod_timestamp: "{{ .CommitTimestamp }}"
flags:
- -trimpath
ldflags:
- "-s -w -X main.version={{.Version}} -X main.commit={{.Commit}}"
goos:
- linux
- darwin
goarch:
- amd64
ignore:
- goos: darwin
goarch: "386"
binary: "{{ .ProjectName }}_v{{ .Version }}"
archives:
- format: zip
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
checksum:
name_template: "{{ .ProjectName }}_{{ .Version }}_SHA256SUMS"
algorithm: sha256
signs:
- artifacts: checksum
args:
# if you are using this is a GitHub action or some other automated pipeline, you
# need to pass the batch flag to indicate its not interactive.
- "--batch"
- "--local-user"
- "{{ .Env.GPG_FINGERPRINT }}" # set this environment variable for your signing key
- "--output"
- "${signature}"
- "--detach-sign"
- "${artifact}"
release:
prerelease: auto
# If you want to manually examine the release before its live, uncomment this line:
# draft: true
changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
[![CircleCI](https://circleci.com/gh/armory-io/terraform-provider-spinnaker/tree/master.svg?style=svg)](https://circleci.com/gh/armory-io/terraform-provider-spinnaker/tree/master)

# terraform-provider-spinnaker

Manage [Spinnaker](https://spinnaker.io) applications and pipelines with Terraform.
Expand All @@ -17,13 +15,13 @@ provider "spinnaker" {
resource "spinnaker_application" "my_app" {
application = "terraformtest"
email = "ethan@armory.io"
email = "ethan@armory.io"
}
resource "spinnaker_pipeline" "terraform_example" {
application = "${spinnaker_application.my_app.application}"
name = "Example Pipeline"
pipeline = file("pipelines/example.json")
name = "Example Pipeline"
pipeline = "${file("pipelines/example.json")}"
}
```

Expand Down Expand Up @@ -58,10 +56,10 @@ provider "spinnaker" {

#### Argument Reference

* `server` - The Gate API Url
* `config` - (Optional) - Path to Gate config file. See the [Spin CLI](https://github.com/spinnaker/spin/blob/master/config/example.yaml) for an example config.
* `ignore_cert_errors` - (Optional) - Set this to `true` to ignore certificate errors from Gate. Defaults to `false`.
* `default_headers` - (Optional) - Pass through a comma separated set of key value pairs to set default headers for the gate client when sending requests to your gate endpoint e.g. "header1=value1,header2=value2". Defaults to "".
- `server` - The Gate API Url
- `config` - (Optional) - Path to Gate config file. See the [Spin CLI](https://github.com/spinnaker/spin/blob/master/config/example.yaml) for an example config.
- `ignore_cert_errors` - (Optional) - Set this to `true` to ignore certificate errors from Gate. Defaults to `false`.
- `default_headers` - (Optional) - Pass through a comma separated set of key value pairs to set default headers for the gate client when sending requests to your gate endpoint e.g. "header1=value1,header2=value2". Defaults to "".

## Resources

Expand All @@ -75,9 +73,11 @@ resource "spinnaker_application" "my_app" {
email = "ethan@armory.io"
}
```

#### Argument Reference
* `application` - Application name
* `email` - Owner email

- `application` - Application name
- `email` - Owner email

### `spinnaker_pipeline`

Expand All @@ -93,9 +93,9 @@ resource "spinnaker_pipeline" "terraform_example" {

#### Argument Reference

* `application` - Application name
* `name` - Pipeline name
* `pipeline` - Pipeline JSON in string format, example `file(pipelines/example.json)`
- `application` - Application name
- `name` - Pipeline name
- `pipeline` - Pipeline JSON in string format, example `file(pipelines/example.json)`

### `spinnaker_pipeline_template`

Expand All @@ -113,7 +113,7 @@ resource "spinnaker_pipeline_template" "terraform_example" {

#### Argument Reference

* `template` - A yaml formated [DCD Spec pipeline template](https://github.com/spinnaker/dcd-spec/blob/master/PIPELINE_TEMPLATES.md#templates)
- `template` - A yaml formated [DCD Spec pipeline template](https://github.com/spinnaker/dcd-spec/blob/master/PIPELINE_TEMPLATES.md#templates)

### `spinnaker_pipeline_template_config`

Expand All @@ -131,4 +131,4 @@ resource "spinnaker_pipeline_template_config" "terraform_example" {

#### Argument Reference

* `pipeline_config` - A yaml formated [DCD Spec pipeline configuration](https://github.com/spinnaker/dcd-spec/blob/master/PIPELINE_TEMPLATES.md#configurations)
- `pipeline_config` - A yaml formated [DCD Spec pipeline configuration](https://github.com/spinnaker/dcd-spec/blob/master/PIPELINE_TEMPLATES.md#configurations)
11 changes: 6 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
module github.com/armory-io/terraform-provider-spinnaker
module github.com/tidal-engineering/terraform-provider-spinnaker

go 1.12
go 1.14

require (
cloud.google.com/go v0.37.4 // indirect
github.com/ghodss/yaml v1.0.0
github.com/hashicorp/terraform v0.12.0
github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d // indirect
github.com/hashicorp/terraform-plugin-sdk v1.7.0
github.com/mitchellh/mapstructure v1.1.2
github.com/spf13/pflag v1.0.3
github.com/spinnaker/spin v0.0.0-20190530150642-535d2dc1b985
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550 // indirect
)

replace git.apache.org/thrift.git => github.com/apache/thrift v0.0.0-20180902110319-2566ecd5d999
Loading

0 comments on commit f232f95

Please sign in to comment.