taskrun.yaml 931 B

12345678910111213141516171819202122232425262728293031
  1. apiVersion: tekton.dev/v1beta1
  2. kind: TaskRun
  3. metadata:
  4. name: execute-in-vm-with-ssh-taskrun-clean
  5. spec:
  6. serviceAccountName: execute-in-vm-task
  7. taskRef:
  8. kind: ClusterTask
  9. name: execute-in-vm
  10. params:
  11. - name: vmName
  12. value: vm-guix-datavolume
  13. - name: secretName
  14. value: ssh-secret
  15. - name: script
  16. value: |
  17. #!/usr/bin/env bash
  18. set -o nounset -o errexit -o pipefail -o xtrace
  19. mkdir -p "${HOME}/.local/share"
  20. guix install git
  21. if [[ -e "${HOME}/.local/share/chezmoi" ]]
  22. then
  23. :
  24. else
  25. git clone https://gitlab.com/wigust/dotfiles "${HOME}/.local/share/chezmoi"
  26. fi
  27. cd "${HOME}/.local/share/chezmoi" || exit 1
  28. git pull --rebase origin master
  29. sudo -i guix pull --channels="${PWD}/dotfiles/channels-current-local-file.scm"
  30. sudo -i guix system reconfigure --allow-downgrades "${PWD}/dotfiles/guixsd/vm-guix-datavolume.scm"