ci: disabling

This commit is contained in:
Radostin Emanuilov 2024-08-11 10:31:31 +00:00 committed by Radostin Emanuilov
parent f92dd63263
commit 02105bf700
2 changed files with 44 additions and 41 deletions

View File

@ -1,45 +1,47 @@
default: # default:
image: $CONTAINER_REGISTRY_DOMAIN_WITH_ORG/gitlab-runner-image # image: $CONTAINER_REGISTRY_DOMAIN_WITH_ORG/gitlab-runner-image
variables: # variables:
VM_DISK_OUTPUT_DIR: "/rockyDisks" # VM_DISK_OUTPUT_DIR: "/rockyDisks"
SECURE_FILES_DOWNLOAD_PATH: "/secureFiles" # SECURE_FILES_DOWNLOAD_PATH: "/secureFiles"
stages: # stages:
- build # - build
- build-push # - build-push
build-builder-vm-disk: # build-builder-vm-disk:
stage: build # stage: build
rules: # rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event" # - if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH
changes: # changes:
- scripts/utils/**/* # - scripts/utils/**/*
- scripts/setupBuilder/**/* # - scripts/setupBuilder/**/*
artifacts: # - .gitlab-ci.yml
paths: # artifacts:
- /rockyDisks # paths:
variables: # - /rockyDisks
# Values should match the ones in .devcontainer/.env # variables:
ROCKY_VERSION: "9.4" # # Values should match the ones in .devcontainer/.env
VM_DISK_FILE_TO_DOWNLOAD: "Rocky-9-GenericCloud-Base-9.4-20240609.0.x86_64.qcow2" # ROCKY_VERSION: "9.4"
BASE_DISK_FILEPATH: "$VM_DISK_OUTPUT_DIR/$VM_DISK_FILE_TO_DOWNLOAD" # VM_DISK_FILE_TO_DOWNLOAD: "Rocky-9-GenericCloud-Base-9.4-20240609.0.x86_64.qcow2"
OUTPUT_FILE_PATH: "$VM_DISK_OUTPUT_DIR/$VM_DISK_FILE_TO_DOWNLOAD-$CI_COMMIT_SHA" # BASE_DISK_FILEPATH: "$VM_DISK_OUTPUT_DIR/$VM_DISK_FILE_TO_DOWNLOAD"
script: # OUTPUT_FILE_PATH: "$VM_DISK_OUTPUT_DIR/$VM_DISK_FILE_TO_DOWNLOAD-$CI_COMMIT_SHA"
- ./scripts/setupBuilder/main.sh # 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 # # 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 # # The VM is needed due to the bootc build process requiring a full Rocky host to be used for it
build-push-base-image: # build-push-base-image:
stage: build-push # stage: build-push
rules: # rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event" # - if: $CI_PIPELINE_SOURCE == "push" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH
changes: # changes:
- scripts/utils/**/* # - scripts/utils/**/*
- scripts/setupBuilder/**/* # - scripts/setupBuilder/**/*
- scripts/buildPushBootcContainerImage/**/* # - scripts/buildPushBootcContainerImage/**/*
variables: # - .gitlab-ci.yml
OUTPUT_BOOTC_IMAGE_NAME: "rocky9-bootc:$CI_COMMIT_SHA" # variables:
OUTPUT_BOOTC_IMAGE_NAME_LATEST: "rocky9-bootc:latest" # OUTPUT_BOOTC_IMAGE_NAME: "rocky9-bootc:$CI_COMMIT_SHA"
script: # OUTPUT_BOOTC_IMAGE_NAME_LATEST: "rocky9-bootc:latest"
- ./scripts/buildPushBootcContainerImage/main.sh # script:
# - ./scripts/buildPushBootcContainerImage/main.sh

View File

@ -5,6 +5,7 @@ if [ -n "$CI" ]; then
mkdir $SECURE_FILES_DOWNLOAD_PATH mkdir $SECURE_FILES_DOWNLOAD_PATH
echo $BUILDER_PUBLIC_KEY > $SECURE_FILES_DOWNLOAD_PATH/id_ed25519.pub echo $BUILDER_PUBLIC_KEY > $SECURE_FILES_DOWNLOAD_PATH/id_ed25519.pub
echo $BUILDER_PRIVATE_KEY > $SECURE_FILES_DOWNLOAD_PATH/id_ed25519 echo $BUILDER_PRIVATE_KEY > $SECURE_FILES_DOWNLOAD_PATH/id_ed25519
chmod -R 600 $SECURE_FILES_DOWNLOAD_PATH
fi fi
eval "$(ssh-agent -s)" eval "$(ssh-agent -s)"