Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.maint.python > #15146

Re: Package testing with Salsa CI for new packages

From Paul Boddie <paul@boddie.org.uk>
Newsgroups linux.debian.maint.python
Subject Re: Package testing with Salsa CI for new packages
Date 2023-08-21 19:20 +0200
Message-ID <H5gJk-3r7q-1@gated-at.bofh.it> (permalink)
References <H3MWZ-2whZ-9@gated-at.bofh.it> <H4Y01-3fwK-7@gated-at.bofh.it> <H5cPn-3oJw-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Monday, 21 August 2023 15:01:26 CEST Carles Pina i Estany wrote:
> 
> If you want, you can simplify more (it's not exactly the same, so it
> might or might not help). There is a way on GitLab to point to the
> latest build of a job. For example, you have the following URL for one
> of the git repos:
>
> https://salsa.debian.org/moin-team/emeraldtree/-/jobs/4575438/artifacts/raw/
aptly
> 
> You could use instead (to avoid the pipeline number):
> https://salsa.debian.org/moin-team/emeraldtree/-/jobs/artifacts/debian/
master/raw/aptly?job=aptly

That is a good idea, since I always intend the latest job to be successful. 
:-)

> Which is a redirect to the latest pipeline. Currently:
> ----
> $ curl -s -I
> "https://salsa.debian.org/moin-team/emeraldtree/-/jobs/artifacts/debian/mas
> ter/raw/aptly?job=aptly" | grep -E -i "^(http|location)" HTTP/2 302
> location:
> https://salsa.debian.org/moin-team/emeraldtree/-/jobs/4575438/artifacts/raw/
aptly
> ----
> 
> Follows this format:
> BRANCH=debian/master
> DIRECTORY=aptly
> JOB_NAME=aptly
> https://salsa.debian.org/moin-team/emeraldtree/-/jobs/artifacts/${BRANCH}/ra
> w/${DIRECTORY}?job=${JOB_NAME}

Thanks for demonstrating this. I imagine that it is documented somewhere in 
the GitLab manuals, too. One note of caution, though. It seems that using 
these redirected URLs is not necessarily possible with apt, and so it might be 
advisible to obtain the redirected URL as shown in the output above.

In my script I now get curl (and not wget any more) to obtain the final URL to 
provide to the apt configuration, and I also use this job-specific URL to 
obtain each GPG key. I suppose I could change the apt configuration to allow 
redirects instead.

> Just a side note: be careful about expiring artifacts. In some projects
> (settings dependant) only the latest artifact is kept and older ones
> might be expired (deleted) after some time. I don't think that this is
> the case of the moin-team/emeraldtree after a quick check... but I'm
> unsure where this is properly checked on GitLab.

"CI/CD Settings", "Artifacts", "Keep artifacts from most recent successful 
jobs" is set, so I imagine that as long as the latest job is successful, 
everything will still work. Indeed, it is desirable to rely on the latest job 
under such conditions: one would not want a newer dependency build to break 
the Moin package because an older set of artefacts has been deleted.

Thanks once again for the feedback and advice!

Paul

Back to linux.debian.maint.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Package testing with Salsa CI for new packages Paul Boddie <paul@boddie.org.uk> - 2023-08-17 17:20 +0200
  Re: Package testing with Salsa CI for new packages Carles Pina i Estany <carles@pina.cat> - 2023-08-18 10:00 +0200
    Re: Package testing with Salsa CI for new packages Paul Boddie <paul@boddie.org.uk> - 2023-08-18 13:20 +0200
      Re: Package testing with Salsa CI for new packages Carles Pina i Estany <carles@pina.cat> - 2023-08-18 16:20 +0200
        Re: Package testing with Salsa CI for new packages Paul Boddie <paul@boddie.org.uk> - 2023-08-18 19:10 +0200
          Re: Package testing with Salsa CI for new packages Carles Pina i Estany <carles@pina.cat> - 2023-08-18 20:00 +0200
            Re: Package testing with Salsa CI for new packages Paul Boddie <paul@boddie.org.uk> - 2023-08-19 19:10 +0200
              Re: Package testing with Salsa CI for new packages Carles Pina i Estany <carles@pina.cat> - 2023-08-19 20:40 +0200
                Re: Package testing with Salsa CI for new packages Paul Boddie <paul@boddie.org.uk> - 2023-08-20 00:50 +0200
                Re: Package testing with Salsa CI for new packages Carles Pina i Estany <carles@pina.cat> - 2023-08-20 14:10 +0200
                Re: Package testing with Salsa CI for new packages Paul Boddie <paul@boddie.org.uk> - 2023-08-20 23:20 +0200
                Re: Package testing with Salsa CI for new packages Carles Pina i Estany <carles@pina.cat> - 2023-08-21 15:10 +0200
                Re: Package testing with Salsa CI for new packages Paul Boddie <paul@boddie.org.uk> - 2023-08-21 19:20 +0200
  Re: Package testing with Salsa CI for new packages Andrey Rakhmatullin <wrar@wrar.name> - 2023-08-18 18:30 +0200
    Re: Package testing with Salsa CI for new packages Paul Boddie <paul@boddie.org.uk> - 2023-08-18 19:20 +0200
      Re: Package testing with Salsa CI for new packages Andrey Rakhmatullin <wrar@wrar.name> - 2023-08-18 19:50 +0200

csiph-web