Browse Source

Update for new registry repo layout

master
KemoNine 5 months ago
parent
commit
05787e4eb1
Signed by: KemoNine <kemonine@lollipopcloud.solutions> GPG Key ID: 3BC2928798AE11AB
2 changed files with 9 additions and 9 deletions
  1. 7
    7
      build.py
  2. 2
    2
      run.sh

+ 7
- 7
build.py View File

@@ -39,16 +39,16 @@ elif processor == 'armv7l':
39 39
 else:
40 40
     sys.exit(1)
41 41
 
42
-docker_repository = processor + '/' + 'riot.im'
42
+docker_repository = 'arm/riot.im'
43 43
 
44
-print('Building ' + docker_repository + ':' + latest_release)
44
+print('Building ' + docker_repository + ':' + processor + '-' + latest_release)
45 45
 
46 46
 build_args = {
47 47
     'VERSION': latest_release
48 48
 }
49 49
 
50 50
 for line in docker.APIClient(base_url='unix://var/run/docker.sock').build(path='.',
51
-                          tag=docker_repository + ':' + latest_release,
51
+                          tag=docker_repository + ':' + processor + '-' + latest_release,
52 52
                           labels={'os': 'linux', 'arch': processor},
53 53
                           pull=True,
54 54
                           buildargs=build_args,
@@ -56,7 +56,7 @@ for line in docker.APIClient(base_url='unix://var/run/docker.sock').build(path='
56 56
                          ):
57 57
     print(line)
58 58
 
59
-image = client.images.get(docker_repository + ':' + latest_release)
59
+image = client.images.get(docker_repository + ':' + processor + '-' + latest_release)
60 60
 
61 61
 # Ensure latest tag can be created and fail build otherwise
62 62
 if not image.tag(repository=docker_repository, tag='latest'):
@@ -75,16 +75,16 @@ LOLLIPOP_REGISTRY_URL = 'https://' + LOLLIPOP_REGISTRY
75 75
 client.login(username='build-server', 
76 76
     registry=LOLLIPOP_REGISTRY_URL, 
77 77
     reauth=True)
78
-upstream_repo = LOLLIPOP_REGISTRY + '/' + processor + '/' + 'riot.im'
78
+upstream_repo = LOLLIPOP_REGISTRY + '/' + 'arm' + '/' + 'riot.im'
79 79
 for image_tag in image.tags:
80 80
     print('    Tag: ' + image_tag)
81 81
     lc_tag = image_tag.split(':')[1]
82 82
     image.tag(repository=upstream_repo, tag=lc_tag, force=True)
83
-    image.tag(repository='registry.lollipopcloud.tech' + '/' + processor + '/' + 'riot.im', tag=lc_tag, force=True)
83
+    image.tag(repository='registry.lollipopcloud.tech' + '/' + 'arm' + '/' + 'riot.im', tag=lc_tag, force=True)
84 84
     #Don't need to check upstream as it's smart enough not to re-transfer existing files
85 85
     # TODO: Update this to pre-load the upstream images and not waste the HTTP requests / responses telling Docker it was already pushed
86 86
     client.images.push(upstream_repo, tag=lc_tag)
87
-    client.images.push('registry.lollipopcloud.tech' + '/' + processor + '/' +  'riot.im', tag=lc_tag)
87
+    client.images.push('registry.lollipopcloud.tech' + '/' + 'arm' + '/' +  'riot.im', tag=lc_tag)
88 88
 
89 89
 print('Build complete')
90 90
 

+ 2
- 2
run.sh View File

@@ -8,7 +8,7 @@ else
8 8
     ARCH="arm32v7"
9 9
 fi
10 10
 
11
-docker pull registry.lollipopcloud.solutions/$ARCH/riot.im
11
+docker pull registry.lollipopcloud.solutions/arm/riot.im/$ARCH-latest
12 12
 
13 13
 docker container stop riot.im
14 14
 docker container rm riot.im
@@ -23,4 +23,4 @@ docker run -it --name riot.im \
23 23
     -l traefik.frontend.passHostHeader=true \
24 24
     -l traefik.port=80 \
25 25
     -v /var/riot.im/config.riot.domain.tld.json:/var/www/config.riot.domain.tld.json \
26
-    registry.lollipopcloud.solutions/$ARCH/riot.im
26
+    registry.lollipopcloud.solutions/arm/riot.im/$ARCH-latest

Loading…
Cancel
Save