Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PrivateStorageio
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
PrivateStorage
PrivateStorageio
Commits
5771f504
Commit
5771f504
authored
Jul 14, 2022
by
Jean-Paul Calderone
Browse files
Options
Downloads
Patches
Plain Diff
Forget about assignee for a minute and try to generate the body
parent
5db35a12
No related branches found
No related tags found
3 merge requests
!319
update production
,
!311
bump nixpkgs version
,
!305
Automate updating nixpkgs pin in develop branch once a week
Pipeline
#2343
failed
Jul 14, 2022
Stage: test
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
ci-tools/update-nixpkgs
+16
-15
16 additions, 15 deletions
ci-tools/update-nixpkgs
with
16 additions
and
15 deletions
ci-tools/update-nixpkgs
+
16
−
15
View file @
5771f504
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p nixUnstable git openssh curl
#!nix-shell -i bash -p nixUnstable git openssh curl
python3
# ^^
# we get nixUnstable for the diff-closures command, mostly.
...
...
@@ -58,21 +58,22 @@ if git diff --exit-code origin/develop...; then
fi
# nix-build -A morph -o result-after
# diff=$(nix --extra-experimental-features nix-command store diff-closures ./result-before/ ./result-after/)
# DIFF=$(nix --extra-experimental-features nix-command store diff-closures ./result-before/ ./result-after/)
DIFF="Hello world"
git commit -am "bump nixpkgs version"
git push --force origin "${TARGET_BRANCH}:${TARGET_BRANCH}"
BODY=$(
cat <<EOF
{
"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"
}
EOF
)
curl -X POST --data "${BODY}" --header "Content-Type: application/json" --header "PRIVATE-TOKEN: ${UPDATE_NIXPKGS_PRIVATE_TOKEN}" "https://${HOST}/api/v4/projects/${CI_PROJECT_ID}/merge_requests"
BODY=$(
python3 -c '
import os, sys, json
print(json.dumps({
"
id": os.environ["CI_PROJECT_ID"]
,
"
source
_branch":
os.environ["CI_COMMIT_REF_NAME"]
,
"
target_branch": os.environ["TARGET_BRANCH"]
,
"
remove_source_branch": True
,
"
title": f"WIP: {os.environ["CI_COMMIT_REF_NAME"]}",
"description": sys.argv[1],
}))
' "${DIFF}"
)
echo
curl -X POST --data "${BODY}" --header "Content-Type: application/json" --header "PRIVATE-TOKEN: ${UPDATE_NIXPKGS_PRIVATE_TOKEN}" "https://${HOST}/api/v4/projects/${CI_PROJECT_ID}/merge_requests"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment