-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
init/updateFortiTokenCloudTerraform: 1.0.0
Signed-off-by: FTNT-HQCM <[email protected]>
- Loading branch information
Showing
29 changed files
with
3,530 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
dist/ | ||
examples/ | ||
.idea/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
default: | ||
image: dops-jfrog.fortinet-us.com/hqcm_dockers/hqcm-buildall:latest | ||
tags: ["k8s-airgap-runner062123"] | ||
|
||
|
||
variables: | ||
PROXY: "https://dops-jfrog.fortinet-us.com/artifactory/api/go-proxy" | ||
TAG_NAME: "latest" | ||
DOCKER_REGISTRY_URL: "dops-registry.fortinet-us.com" | ||
PROJECT_NAME: "terraform-provider-fortitokencloud" | ||
NFS_FILE_PATH: "/nfs/Build_PKG/terraform-provider-fortitokencloud/build_artifacts" | ||
BUILD_MAJOR: 1 | ||
BUILD_MINOR: 0 | ||
PATCH: 0 | ||
BN: 1 | ||
|
||
|
||
stages: | ||
- lint | ||
- build | ||
- test | ||
#- deploy | ||
#- uploadartifacts #Need to upload artifacts to info.fortinet.com | ||
#- update_eco_mantis # need to update eco and bugnote on info.fortinet.com and mantis.fortinet.com | ||
|
||
|
||
lint-job: | ||
stage: lint | ||
script: | ||
- cd ~ && source ./hqcm-init.sh | ||
- cd $CI_PROJECT_DIR | ||
- echo "I am in $(pwd)" | ||
- go fmt $(go list ./... | grep -v /vendor/) | ||
- go vet $(go list ./... | grep -v /vendor/) | ||
- go test -race $(go list ./... | grep -v /vendor/) | ||
|
||
|
||
go-build-job: | ||
stage: build | ||
before_script: | ||
- cd ~ && source ./hqcm-init.sh | ||
- cd $CI_PROJECT_DIR | ||
|
||
script: | ||
- mkdir -p binaries | ||
- go build -o binaries ./... | ||
- cp -r binaries /nfs/Build_PKG/$NFS_FILEPATH | ||
artifacts: | ||
paths: | ||
- binaries | ||
|
||
|
||
unit-tests: | ||
stage: test | ||
script: | ||
- echo "Running unit tests..." | ||
- sleep 60 | ||
- echo "100% of tests passed!" | ||
only: | ||
changes: | ||
- "*.go" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
## Purpose: | ||
|
||
## Mantis: | ||
|
||
## Description: | ||
|
||
## Technical Description: | ||
|
||
## Testing Done: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Visit https://golangci-lint.run/ for usage documentation | ||
# and information on other useful linters | ||
issues: | ||
max-per-linter: 0 | ||
max-same-issues: 0 | ||
|
||
linters: | ||
disable-all: true | ||
enable: | ||
- durationcheck | ||
- errcheck | ||
- exportloopref | ||
- forcetypeassert | ||
- gofmt | ||
- gosimple | ||
- govet | ||
- ineffassign | ||
- makezero | ||
- misspell | ||
- nilerr | ||
- predeclared | ||
- staticcheck | ||
- tenv | ||
- unconvert | ||
- unparam | ||
- unused |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# This is an example .goreleaser.yml file with some sensible defaults. | ||
# Make sure to check the documentation at https://goreleaser.com | ||
|
||
# The lines below are called `modelines`. See `:help modeline` | ||
# Feel free to remove those if you don't want/need to use them. | ||
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json | ||
# vim: set ts=2 sw=2 tw=0 fo=cnqoj | ||
|
||
version: 1 | ||
|
||
before: | ||
hooks: | ||
# You may remove this if you don't use go modules. | ||
- go mod tidy | ||
# you may remove this if you don't need go generate | ||
- go generate ./... | ||
project_name: terraform-provider-fortitokencloud | ||
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: | ||
- freebsd | ||
- windows | ||
- linux | ||
- darwin | ||
goarch: | ||
- amd64 | ||
- '386' | ||
- arm | ||
- arm64 | ||
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 in 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}" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
default: testacc | ||
|
||
# Run acceptance tests | ||
.PHONY: testacc | ||
testacc: | ||
TF_ACC=1 go test ./... -v $(TESTARGS) -timeout 120m |
Oops, something went wrong.