-
Notifications
You must be signed in to change notification settings - Fork 526
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* github-actions: use ec github secret * vault free * typo (cherry picked from commit 9cc9984) Co-authored-by: Victor Martinez <[email protected]>
- Loading branch information
1 parent
49c0478
commit 4706bff
Showing
5 changed files
with
31 additions
and
65 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 |
---|---|---|
|
@@ -49,6 +49,10 @@ jobs: | |
GOBENCH_PASSWORD: ${{ secrets.GOBENCH_PASSWORD }} | ||
GOBENCH_USERNAME: ${{ secrets.GOBENCH_USERNAME }} | ||
GOBENCH_HOST: ${{ secrets.GOBENCH_HOST }} | ||
# TODO: use keyless | ||
EC_API_KEY: ${{ secrets.OBSERVABILITY_EC_API_KEY }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.OBSERVABILITY_AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.OBSERVABILITY_AWS_SECRET_ACCESS_KEY }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
|
@@ -73,20 +77,6 @@ jobs: | |
echo "BENCHMARK_RUN=${{ inputs.benchmarkRun }}" >> "$GITHUB_ENV" | ||
fi | ||
- uses: hashicorp/[email protected] | ||
env: | ||
AWS_CREDENTIALS_PATH: secret/observability-team/ci/elastic-observability-aws-account-auth | ||
EC_CREDENTIALS_PATH: secret/observability-team/ci/elastic-cloud/observability-team-pro | ||
with: | ||
url: ${{ secrets.VAULT_ADDR }} | ||
roleId: ${{ secrets.VAULT_ROLE_ID }} | ||
secretId: ${{ secrets.VAULT_SECRET_ID }} | ||
method: approle | ||
secrets: | | ||
${{ env.AWS_CREDENTIALS_PATH }} access_key | AWS_ACCESS_KEY_ID ; | ||
${{ env.AWS_CREDENTIALS_PATH }} secret_key | AWS_SECRET_ACCESS_KEY ; | ||
${{ env.EC_CREDENTIALS_PATH }} apiKey | EC_API_KEY ; | ||
- name: Log in to the Elastic Container registry | ||
uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3.2.0 | ||
with: | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,23 +4,12 @@ name: setup-cluster-env | |
description: Setup cluster env | ||
|
||
inputs: | ||
vault-url: | ||
description: 'Vault URL' | ||
aws-csv-file: | ||
description: 'Content with the AWS csv file' | ||
required: true | ||
vault-role-id: | ||
description: 'Vault role ID' | ||
aws-profile: | ||
description: 'aws profile' | ||
required: true | ||
vault-secret-id: | ||
description: 'Vault secret ID' | ||
required: true | ||
ec-key-secret: | ||
default: 'secret/observability-team/ci/elastic-cloud/observability-team-pro' | ||
description: 'EC Key secret' | ||
required: false | ||
aws-account-secret: | ||
default: 'secret/observability-team/ci/elastic-observability-aws-account-auth' | ||
description: 'AWS account secret' | ||
required: false | ||
|
||
runs: | ||
using: "composite" | ||
|
@@ -31,16 +20,6 @@ runs: | |
cache-dependency-path: | | ||
go.sum | ||
tools/go.sum | ||
- uses: hashicorp/[email protected] | ||
with: | ||
url: ${{ inputs.vault-url }} | ||
roleId: ${{ inputs.vault-role-id }} | ||
secretId: ${{ inputs.vault-secret-id }} | ||
method: approle | ||
secrets: | | ||
${{ inputs.ec-key-secret }} apiKey | EC_API_KEY ; | ||
${{ inputs.aws-account-secret }} user | AWS_PROFILE ; | ||
${{ inputs.aws-account-secret }} csv | AWS_ACCOUNT_IMPORT | ||
- name: Configure AWS account | ||
run: | | ||
echo "${AWS_ACCOUNT_IMPORT}" > ${{ runner.temp }}/account.csv; | ||
|
@@ -49,3 +28,6 @@ runs: | |
echo 'AWS_ACCOUNT_IMPORT=' >> ${GITHUB_ENV}; | ||
rm -f ${{ runner.temp }}/account.csv; | ||
shell: 'bash' | ||
env: | ||
AWS_ACCOUNT_IMPORT: ${{ inputs.aws-csv-file }} | ||
AWS_PROFILE: ${{ inputs.aws-profile }} |
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