diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d3209fa..afdf668 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,45 +1,47 @@ -default: - image: $CONTAINER_REGISTRY_DOMAIN_WITH_ORG/gitlab-runner-image +# default: +# image: $CONTAINER_REGISTRY_DOMAIN_WITH_ORG/gitlab-runner-image -variables: - VM_DISK_OUTPUT_DIR: "/rockyDisks" - SECURE_FILES_DOWNLOAD_PATH: "/secureFiles" +# variables: +# VM_DISK_OUTPUT_DIR: "/rockyDisks" +# SECURE_FILES_DOWNLOAD_PATH: "/secureFiles" -stages: - - build - - build-push +# stages: +# - build +# - build-push -build-builder-vm-disk: - stage: build - rules: - - if: $CI_PIPELINE_SOURCE == "merge_request_event" - changes: - - scripts/utils/**/* - - scripts/setupBuilder/**/* - artifacts: - paths: - - /rockyDisks - variables: - # Values should match the ones in .devcontainer/.env - ROCKY_VERSION: "9.4" - VM_DISK_FILE_TO_DOWNLOAD: "Rocky-9-GenericCloud-Base-9.4-20240609.0.x86_64.qcow2" - BASE_DISK_FILEPATH: "$VM_DISK_OUTPUT_DIR/$VM_DISK_FILE_TO_DOWNLOAD" - OUTPUT_FILE_PATH: "$VM_DISK_OUTPUT_DIR/$VM_DISK_FILE_TO_DOWNLOAD-$CI_COMMIT_SHA" - script: - - ./scripts/setupBuilder/main.sh +# build-builder-vm-disk: +# stage: build +# rules: +# - if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH +# changes: +# - scripts/utils/**/* +# - scripts/setupBuilder/**/* +# - .gitlab-ci.yml +# artifacts: +# paths: +# - /rockyDisks +# variables: +# # Values should match the ones in .devcontainer/.env +# ROCKY_VERSION: "9.4" +# VM_DISK_FILE_TO_DOWNLOAD: "Rocky-9-GenericCloud-Base-9.4-20240609.0.x86_64.qcow2" +# BASE_DISK_FILEPATH: "$VM_DISK_OUTPUT_DIR/$VM_DISK_FILE_TO_DOWNLOAD" +# OUTPUT_FILE_PATH: "$VM_DISK_OUTPUT_DIR/$VM_DISK_FILE_TO_DOWNLOAD-$CI_COMMIT_SHA" +# script: +# - ./scripts/setupBuilder/main.sh -# This job is NOT using the host's Docker, but the one within the VM that is generated from the job above -# The VM is needed due to the bootc build process requiring a full Rocky host to be used for it -build-push-base-image: - stage: build-push - rules: - - if: $CI_PIPELINE_SOURCE == "merge_request_event" - changes: - - scripts/utils/**/* - - scripts/setupBuilder/**/* - - scripts/buildPushBootcContainerImage/**/* - variables: - OUTPUT_BOOTC_IMAGE_NAME: "rocky9-bootc:$CI_COMMIT_SHA" - OUTPUT_BOOTC_IMAGE_NAME_LATEST: "rocky9-bootc:latest" - script: - - ./scripts/buildPushBootcContainerImage/main.sh \ No newline at end of file +# # This job is NOT using the host's Docker, but the one within the VM that is generated from the job above +# # The VM is needed due to the bootc build process requiring a full Rocky host to be used for it +# build-push-base-image: +# stage: build-push +# rules: +# - if: $CI_PIPELINE_SOURCE == "push" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH +# changes: +# - scripts/utils/**/* +# - scripts/setupBuilder/**/* +# - scripts/buildPushBootcContainerImage/**/* +# - .gitlab-ci.yml +# variables: +# OUTPUT_BOOTC_IMAGE_NAME: "rocky9-bootc:$CI_COMMIT_SHA" +# OUTPUT_BOOTC_IMAGE_NAME_LATEST: "rocky9-bootc:latest" +# script: +# - ./scripts/buildPushBootcContainerImage/main.sh \ No newline at end of file diff --git a/scripts/utils/initSSHclient.sh b/scripts/utils/initSSHclient.sh index c602a30..fb300aa 100644 --- a/scripts/utils/initSSHclient.sh +++ b/scripts/utils/initSSHclient.sh @@ -5,6 +5,7 @@ if [ -n "$CI" ]; then mkdir $SECURE_FILES_DOWNLOAD_PATH echo $BUILDER_PUBLIC_KEY > $SECURE_FILES_DOWNLOAD_PATH/id_ed25519.pub echo $BUILDER_PRIVATE_KEY > $SECURE_FILES_DOWNLOAD_PATH/id_ed25519 + chmod -R 600 $SECURE_FILES_DOWNLOAD_PATH fi eval "$(ssh-agent -s)"