-
-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* final tweak * final tweak2 * typos for days
- Loading branch information
1 parent
397123e
commit 55a69cf
Showing
3 changed files
with
39 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import yaml | ||
|
||
from varken import VERSION | ||
|
||
org = 'boerderij' | ||
project = 'varken' | ||
namespace = f"{org}/{project}" | ||
|
||
yaml_arr = [] | ||
tags = ['latest', VERSION] | ||
|
||
# Docker image, arch, variant, os | ||
arch_list = [('arm', 'arm', 'v6', 'linux'), | ||
('armhf', 'arm', 'v7', 'linux'), | ||
('arm64', 'arm64', 'v8', 'linux'), | ||
('amd64', 'amd64', None, 'linux')] | ||
|
||
for tag in tags: | ||
yaml_doc = { | ||
'image': f'{namespace}:{tag}', | ||
'manifests': [] | ||
} | ||
for arch in arch_list: | ||
info = { | ||
'image': f"{namespace}:{tag}-{arch[0]}", | ||
'platform': { | ||
'architecture': arch[1], | ||
'os': arch[3] | ||
} | ||
} | ||
if arch[2]: | ||
info['platform']['variant'] = arch[2] | ||
yaml_doc['manifests'].append(info) | ||
yaml_arr.append(yaml_doc) | ||
|
||
with open(f".manifest.yaml", 'w') as file: | ||
yaml.dump_all(yaml_arr, file, default_flow_style=False) |