diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c16d688b..d48765ff 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -55,6 +55,8 @@ test_build: resource_group: test # when: manual +# Actual release -- triggered by pushing a new version tag + release_job: stage: release image: registry.gitlab.com/gitlab-org/release-cli:latest @@ -177,3 +179,143 @@ delete_build_machines: - bash scripts/cicd/build-orchestration/build-machine-ctrl.sh delete amd64-rpm rules: - if: '$CI_COMMIT_TAG =~ /v\d.+/' + +# Dryrun release -- triggered by changes in .gitlab-ci.yml or CICD scripts + +dryrun_create_build_machines: + stage: build_packages + tags: + - build-orchestration + script: + - bash scripts/cicd/build-orchestration/build-machine-ctrl.sh create amd64-deb + - bash scripts/cicd/build-orchestration/build-machine-ctrl.sh create arm64-deb + - bash scripts/cicd/build-orchestration/build-machine-ctrl.sh create amd64-rpm + rules: + - if: $CI_PIPELINE_SOURCE == "push" + changes: + - .gitlab-ci.yml + - scripts/cicd/**/* + +dryrun_package_amd64_deb: + stage: build_packages + needs: + - dryrun_create_build_machines + tags: + - build-amd64-deb + script: + - earthly bootstrap + - earthly +package-linux-amd64-deb + - bash scripts/cicd/build-machine/scp-to-orchestrator.sh + rules: + - if: $CI_PIPELINE_SOURCE == "push" + changes: + - .gitlab-ci.yml + - scripts/cicd/**/* + +dryrun_package_arm64_deb: + stage: build_packages + needs: + - dryrun_create_build_machines + tags: + - build-arm64-deb + script: + - earthly bootstrap + - earthly +package-linux-arm64-deb + - bash scripts/cicd/build-machine/scp-to-orchestrator.sh + rules: + - if: $CI_PIPELINE_SOURCE == "push" + changes: + - .gitlab-ci.yml + - scripts/cicd/**/* + +dryrun_package_amd64_rpm: + stage: build_packages + needs: + - dryrun_create_build_machines + tags: + - build-amd64-rpm + script: + - earthly bootstrap + - earthly +package-linux-amd64-rpm + - bash scripts/cicd/build-machine/scp-to-orchestrator.sh + rules: + - if: $CI_PIPELINE_SOURCE == "push" + changes: + - .gitlab-ci.yml + - scripts/cicd/**/* + +dryrun_publish_crates: + stage: build_packages + needs: + - dryrun_create_build_machines + tags: + - build-amd64-deb + script: + - vlt login + - vlt run --command="cargo publish -p veilid-tools --dry-run" + - vlt run --command="cargo publish -p veilid-core --dry-run" + rules: + - if: $CI_PIPELINE_SOURCE == "push" + changes: + - .gitlab-ci.yml + - scripts/cicd/**/* + +dryrun_publish_python: + stage: build_packages + needs: + - dryrun_create_build_machines + tags: + - build-amd64-deb + script: + - vlt login + - cd veilid-python && /home/gitlab-runner/.local/bin/poetry build + rules: + - if: $CI_PIPELINE_SOURCE == "push" + changes: + - .gitlab-ci.yml + - scripts/cicd/**/* + +dryrun_build_repositories: + stage: distribute + tags: + - build-orchestration + variables: + SECURE_FILES_DOWNLOAD_PATH: './' + script: + - cp scripts/cicd/build-orchestration/generate-release.sh ~ + - bash scripts/cicd/build-orchestration/distribute-packages.sh + rules: + - if: $CI_PIPELINE_SOURCE == "push" + changes: + - .gitlab-ci.yml + - scripts/cicd/**/* + +dryrun_deploy_repos: + stage: distribute + needs: + - dryrun_build_repositories + tags: + - repo-server + script: + - ls -al repo.tar + rules: + - if: $CI_PIPELINE_SOURCE == "push" + changes: + - .gitlab-ci.yml + - scripts/cicd/**/* + +dryrun_delete_build_machines: + stage: distribute + needs: + - dryrun_deploy_repos + tags: + - build-orchestration + script: + - bash scripts/cicd/build-orchestration/build-machine-ctrl.sh delete amd64-deb + - bash scripts/cicd/build-orchestration/build-machine-ctrl.sh delete arm64-deb + - bash scripts/cicd/build-orchestration/build-machine-ctrl.sh delete amd64-rpm + rules: + - if: $CI_PIPELINE_SOURCE == "push" + changes: + - .gitlab-ci.yml + - scripts/cicd/**/* \ No newline at end of file