This repository has been archived by the owner on Jul 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from iwarapter/feature/tf-sdk-2
Feature/tf sdk 2
- Loading branch information
Showing
1,739 changed files
with
60,970 additions
and
175,037 deletions.
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,50 @@ | ||
on: [push, pull_request] | ||
name: ci | ||
jobs: | ||
build: | ||
name: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Set up Go 1.14 | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: 1.14 | ||
id: go | ||
|
||
- name: Install tools | ||
run: | | ||
export PATH=$PATH:$(go env GOPATH)/bin | ||
go get -u honnef.co/go/tools/cmd/staticcheck | ||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v1 | ||
|
||
- name: Staticcheck | ||
run: | | ||
export PATH=$PATH:$(go env GOPATH)/bin | ||
staticcheck ./... | ||
- name: Check dependencies | ||
run: | | ||
go mod tidy | ||
git diff --exit-code -- go.mod go.sum || \ | ||
(echo; echo "Unexpected difference in go.mod/go.sum files. Run 'go mod tidy' command or revert any go.mod/go.sum changes and commit."; exit 1) | ||
echo "==> Checking source code with go mod vendor..." | ||
go mod vendor | ||
git diff --compact-summary --exit-code -- vendor || \ | ||
(echo; echo "Unexpected difference in vendor/ directory. Run 'go mod vendor' command or revert any go.mod/go.sum/vendor changes and commit."; exit 1) | ||
- name: Test | ||
env: | ||
PING_IDENTITY_DEVOPS_USER: ${{ secrets.PING_IDENTITY_DEVOPS_USER }} | ||
PING_IDENTITY_DEVOPS_KEY: ${{ secrets.PING_IDENTITY_DEVOPS_KEY }} | ||
run: | | ||
TF_ACC=1 go test -mod=vendor ./... -v -trimpath -coverprofile=coverage.out | ||
go tool cover -func=coverage.out | ||
- name: SonarCloud Scan | ||
uses: sonarsource/sonarcloud-github-action@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |
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,72 @@ | ||
on: [push] | ||
name: e2e | ||
jobs: | ||
e2e: | ||
name: e2e | ||
strategy: | ||
matrix: | ||
pingaccess-version: [5.2.3, 5.3.2, 6.0.2, 6.1.0] | ||
services: | ||
pingaccess: | ||
image: pingidentity/pingaccess:${{ matrix.pingaccess-version }}-edge | ||
env: | ||
PING_IDENTITY_ACCEPT_EULA: YES | ||
PING_IDENTITY_DEVOPS_USER: ${{ secrets.PING_IDENTITY_DEVOPS_USER }} | ||
PING_IDENTITY_DEVOPS_KEY: ${{ secrets.PING_IDENTITY_DEVOPS_KEY }} | ||
ports: | ||
- 9000:9000 | ||
pingfederate: | ||
image: pingidentity/pingfederate:10.0.2-edge | ||
env: | ||
PING_IDENTITY_ACCEPT_EULA: YES | ||
PING_IDENTITY_DEVOPS_USER: ${{ secrets.PING_IDENTITY_DEVOPS_USER }} | ||
PING_IDENTITY_DEVOPS_KEY: ${{ secrets.PING_IDENTITY_DEVOPS_KEY }} | ||
SERVER_PROFILE_URL: https://github.com/pingidentity/pingidentity-server-profiles.git | ||
SERVER_PROFILE_PATH: getting-started/pingfederate | ||
ports: | ||
- 9999:9999 | ||
- 9031:9031 | ||
|
||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Go 1.14 | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: 1.14 | ||
id: go | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v1 | ||
|
||
- name: Setup Test Environment | ||
run: | | ||
curl -k -i -H "Content-Type: application/json" -H "X-Xsrf-Header: PingFederate" --user Administrator:2FederateM0re -d "@func-tests/pf-settings.json" -X PUT https://localhost:9999/pf-admin-api/v1/serverSettings | ||
curl -k https://localhost:9031/.well-known/openid-configuration | ||
- name: Change default PA password for 5.2 | ||
if: ${{ startsWith( matrix.pingaccess-version , '5.2') }} | ||
run: sed -i 's/2FederateM0re/2Access/g' func-tests/main.tf | ||
|
||
- name: Setup Terraform | ||
uses: hashicorp/setup-terraform@v1 | ||
|
||
- name: Install Build and Deploy | ||
run: make build deploy-local | ||
|
||
- name: Terraform Init | ||
run: make func-init | ||
|
||
- name: Terraform Plan | ||
run: make func-plan | ||
env: | ||
TF_VAR_pa6: ${{ startsWith( matrix.pingaccess-version , '6') }} | ||
|
||
- name: Terraform Apply | ||
run: make func-apply | ||
env: | ||
TF_VAR_pa6: ${{ startsWith( matrix.pingaccess-version , '6') }} | ||
|
||
- name: Terraform Plan | ||
run: make func-plan | ||
env: | ||
TF_VAR_pa6: ${{ startsWith( matrix.pingaccess-version , '6') }} |
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,14 @@ | ||
name: gosec | ||
on: [push, pull_request] | ||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
env: | ||
GO111MODULE: on | ||
steps: | ||
- name: Checkout Source | ||
uses: actions/checkout@v2 | ||
- name: Run Gosec Security Scanner | ||
uses: securego/gosec@master | ||
with: | ||
args: ./... |
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,38 @@ | ||
name: release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
goreleaser: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
- name: Set up Go | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: 1.13.x | ||
- name: Import GPG key | ||
id: import_gpg | ||
uses: crazy-max/ghaction-import-gpg@v2 | ||
env: | ||
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} | ||
PASSPHRASE: ${{ secrets.PASSPHRASE }} | ||
- uses: actions/cache@v1 | ||
with: | ||
path: ~/go/pkg/mod | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go | ||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v1 | ||
with: | ||
version: latest | ||
args: release --rm-dist | ||
key: ${{ secrets.YOUR_PRIVATE_KEY }} | ||
env: | ||
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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,46 @@ | ||
before: | ||
hooks: | ||
- go mod tidy | ||
builds: | ||
- env: | ||
- CGO_ENABLED=0 | ||
goos: | ||
- openbsd | ||
- solaris | ||
- windows | ||
- linux | ||
- darwin | ||
goarch: | ||
- amd64 | ||
- '386' | ||
- arm | ||
- arm64 | ||
ignore: | ||
- goos: darwin | ||
goarch: '386' | ||
- goos: openbsd | ||
goarch: arm | ||
- goos: openbsd | ||
goarch: arm64 | ||
binary: '{{ .ProjectName }}_v{{ .Version }}' | ||
flags: | | ||
-gcflags="-trimpath=$GOPATH" -asmflags="-trimpath=$GOPATH" | ||
archives: | ||
- format: zip | ||
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}' | ||
checksum: | ||
name_template: '{{ .ProjectName }}_{{ .Version }}_SHA256SUMS' | ||
algorithm: sha256 | ||
signs: | ||
- artifacts: checksum | ||
args: | ||
- "--local-user" | ||
- "BE9710A9C84DA5AA" # Replace this with your GPG signing key ID | ||
- "--output" | ||
- "${signature}" | ||
- "--detach-sign" | ||
- "${artifact}" | ||
release: | ||
draft: true | ||
changelog: | ||
skip: true |
This file was deleted.
Oops, something went wrong.
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
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
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
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
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
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
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
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
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
Oops, something went wrong.