Skip to content
Snippets Groups Projects
Commit fc3b496f authored by Jean-Paul Calderone's avatar Jean-Paul Calderone
Browse files

Start a tool to automatically create MRs

parent 95fc94f0
Branches
No related tags found
3 merge requests!319update production,!311bump nixpkgs version,!305Automate updating nixpkgs pin in develop branch once a week
......@@ -162,5 +162,4 @@ deploy-to-production:
update-nixpkgs:
<<: *RUN_ON_SCHEDULE
script:
- |
echo "Updating nixpkgs!"
- "./ci-tools/update-nixpkgs"
#!/usr/bin/env nix-shell
#!nix-shell -i sh -p nixUnstable git curl
set -eux -o pipefail
TARGET_BRANCH="nixpkgs-upgrade-$(date +%Y-%m-%d)"
git checkout -b "${TARGET_BRANCH}"
nix-build -A morph -o result-before
update-nixpkgs
nix-build -A morph -o result-after
diff=$(nix --extra-experimental-features nix-command store diff-closures ./result-before/ ./result-after/)
git commit -am "bump nixpkgs version"
git push origin
BODY="{
\"id\": ${CI_PROJECT_ID},
\"source_branch\": \"${CI_COMMIT_REF_NAME}\",
\"target_branch\": \"${TARGET_BRANCH}\",
\"remove_source_branch\": true,
\"title\": \"WIP: ${CI_COMMIT_REF_NAME}\",
\"assignee_id\":\"jcalderone"
}";
curl -X POST --data "${BODY}" --header "Content-Type: application/json" --header "PRIVATE-TOKEN: ${UPDATE_NIXPKGS_PRIVATE_TOKEN}" "${HOST}/api/v4/projects/merge_requests"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment