Commit Graph

102 Commits

Author SHA1 Message Date
Daniel Arteaga 7233aa2731 Merge pull request #87 from bitnami/minideb-1599583326
fix: disable unstable
2020-09-08 19:02:53 +02:00
darteaga 9afed36cb0 fix: disable unstable 2020-09-08 16:43:04 +00:00
Daniel Arteaga 6c039b8bd8 Merge pull request #84 from bitnami/debian-snapshots
Add support for debian snapshot
2020-07-03 09:44:19 +02:00
darteaga 3fc1c3a0a8 rename buildone_snapshot 2020-07-02 16:32:35 +00:00
darteaga eb9110745c add build_latest_snapshot script 2020-07-02 16:11:43 +00:00
darteaga 8a090bd3e6 separate snapshot_id logic 2020-07-02 15:03:12 +00:00
darteaga ec594cb887 refactor vars and remove unused function 2020-07-02 12:06:41 +00:00
darteaga ff93bf6411 improve scripts 2020-07-02 10:38:56 +00:00
darteaga eb3437cd8a improve scripts 2020-07-01 17:06:21 +00:00
darteaga 135056aa0a missing dists 2020-07-01 16:42:29 +00:00
darteaga 815d32183d apply pr feedback 2020-07-01 16:36:28 +00:00
darteaga eee9f06e77 improve snapshot script to always get the latest id 2020-07-01 14:44:40 +00:00
darteaga 35fb3b08f5 avoid using IFS 2020-07-01 10:44:13 +00:00
darteaga 82fec01b8e remove unnecessary if/else in pushall 2020-06-30 13:32:48 +00:00
Daniel Arteaga c9c82d6a17 remove unnecessary if/else
Co-authored-by: Marko Mikulicic <mkm@bitnami.com>
2020-06-30 15:31:08 +02:00
darteaga b7ed2764cd fix not directory error 2020-06-30 12:04:23 +00:00
darteaga e754737551 fix read options error 2020-06-30 11:59:15 +00:00
darteaga 8fafa0d899 add support for debian snapshot 2020-06-30 11:38:19 +00:00
James Westby 392318a8a9 Stop trying to update -extras
The -extras repos are archived, so we can't create PRs any more, so don't try.

-runtimes is still active.
2020-01-21 18:37:49 +01:00
James Westby 10a49a0a03 Don't delete symlinks in /usr/share/doc
/usr/share/doc contains a structure that might be like

```
   foo/copyright
   foo/other
   bar -> foo
```

In this case we want to delete `foo/other`, but leave `bar` alone.

The previous code would delete `bar` as it is not a directory.

However, the structure of `/usr/share/doc` is such that the first
level is a per-package directory (or symlink) and the directory
contains the files. We therefore want to only consider files in the
package directories, so look a level further down the tree before
deleting.
2020-01-21 17:15:59 +01:00
James Westby bdd52f459c Also tag latest at push time 2019-10-07 12:21:04 +01:00
James Westby 9eea538c29 Tag other registries in push
Previously we were tagging for all registries as we built
the images and then pushing all registries blindly.

Now if an image hasn't changed it wouldn't tag with the other
registry tags, and then the push would fail as the gcr/quay
tags didn't exist.

Rather than taking care to tag in the case where the image
hasn't changed, instead change the pushall script to
only assume that `bitnami/minideb` tags are correct, and
tag the other registries based on that one before pushing.

This ensures that the tags will always exist, and also makes
sure we are pushing the same image to each registry (excluding
race conditions.)
2019-10-07 11:31:21 +01:00
James Westby 6309b17069 Add shellcheck to catch bad shell code 2019-10-04 16:01:31 +01:00
John Kristensen 449decc476 Use deb.debian.org
The httpredir.debian.org service has been dropped in favour of
deb.debian.org

ref: https://lists.debian.org/debian-mirrors/2017/02/msg00000.html
2019-10-04 15:29:47 +01:00
James Westby c6b8578e09 [buildone] fix mistaken use of continue
When I moved this code in to its own script, I moved it
out of a loop, so we can no longer `continue` and should
`return` instead.
2019-10-04 15:02:38 +01:00
James Westby b4db65f619 [mkimage] Clean hostname and resolv.conf
These depend on the build environment, but differences
don't show up inside the docker image as docker sets the
content of these files when starting a container.

We can put static values in the files to stop the image
layers differing without affecting the running containers
in any way.

This wasn't caught by the reproducibility check as the values
will be pretty static when built on the same host. (hostname
will be fixed, and resolv.conf will only change if the networking
configration changes enough, and that is unlikely to happen)
2019-10-01 15:19:48 +01:00
James Westby dc6a22375b Fix reproducible builds by fixing date in /etc/shadow
The builds were reproducible provided they were done on the same day.

