sky-uk / osprey

Kubernetes OIDC CLI login
BSD 3-Clause "New" or "Revised" License
50 stars 18 forks source link

Change travis build agent to a newer ubuntu release #98

Open supreethrao opened 8 months ago

supreethrao commented 8 months ago

Currently, travis agents run ubuntu 16.04 (Xenial) by default. This is pretty dated and does not reflect most of our development environments. It would be good to change this to have agents running on newer releases of ubuntu.

This won't be a trivial change as slapd, which is used for e2e tests as the ldap database will need a different configuration in order to start.

snippet of build failure with ubuntu 22.04 ``` Failure [2.350 seconds] [BeforeSuite] BeforeSuite /home/travis/gopath/src/github.com/sky-uk/osprey/e2e/e2e_suite_test.go:64 Starts the ldap server Expected <*exec.ExitError | 0xc0004c2180>: { ProcessState: { pid: 15373, status: 256, rusage: { Utime: {Sec: 0, Usec: 3221}, Stime: {Sec: 0, Usec: 6443}, Maxrss: 63624, Ixrss: 0, Idrss: 0, Isrss: 0, Minflt: 705, Majflt: 0, Nswap: 0, Inblock: 0, Oublock: 0, Msgsnd: 0, Msgrcv: 0, Nsignals: 0, Nvcsw: 1, Nivcsw: 1, }, }, Stderr: nil, } to be nil /home/travis/gopath/src/github.com/sky-uk/osprey/e2e/e2e_suite_test.go:73 ------------------------------ --- Output --- *** ASYNC COMMAND STARTED [slapd -d 0 -h ldap://localhost:10389 ldaps://localhost:10636 ldapi://%!F(MISSING)tmp%!F(MISSING)osprey-2515455013%!F(MISSING)ldap%!F(MISSING)ldap.unix -f /tmp/osprey-2515455013/ldap/ldap.conf] --- End Output --- Ran 83 of 0 Specs in 2.352 seconds FAIL! -- 0 Passed | 83 Failed | 0 Pending | 0 Skipped --- FAIL: TestOspreySuite (2.56s) ```

As part of this change, the docker file used for local e2e test will also need to be changed to reflect the newer version

Tasks

  1. Make changes to ldap config template in order to get ldap server started. Some of the changes include the password having to be hashed
  2. Change the base image in local e2e dockerfile