Skip to content

feature(git-actions): new action to test hydra on macos #9596

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

Closed
wants to merge 2 commits into from
Closed
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
17 changes: 17 additions & 0 deletions .github/workflows/test-hydra-macos.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
on:
pull_request:
branches:
- master
jobs:
test:
runs-on: macos-13
env:
AWS_ACCESS_KEY_ID: ${{ secrets.QA_USER_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.QA_USER_AWS_SECRET_ACCESS_KEY }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Docker
uses: douglascamata/setup-docker-macos-action@v1-alpha
- name: Run Hydra
run: bash -x ./docker/env/hydra.sh list-images
4 changes: 2 additions & 2 deletions docker/env/hydra.sh
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ if [[ -n "${CREATE_RUNNER_INSTANCE}" ]]; then
fi

# if running on Build server
if [[ ${USER} == "jenkins" ]]; then
if [[ ${USER} == "jenkins" || ${USER} == "runner" ]]; then
echo "Running on Build Server..."
HOST_NAME=`hostname`
else
Expand All @@ -173,7 +173,7 @@ else
die "Please make sure you install either podman or docker on this machine to run hydra"
fi

if [[ ${USER} == "jenkins" || -z "`$tool images ${DOCKER_REPO}:${VERSION} -q`" ]]; then
if [[ ${USER} == "jenkins" || ${USER} == "runner" || -z "`$tool images ${DOCKER_REPO}:${VERSION} -q`" ]]; then
echo "Pull version $VERSION from Docker Hub..."
$tool pull ${DOCKER_REGISTRY}/${DOCKER_REPO}:${VERSION}
else
Expand Down
1 change: 1 addition & 0 deletions sdcm/utils/aws_okta.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ def can_get_to_aws_account():
assert response['Account'] == account_id
LOGGER.info("logged in as %s", response['Arn'])
except (NoCredentialsError, AssertionError):
LOGGER.exception("failed")
return False
return True

Expand Down
2 changes: 1 addition & 1 deletion sdcm/utils/get_username.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def get_username() -> str: # pylint: disable=too-many-return-statements # noqa
return user_id

current_linux_user = getpass.getuser()
if current_linux_user == "jenkins":
if current_linux_user in ["jenkins", "runner"]:
return current_linux_user
if current_linux_user == "ubuntu":
return "sct-runner"
Expand Down
Loading