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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
PrivateStorage
PrivateStorageio
Commits
6b616186
Commit
6b616186
authored
2 years ago
by
Jean-Paul Calderone
Browse files
Options
Downloads
Patches
Plain Diff
Consume the newly available secrets that let us push and stuff
parent
ab3c76c2
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
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
ci-tools/update-nixpkgs
+28
-1
28 additions, 1 deletion
ci-tools/update-nixpkgs
with
28 additions
and
1 deletion
ci-tools/update-nixpkgs
+
28
−
1
View file @
6b616186
#!/usr/bin/env nix-shell
#!/usr/bin/env nix-shell
#!nix-shell -i sh -p nixUnstable git curl
#!nix-shell -i sh -p nixUnstable git openssh curl
# ^^
# we get nixUnstable for the diff-closures command, mostly.
# we need git to commit and push our changes
# we need openssh for ssh-agent to authenticate the push
# we need curl to create the gitlab MR
set -eux -o pipefail
set -eux -o pipefail
setup_ssh() {
# -s makes the output sh compatible, in case it can't detect this for
# itself.
eval $(ssh-agent -s)
# A GitLab CI/CD variable set for us to use.
ssh-add <(echo "${UPDATE_NIXPKGS_PRIVATE_SSHKEY_BASE64}" | base64 -d)
# We may not know the git/ssh server's host key yet. In that case, learn
# it and proceed.
export GIT_SSH_COMMAND="ssh -o StrictHostKeyChecking=accept-new"
}
setup_git() {
git config --global user.email "update-bot@private.storage"
git config --global user.name "Update Bot"
}
setup_ssh()
setup_git()
TARGET_BRANCH="nixpkgs-upgrade-$(date +%Y-%m-%d)"
TARGET_BRANCH="nixpkgs-upgrade-$(date +%Y-%m-%d)"
echo '{}' > morph/grid/local/public-keys/users.nix
echo '{}' > morph/grid/local/public-keys/users.nix
...
...
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