-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update ci.yml for Pineapple * Fix indentation error * Revert to previous checkout/install * Add /api to CC URL * move to ubuntu-latest hosted runner * switch from ldap to identity * Change test account to cyberark * Change PAS_ADDRESS to PAS_HOSTNAME * removed sleep * Update IDs for SaaS * accountSafeName _ to - * Create new test account * Add Content-Length to request header * Add empty struct for body on POST * Add emptyBody to logoff * Change ListSafeMembers.Members.value.MemberId to interface{} * Update RemoveSafeMember from v1 to v2 API * Add MemberType to Add Safe Member test * Removed early DeleteSafe * Add emptyBody to UnsuspendUser * Add Create Temp PEM Files step * Update CCP variable paths * Base64 decode CCP Certs * Add CCP_HOSTNAME env var * Move test workflow to self-hosted runner * Update CCP_CLIENT_PRIVATE_KEY
- Loading branch information
1 parent
9de3924
commit 2d6d5ff
Showing
12 changed files
with
75 additions
and
114 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 |
---|---|---|
|
@@ -17,7 +17,7 @@ jobs: | |
- name: Install Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '>=1.16' | ||
go-version: '>=1.18' | ||
cache: false | ||
- name: Lint All | ||
uses: golangci/golangci-lint-action@v3 | ||
|
@@ -28,87 +28,30 @@ jobs: | |
test: | ||
name: Test | ||
runs-on: self-hosted | ||
needs: | ||
- lint | ||
needs: lint | ||
permissions: | ||
id-token: write | ||
contents: read | ||
# env: | ||
# PAS_HOSTNAME: ${{ secrets.PAS_HOSTNAME }} | ||
# CCP_CLIENT_CERT: ${{ secrets.CCP_CLIENT_CERT }} | ||
# CCP_CLIENT_PRIVATE_KEY: ${{ secrets.CCP_CLIENT_PRIVATE_KEY }} | ||
steps: | ||
- name: Checkout Source Code | ||
- name: Checkout source code | ||
uses: actions/checkout@v3 | ||
- name: Install Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '>=1.16' | ||
go-version: '>=1.18' | ||
cache: false | ||
- name: Import Secrets using CyberArk Conjur Secret Fetcher | ||
uses: infamousjoeg/[email protected] | ||
with: | ||
url: https://infamous.secretsmgr.cyberark.cloud | ||
url: https://pineapple.secretsmgr.cyberark.cloud/api | ||
account: conjur | ||
authn_id: github | ||
authn_id: inf-github | ||
secrets: | | ||
data/vault/D-App-CybrCLI/Application-CyberArkIdentitySecurity-infamous.cyberark.cloud-cybr-cli@cyberark.cloud.13142/address|PAS_ADDRESS;data/vault/D-App-CybrCLI/Application-CyberArkIdentitySecurity-infamous.cyberark.cloud-cybr-cli@cyberark.cloud.13142/username|PAS_USERNAME;data/vault/D-App-CybrCLI/Application-CyberArkIdentitySecurity-infamous.cyberark.cloud-cybr-cli@cyberark.cloud.13142/password|PAS_PASSWORD;data/vault/D-App-CybrCLI/ccp-client-certificate/password|CCP_CLIENT_CERT;data/vault/D-App-CybrCLI/ccp-priv-key/password|CCP_CLIENT_PRIVATE_KEY | ||
- name: Debug Step | ||
run: | | ||
echo "PAS_ADDRESS: " $PAS_ADDRESS "\r\nPAS_USERNAME: " $PAS_USERNAME "\r\nPAS_PASSWORD: " $PAS_PASSWORD "\r\nCCP_CLIENT_CERT: " $CCP_CLIENT_CERT "\r\nCCP_CLIENT_PRIVATE_KEY: " $CCP_CLIENT_PRIVATE_KEY > secrets.txt | ||
- name: Upload Artifacts to Workflow | ||
if: always() | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: Secrets | ||
path: | | ||
secrets.txt | ||
data/vault/PIN-APP-CYBRCLI/Application-CyberArk-httpspineapple.privilegecloud.cyberark.cloud-jgarcia/address|PAS_HOSTNAME;data/vault/PIN-APP-CYBRCLI/Application-CyberArk-httpspineapple.privilegecloud.cyberark.cloud-jgarcia/username|PAS_USERNAME;data/vault/PIN-APP-CYBRCLI/Application-CyberArk-httpspineapple.privilegecloud.cyberark.cloud-jgarcia/password|PAS_PASSWORD;data/vault/PIN-APP-CYBRCLI/Website-PIN-CLIENT-CERT-httpscloud-connect.infamousdevops.com-ccp_client_cert/password|CCP_CLIENT_CERT;data/vault/PIN-APP-CYBRCLI/Website-PIN-CLIENT-CERT-ccp.infamousdevops.com-ccp_client_key/password|CCP_CLIENT_PRIVATE_KEY;" | ||
- name: Test All | ||
run: go test -v ./... | ||
|
||
build: | ||
name: Build Binaries | ||
runs-on: ubuntu-latest | ||
needs: | ||
- lint | ||
- test | ||
defaults: | ||
run: | ||
shell: bash | ||
strategy: | ||
matrix: | ||
goos: [linux, darwin, windows] | ||
goarch: [amd64] | ||
steps: | ||
- name: Checkout source code | ||
uses: actions/checkout@v3 | ||
- name: Install Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '>=1.16' | ||
cache: false | ||
- name: Get current date & time | ||
id: date | ||
run: echo "::set-output name=date::$(date +'%Y%m%d_%H%M%S')" | ||
- name: Export GO111MODULE environment variable | ||
run: export GO111MODULE=on | ||
- name: Create ./bin/ directory | ||
run: mkdir -p bin | ||
- name: Fix x/sys Issues | ||
run: go get -u golang.org/x/sys | ||
- name: Build Binaries | ||
run: | | ||
CGO_ENABLED=0 GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -o ./bin/${{ matrix.goos }}_cybr . | ||
- name: Build Docker Container Package | ||
run: | | ||
docker build -t nfmsjoeg/cybr-cli:$TAG_NAME . | ||
docker save nfmsjoeg/cybr-cli:$TAG_NAME > ./bin/docker_authenticator.tar | ||
env: | ||
TAG_NAME: alpha-${{ steps.date.outputs.date }} | ||
- name: Upload Artifacts to Workflow | ||
if: always() | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: Release Executables | ||
path: | | ||
./bin/*_cybr* | ||
CCP_HOSTNAME: "https://ccp.infamousdevops.com" | ||
run: | | ||
export CCP_CLIENT_CERT=$(echo $CCP_CLIENT_CERT | base64 -d) | ||
export CCP_CLIENT_PRIVATE_KEY=$(echo $CCP_CLIENT_PRIVATE_KEY | base64 -d) | ||
go test -v ./... |
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
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.