util: Added cloudbuild_create_images.yaml
authorBobby R. Bruce <bbruce@ucdavis.edu>
Tue, 23 Jun 2020 02:33:26 +0000 (19:33 -0700)
committerBobby R. Bruce <bbruce@ucdavis.edu>
Thu, 16 Jul 2020 02:44:26 +0000 (02:44 +0000)
This cloudbuild file is used to build and upload our Docker images
to our Google Cloud infrastructure. To run:

```
gcloud builds submit --config \
util/cloudbuild/cloudbuild_create_images.yaml
```

Change-Id: I812584284a3cf79aac244a3b04a0f316f4281c49
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/30516
Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
util/cloudbuild/cloudbuild_create_images.yaml [new file with mode: 0644]

diff --git a/util/cloudbuild/cloudbuild_create_images.yaml b/util/cloudbuild/cloudbuild_create_images.yaml
new file mode 100644 (file)
index 0000000..d4d8d4c
--- /dev/null
@@ -0,0 +1,136 @@
+steps:
+    - name: 'gcr.io/cloud-builders/docker'
+      args: ['build',
+            '-t',
+            'gcr.io/$PROJECT_ID/ubuntu-20.04_all-dependencies:latest',
+            'util/dockerfiles/ubuntu-20.04_all-dependencies']
+
+    - name: 'gcr.io/cloud-builders/docker'
+      args: ['build',
+            '-t',
+            'gcr.io/$PROJECT_ID/ubuntu-18.04_all-dependencies:latest',
+            'util/dockerfiles/ubuntu-18.04_all-dependencies']
+
+    - name: 'gcr.io/cloud-builders/docker'
+      args: ['build',
+            '-t',
+            'gcr.io/$PROJECT_ID/ubuntu-18.04_min-dependencies:latest',
+            'util/dockerfiles/ubuntu-18.04_min-dependencies']
+
+    - name: 'gcr.io/cloud-builders/docker'
+      args: ['build',
+            '-t',
+            'gcr.io/$PROJECT_ID/gcc-version-4.8:latest',
+            '--build-arg', 'version=4.8',
+            'util/dockerfiles/ubuntu-18.04_gcc-version']
+
+    - name: 'gcr.io/cloud-builders/docker'
+      args: ['build',
+            '-t',
+            'gcr.io/$PROJECT_ID/gcc-version-5:latest',
+            '--build-arg', 'version=5',
+            'util/dockerfiles/ubuntu-18.04_gcc-version']
+
+    - name: 'gcr.io/cloud-builders/docker'
+      args: ['build',
+            '-t',
+            'gcr.io/$PROJECT_ID/gcc-version-6:latest',
+            '--build-arg', 'version=6',
+            'util/dockerfiles/ubuntu-18.04_gcc-version']
+
+    - name: 'gcr.io/cloud-builders/docker'
+      args: ['build',
+            '-t',
+            'gcr.io/$PROJECT_ID/gcc-version-7:latest',
+            '--build-arg', 'version=7',
+            'util/dockerfiles/ubuntu-18.04_gcc-version']
+
+    - name: 'gcr.io/cloud-builders/docker'
+      args: ['build',
+            '-t',
+            'gcr.io/$PROJECT_ID/gcc-version-8:latest',
+            '--build-arg', 'version=8',
+            'util/dockerfiles/ubuntu-18.04_gcc-version']
+
+    - name: 'gcr.io/cloud-builders/docker'
+      args: ['build',
+            '-t',
+            'gcr.io/$PROJECT_ID/gcc-version-9:latest',
+            '--build-arg', 'version=9',
+            'util/dockerfiles/ubuntu-20.04_gcc-version']
+
+    - name: 'gcr.io/cloud-builders/docker'
+      args: ['build',
+            '-t',
+            'gcr.io/$PROJECT_ID/gcc-version-10:latest',
+            '--build-arg', 'version=10',
+            'util/dockerfiles/ubuntu-20.04_gcc-version']
+
+    - name: 'gcr.io/cloud-builders/docker'
+      args: ['build',
+            '-t',
+            'gcr.io/$PROJECT_ID/clang-version-3.9:latest',
+            '--build-arg', 'version=3.9',
+            'util/dockerfiles/ubuntu-18.04_clang-version']
+
+    - name: 'gcr.io/cloud-builders/docker'
+      args: ['build',
+            '-t',
+            'gcr.io/$PROJECT_ID/clang-version-4.0:latest',
+            '--build-arg', 'version=4.0',
+            'util/dockerfiles/ubuntu-18.04_clang-version']
+
+    - name: 'gcr.io/cloud-builders/docker'
+      args: ['build',
+            '-t',
+            'gcr.io/$PROJECT_ID/clang-version-5.0:latest',
+            '--build-arg', 'version=5.0',
+            'util/dockerfiles/ubuntu-18.04_clang-version']
+
+    - name: 'gcr.io/cloud-builders/docker'
+      args: ['build',
+            '-t',
+            'gcr.io/$PROJECT_ID/clang-version-6.0:latest',
+            '--build-arg', 'version=6.0',
+            'util/dockerfiles/ubuntu-18.04_clang-version']
+
+    - name: 'gcr.io/cloud-builders/docker'
+      args: ['build',
+            '-t',
+            'gcr.io/$PROJECT_ID/clang-version-7:latest',
+            '--build-arg', 'version=7',
+            'util/dockerfiles/ubuntu-18.04_clang-version']
+
+    - name: 'gcr.io/cloud-builders/docker'
+      args: ['build',
+            '-t',
+            'gcr.io/$PROJECT_ID/clang-version-8:latest',
+            '--build-arg', 'version=8',
+            'util/dockerfiles/ubuntu-18.04_clang-version']
+
+    - name: 'gcr.io/cloud-builders/docker'
+      args: ['build',
+            '-t',
+            'gcr.io/$PROJECT_ID/clang-version-9:latest',
+            '--build-arg', 'version=9',
+            'util/dockerfiles/ubuntu-18.04_clang-version']
+
+
+images: ['gcr.io/$PROJECT_ID/ubuntu-20.04_all-dependencies:latest',
+         'gcr.io/$PROJECT_ID/ubuntu-18.04_all-dependencies:latest',
+         'gcr.io/$PROJECT_ID/ubuntu-18.04_min-dependencies:latest',
+         'gcr.io/$PROJECT_ID/gcc-version-4.8:latest',
+         'gcr.io/$PROJECT_ID/gcc-version-5:latest',
+         'gcr.io/$PROJECT_ID/gcc-version-6:latest',
+         'gcr.io/$PROJECT_ID/gcc-version-7:latest',
+         'gcr.io/$PROJECT_ID/gcc-version-8:latest',
+         'gcr.io/$PROJECT_ID/gcc-version-9:latest',
+         'gcr.io/$PROJECT_ID/gcc-version-10:latest',
+         'gcr.io/$PROJECT_ID/clang-version-3.9:latest',
+         'gcr.io/$PROJECT_ID/clang-version-4.0:latest',
+         'gcr.io/$PROJECT_ID/clang-version-5.0:latest',
+         'gcr.io/$PROJECT_ID/clang-version-6.0:latest',
+         'gcr.io/$PROJECT_ID/clang-version-7:latest',
+         'gcr.io/$PROJECT_ID/clang-version-8:latest',
+         'gcr.io/$PROJECT_ID/clang-version-9:latest']
+timeout: 18000s # 5 Hours