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

feat: add gitlab role to enable GitLab CI/CD #29

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jackhodgkiss
Copy link
Collaborator

Add a new role gitlab to enable GitLab CI/CD for use in constructing a CI/CD pipeline that is compatible with kayobe-automation.

Supports key features and workflows found within the GitHub role.

@jackhodgkiss jackhodgkiss added the enhancement New feature or request label Jan 16, 2025
@jackhodgkiss jackhodgkiss self-assigned this Jan 16, 2025
@jackhodgkiss jackhodgkiss force-pushed the add-gitlab-role branch 5 times, most recently from 9446cfb to ca2d6d9 Compare January 20, 2025 19:44
@jackhodgkiss jackhodgkiss marked this pull request as ready for review January 21, 2025 15:57
@jackhodgkiss jackhodgkiss requested a review from a team as a code owner January 21, 2025 15:57
Copy link
Member

@Alex-Welsh Alex-Welsh left a comment

Choose a reason for hiding this comment

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

A few nitpicks on the readme but otherwise LGTM

roles/gitlab/README.md Outdated Show resolved Hide resolved
roles/gitlab/README.md Show resolved Hide resolved
roles/gitlab/README.md Outdated Show resolved Hide resolved
roles/gitlab/README.md Show resolved Hide resolved
Add a new role `gitlab` to enable GitLab CI/CD for use in constructing
a CI/CD pipeline that is compatible with `kayobe-automation`.

Supports key features and workflows found within the `GitHub` role.
when: always
parallel:
matrix:
- KAYOBE_ENVIRONMENT: [production, test]
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
- KAYOBE_ENVIRONMENT: [production, test]
- KAYOBE_ENVIRONMENT: {{ gitlab_kayobe_environments }}

- !reference [.active_stage_web_rule_no_manual, rules]
stage: runbook-in-place-hypervisor-host-upgrade
resource_group: runbook-in-place-hypervisor-host-upgrade
needs: [disable_compute_services]
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
needs: [disable_compute_services]
needs: [a_disable_compute_services]

rules:
- !reference [.active_stage_web_rule_no_manual, rules]
stage: runbook-overcloud-service-upgrade
resource_group: runbook-overcloud-service-upgrade
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
resource_group: runbook-overcloud-service-upgrade
resource_group: runbook-in-place-hypervisor-host-upgrade

Comment on lines +84 to +88
- >-
export BAO_TOKEN=$(curl --silent --request POST
--data '{"role": "gitlab", "jwt": "'"$VAULT_AUTH_TOKEN"'"}'
http://127.0.0.1:8200/v1/auth/jwt/login | jq -r '.auth.client_token')

Copy link
Member

@Alex-Welsh Alex-Welsh Feb 7, 2025

Choose a reason for hiding this comment

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

Required on my system (rocky 9, antelope, enterprise GL)

Suggested change
- >-
export BAO_TOKEN=$(curl --silent --request POST
--data '{"role": "gitlab", "jwt": "'"$VAULT_AUTH_TOKEN"'"}'
http://127.0.0.1:8200/v1/auth/jwt/login | jq -r '.auth.client_token')
- >-
export BAO_TOKEN=$(curl --silent --request POST
--data '{"role": "gitlab", "jwt": "'"$VAULT_AUTH_TOKEN"'"}'
http://127.0.0.1:8200/v1/auth/jwt/login | jq -r '.auth.client_token')
- mkdir -p $HOME/.docker
- echo $DOCKER_AUTH_CONFIG > $HOME/.docker/config.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants