Exclude windowsservercore and nanoserver cleanly.
This commit is contained in:
parent
0bd37fa4ae
commit
eecccd3833
2 changed files with 9 additions and 10 deletions
|
|
@ -11,12 +11,8 @@ script:
|
|||
- 'docker-compose -f build.yml build redis-$VERSION'
|
||||
after_script:
|
||||
- 'docker-compose -f build.yml push redis-$VERSION'
|
||||
matrix:
|
||||
allow_failures: { env: [VERSION=windowsservercode, VERSION=nanoserver] }
|
||||
env:
|
||||
- VERSION=windowsservercore
|
||||
- VERSION=stretch
|
||||
- VERSION=nanoserver
|
||||
- VERSION=latest
|
||||
- VERSION=buster
|
||||
- VERSION=alpine3.9
|
||||
|
|
@ -214,3 +210,5 @@ env:
|
|||
- VERSION=3.2.5-alpine
|
||||
- VERSION=3.2.5-32bit
|
||||
- VERSION=3.2.5
|
||||
- VERSION=3.2.4-alpine
|
||||
- VERSION=3.2.4-32bit
|
||||
|
|
|
|||
13
build.php
13
build.php
|
|
@ -4,11 +4,14 @@ require_once __DIR__ . "/vendor/autoload.php";
|
|||
|
||||
use \Symfony\Component\Yaml\Yaml;
|
||||
|
||||
$image = "library/redis";
|
||||
$excludedTags = ['windowsservercore', 'nanoserver'];
|
||||
|
||||
$client = new \GuzzleHttp\Client();
|
||||
|
||||
$allLoaded = false;
|
||||
$results = [];
|
||||
$url = "https://hub.docker.com/v2/repositories/library/redis/tags/";
|
||||
$url = "https://hub.docker.com/v2/repositories/{$image}/tags/";
|
||||
while($allLoaded == false) {
|
||||
$data = $client->get($url)->getBody()->getContents();
|
||||
$json = json_decode($data, true);
|
||||
|
|
@ -41,11 +44,6 @@ $travisYaml = [
|
|||
'after_script' => [
|
||||
'docker-compose -f build.yml push redis-$VERSION'
|
||||
],
|
||||
'matrix' => [
|
||||
'allow_failures' => [
|
||||
'env' => [ 'VERSION=windowsservercode', 'VERSION=nanoserver' ],
|
||||
],
|
||||
],
|
||||
'env' => [],
|
||||
];
|
||||
|
||||
|
|
@ -55,6 +53,9 @@ $buildYaml = [
|
|||
];
|
||||
|
||||
foreach($results as $result) {
|
||||
if(in_array($result['name'], $excludedTags))
|
||||
continue;
|
||||
|
||||
$dockerfileLines = [];
|
||||
$dockerfileLines[] = "# From upstream {$result['name']}";
|
||||
$dockerfileLines[] = "FROM redis:{$result['name']}";
|
||||
|
|
|
|||
Loading…
Reference in a new issue