However if they were done on different days they had different dates
in /etc/shadow and so changed. This meant that the images were
updated every day, and sometimes the reproducibility check would
fail if the day ticked over between the builds.
2019-09-30 12:29:49 +02:00
James Westby 4881871bd0 Split out a buildone script
This makes it easier to test all the code around the building
of an image as you can just build one image.
2019-09-27 13:27:54 +02:00
James Westby e64c3dd071 Include dockerdiff output in the log
When this happens in travis the intermediate images
aren't pushed, so you have to rebuild locally.

The dockerdiff output may be large, but that's more useful
than having to try and reproduce locally.
2019-09-25 12:49:47 +02:00
James Westby 52253ec27f Set buster as latest
Buster is the latest Debian release, so point the `latest` tag to it.
2019-08-19 15:31:02 +02:00
Filippo Giunchedi 2c4b4f0f14 Add Buster
Tweak the tests so that they use default-mysql-server
on newer dists as it replaced the mysql-server package.

Also add explicit import of the buster signing key
as the Travis agent doesn't have it available.

Thanks to Filippo Giunchedi (@filippog) for the initial
work on this.
2019-07-11 16:11:35 +02:00
Alejandro Ruiz 8367d275c8 Enable content trust only when pushing to DockerHub (#57)
The result of pushing to GCR or Quay.io with content trust enabled is unknown, so I rather avoid it for now.
2018-09-20 14:06:07 +02:00
Joseda Rios 76256c1844 Decode key value (#56)
* Decode key value

The docker content trust repository key is base64-encoded, so let's decode it before dumping it to a file

* decode option is `-d` in Linux
2018-09-20 12:10:21 +02:00
Joseda Rios f1fd3b7679 fix key permissions (#55)
We found this issue in the travis build:

```
refusing to load key from /tmp/tmp.7IS3P9lCpg/key: private key file /tmp/tmp.7IS3P9lCpg/key must not be readable or writable by others
```

Making the file readable by the running user should fix the proble
2018-09-20 10:49:14 +02:00
Alejandro Ruiz edb388d354 Fix pushall script (#54)
The code tries to avoid the contents to be printed in the output in case the shell tracing is enabled at some point, but that implementation also makes the `tmpdir` variable not to be accessible in that context.
2018-09-19 17:36:36 +02:00
Alejandro Ruiz 883d28ccad Enable signing of images to push process (#53)
This change enables Docker Content Trust for the tags being pushed.

I configured Travis to set the required key and passphrase.

Fixes #48.
2018-09-19 16:45:07 +02:00
Alejandro Ruiz c3b5ba1143 Print docker version used by TravisCI (#52) 2018-09-12 18:12:24 +02:00
Joseda Rios dc7e90fab1 add extras-base to the minideb derived list (#50)
As we now are we building an additional minideb variant, we want update it on publish
2018-08-01 14:47:57 +02:00
Tomas Pizarro c0c0ea9da1 Merge pull request #47 from tompizmor/fix_ci
Increase test timeout
2018-04-20 17:45:32 +02:00
tompizmor f2eb426c2e Increase test timeout 2018-04-20 16:28:51 +02:00
Beltran 7211ad61a1 Remove Slack channel 2018-04-10 14:31:26 +02:00
Beltran 1df3ecbb17 Remove slack channel 2018-04-10 14:24:48 +02:00
Jorge Marin e0b4e23168 Use repo digest instead of image id for external image identification (#46) 2018-03-15 15:01:12 +01:00
Jorge Marin cc2266fd02 Wait for the apt.daily service to finish instead of killing it avoiding bad state (#45) 2018-03-14 10:34:51 +01:00
Jorge Marin 74b802b9b2 Fix for Travis build failures due to running apt cron service (#44) 2018-03-13 13:29:42 +01:00
Jorge Marin 32f0aae723 Update minideb-extras and minideb-runtimes each time minideb is pushed (#43) 2018-03-08 18:35:14 +01:00
James Westby 0f008379a9 Increase the timeout on the fail test
It seems like the build has been failing frequently
recently, apparently timing out during this test.

Increase the timeout to compensate.
2018-02-28 18:32:50 +00:00
Sameer Naik ac57829719 travis: process build on a xenial vm, fixes debian:unstable builds (#39) 2017-12-21 21:18:51 +05:30
James Westby 7df2db746c Fix arguments to gcloud docker
gcloud became more strict about separating gcloud arguments
from docker arguments, and is now throwing an error failing
the build https://travis-ci.org/bitnami/minideb/jobs/246281633#L5140

Use `--` to separate the arguments.
2017-06-26 11:18:16 +01:00
James Westby fad19490cb Add stretch and make it default
Stretch was just released: https://www.debian.org/News/2017/20170617

Closes #32
2017-06-19 08:23:41 +01:00