• mesa@piefed.social
      link
      fedilink
      English
      arrow-up
      3
      ·
      8 days ago

      Circleci, Travis, and gitlab all allow you to ssh into the box you are trying your scripts on and fix it there. Much easier and takes a lot less time. Github actions have an unofficial way of doing it and is…not the best. Actions is actually one of the worst CIs I’m my experience.

      • azertyfun@sh.itjust.works
        link
        fedilink
        arrow-up
        0
        ·
        8 days ago

        For gitlab this is only correct with a shell executor which is to be avoided in the general case in favor of a docker or k8s executor for isolation&repeatability.

        Those you can actually run locally with gitlab-runner, but then you won’t have all your gitlab instance’s CI variables so it’s a PITA if you need a CI token which you probably do if you actually make decent use of gitlab’s features.

        In most cases I just end up committing my changes to avoid the headache. :!git commit --amend --no-edit && git push -f goes pretty dang fast and 60 % of the time third time’s the charm.

        • mesa@piefed.social
          link
          fedilink
          English
          arrow-up
          0
          ·
          8 days ago

          Why avoid the shell executor on docker? I did 4years of gitlab back a bit ago. It was super simple. But I haven’t kept up since work maintains actions and Travis. And there’s a way nowadays to inject the env or pull from a secret server-ish.

          All ci is basically the same. Or at least for a while.

          • azertyfun@sh.itjust.works
            link
            fedilink
            arrow-up
            0
            ·
            8 days ago

            Ideally you’d use the docker executor with a dind service instead of docker commands in the shell. You’ll have better isolation (e.g. no conflicts from open port forwards) and better forward-compatibility (the pipeline won’t break every time a major upgrade is applied to the runner because the docker - especially compose - CLI is unstable).

      • NotSteve_@piefed.ca
        link
        fedilink
        English
        arrow-up
        1
        ·
        8 days ago

        I’ve spent so much time trying to get act working well enough that it’s easier to use than pushing to remote but it gets really difficult when you involve things like AWS services (especially when the tokens to push to ECR aren’t available to me as a lowly dev). Localstack can help but the container registry functionality is locked behind the paid version

  • pivot_root@lemmy.world
    link
    fedilink
    arrow-up
    5
    ·
    8 days ago

    Solution:

    git commit --amend
    git push --force
    

    Problem:

    The process of discovering best practices on how to keep a clean git history is a goddamned challenge.

      • pivot_root@lemmy.world
        link
        fedilink
        arrow-up
        2
        ·
        8 days ago

        I didn’t want to make it sound too scary 😉

        Seriously, though, git really needs an option to treat --force as --force-with-lease. In the exceedingly rare occasion where I might want to completely overwrite a branch, it should be extra explicit by having to type something like --force-and-overwrite.

        • Ephera@lemmy.ml
          link
          fedilink
          English
          arrow-up
          1
          ·
          8 days ago

          Yeah, I virtually only use --force for moving tags around (which one could definitely argue isn’t really a thing you should be doing regularly either)…

    • TechNom (nobody)@programming.dev
      link
      fedilink
      English
      arrow-up
      4
      ·
      7 days ago

      I find it infuriating that they didn’t design CI to run locally first and then offer a hosted version of it. These tools are not the perfect alternatives for the real thing.

  • exu@feditown.com
    link
    fedilink
    English
    arrow-up
    1
    ·
    8 days ago

    That’s why I use a separate branch. Use rebase or reset depending on what exactly you need to clean up when it’s working.