Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): adopt METAL_AUTH_TOKEN to align with other tools #201

Merged
merged 1 commit into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/integration-tests-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,6 @@ jobs:
- name: run tests
run: make testall
env:
METAL_API_TOKEN: ${{ secrets.METAL_API_TOKEN }}
METAL_AUTH_TOKEN: ${{ secrets.METAL_AUTH_TOKEN }}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that this change won't take effect until the PR is merged. I'll kick off a manual run of the other test workflow to validate the change.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Orrrr not...the integration test workflow only has a push trigger on main, so we'll have to take this change on faith.

ANSIBLE_ACC_METAL_DEDICATED_CONNECTION_ID: ${{ secrets.ANSIBLE_ACC_METAL_DEDICATED_CONNECTION_ID }}

3 changes: 1 addition & 2 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ jobs:
defaults:
run:
working-directory: .ansible/collections/ansible_collections/equinix/cloud
environment: 'METAL_API_TOKEN'
steps:
- name: checkout repo
uses: actions/checkout@v3
Expand Down Expand Up @@ -50,5 +49,5 @@ jobs:
- name: run tests
run: make testall
env:
METAL_API_TOKEN: ${{ secrets.METAL_API_TOKEN }}
METAL_AUTH_TOKEN: ${{ secrets.METAL_AUTH_TOKEN }}
ANSIBLE_ACC_METAL_DEDICATED_CONNECTION_ID: ${{ secrets.ANSIBLE_ACC_METAL_DEDICATED_CONNECTION_ID }}
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ integration-test: create-integration-config
ansible-test integration $(TEST_ARGS)

create-integration-config:
ifneq ("${METAL_API_TOKEN}", "")
@echo "metal_api_token: ${METAL_API_TOKEN}" > $(INTEGRATION_CONFIG);
ifneq ("${METAL_AUTH_TOKEN}", "")
@echo "metal_api_token: ${METAL_AUTH_TOKEN}" > $(INTEGRATION_CONFIG);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is CI-only, so the metal_api_token module parameter has not been renamed. Renaming that parameter--as well as deprecating and removing the METAL_API_TOKEN env var--is a bigger change with limited benefit at the moment.

else
echo "METAL_API_TOKEN must be set"; \
echo "METAL_AUTH_TOKEN must be set"; \
exit 1;
endif
echo "metal_ua_prefix: E2E" >> $(INTEGRATION_CONFIG)
Expand Down
Loading