-
Notifications
You must be signed in to change notification settings - Fork 0
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: refactor image publishing to new AWS ORG #97
Open
joelmccoy
wants to merge
16
commits into
main
Choose a base branch
from
publish-to-new-aws-orgs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
fb64081
chore: refactor image publishing to new AWS ORG
joelmccoy 66cd1b2
chore: update rhel ansible stig download
joelmccoy c1165f3
fix: correct os version stigs
joelmccoy 0e6bca4
chore: update install-deps to get latest ansible
joelmccoy d8dee74
try: better pip
joelmccoy ffa2283
try: epel repos instead of pip
joelmccoy f655736
try: pipx
joelmccoy 2137a4c
try: pipx again
joelmccoy 2297912
try: pip3
joelmccoy 01fa082
try: back to pipx
joelmccoy c51dc49
try: python3.12
joelmccoy 2242fff
try: python 3.11
joelmccoy 6bc50d8
try: python3.9
joelmccoy e838d67
chore: revert to base config
joelmccoy 2efd0e5
Merge branch 'main' into publish-to-new-aws-orgs
joelmccoy b5f1af3
chore: clarify comment
joelmccoy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,13 +42,9 @@ tasks: | |
- cmd: | | ||
# Set variables based on whether we are in govcloud or commercial | ||
if [ "$AWS_REGION" = "us-gov-west-1" ]; then | ||
state_bucket="uds-ci-govcloud-us-gov-west-1-tfstate" | ||
vpc_name="uds-ci-govcloud-*" | ||
subnet_name="uds-ci-govcloud-*-public*" | ||
state_bucket="uds-tf-state-20250206161918002400000003" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. note: this is the new state bucket in the govcloud uds-images account |
||
else | ||
state_bucket="uds-aws-ci-commercial-us-west-2-5246-tfstate" | ||
vpc_name="uds-ci-commercial-*" | ||
subnet_name="uds-ci-commercial-*-public*" | ||
state_bucket="uds-tf-state-20250206161747757600000003" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. note: this is the state bucket in the new commercial uds-images account |
||
fi | ||
root_dir=$(pwd) | ||
TEST_AMI_ID=$(jq -r '.builds[-1].artifact_id' ${AWS_DIR}/manifest.json | cut -d ":" -f2) | ||
|
@@ -58,7 +54,7 @@ tasks: | |
-backend-config="bucket=${state_bucket}" \ | ||
-backend-config="key=tfstate/ci/install/${SHA}-packer-${DISTRO}-${RKE2_VERSION}-rke2-startup-script.tfstate" \ | ||
-backend-config="region=${AWS_REGION}" | ||
tofu apply -var="region=${AWS_REGION}" -var="vpc_name=${vpc_name}" -var="subnet_name=${subnet_name}" -var="ami_id=${TEST_AMI_ID}" -var="rke2_version=${RKE2_VERSION}" -var-file="${DISTRO}.tfvars" -auto-approve | ||
tofu apply -var="region=${AWS_REGION}" -var="ami_id=${TEST_AMI_ID}" -var="rke2_version=${RKE2_VERSION}" -var-file="${DISTRO}.tfvars" -auto-approve | ||
source ${root_dir}/${E2E_TEST_DIR}/scripts/get-kubeconfig.sh | ||
shell: | ||
darwin: "bash" | ||
|
@@ -82,18 +78,10 @@ tasks: | |
description: "Destroy test infrastructure" | ||
actions: | ||
- cmd: | | ||
# Set variables based on whether we are in govcloud or commercial | ||
if [ "$AWS_REGION" = "us-gov-west-1" ]; then | ||
vpc_name="uds-ci-govcloud-*" | ||
subnet_name="uds-ci-govcloud-*-public*" | ||
else | ||
vpc_name="uds-ci-commercial-*" | ||
subnet_name="uds-ci-commercial-*-public*" | ||
fi | ||
TEST_AMI_ID=$(jq -r '.builds[-1].artifact_id' ${AWS_DIR}/manifest.json | cut -d ":" -f2) | ||
echo "TEST AMI: ${TEST_AMI_ID}" | ||
cd ${E2E_TEST_DIR}/rke2-cluster | ||
tofu destroy -var="region=${AWS_REGION}" -var="vpc_name=${vpc_name}" -var="subnet_name=${subnet_name}" -var="ami_id=${TEST_AMI_ID}" -var="rke2_version=${RKE2_VERSION}" -var-file="${DISTRO}.tfvars" -auto-approve | ||
tofu destroy -var="region=${AWS_REGION}" -var="ami_id=${TEST_AMI_ID}" -var="rke2_version=${RKE2_VERSION}" -var-file="${DISTRO}.tfvars" -auto-approve | ||
|
||
- name: cleanup-ami | ||
description: "Cleans up snapshots and AMIs previously published" | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note: removing these in favor of just using the default vpc in the uds-images accounts