This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow-ci-infra.git


The following commit(s) were added to refs/heads/main by this push:
     new 56b175c  Add regctl
56b175c is described below

commit 56b175cdddc4e7151d4ff447b179b38911fc1acd
Author: Jarek Potiuk <[email protected]>
AuthorDate: Wed Jun 15 14:11:51 2022 +0200

    Add regctl
---
 github-runner-ami/packer/files/regctl.sh    | 29 +++++++++++++++++++++++++++++
 github-runner-ami/packer/ubuntu2004.pkr.hcl |  3 ++-
 2 files changed, 31 insertions(+), 1 deletion(-)

diff --git a/github-runner-ami/packer/files/regctl.sh 
b/github-runner-ami/packer/files/regctl.sh
new file mode 100644
index 0000000..191403d
--- /dev/null
+++ b/github-runner-ami/packer/files/regctl.sh
@@ -0,0 +1,29 @@
+#!/usr/bin/env bash
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+set -exu -o pipefail
+
+architecture=$(uname -m)
+if [[ ${architecture} == "x86_64" ]] ; then
+    # Well. Docker compose got it right, but regctl didn't ¯\_(ツ)_/¯
+    architecture="amd64"
+fi
+# Hard-code regctl version
+regctl_version="v0.4.3"
+regctl_binary="regctl-${regctl_version}-$(uname -s)-${architecture}"
+curl -L 
"https://github.com/regclient/regclient/releases/download/${regctl_version}/${regctl_binary}";
 -o "/usr/local/bin/regctl"
+chmod a+x "/usr/local/bin/regctl"
diff --git a/github-runner-ami/packer/ubuntu2004.pkr.hcl 
b/github-runner-ami/packer/ubuntu2004.pkr.hcl
index 3407c81..5ca7e10 100644
--- a/github-runner-ami/packer/ubuntu2004.pkr.hcl
+++ b/github-runner-ami/packer/ubuntu2004.pkr.hcl
@@ -38,7 +38,7 @@ source "amazon-ebs" "runner_builder" {
   #access_key = ""
   #secret_key = ""
   region = var.aws_regions[0]
-  ami_name = "${var.ami_name}-${var.runner_version}-v4"
+  ami_name = "${var.ami_name}-${var.runner_version}-v5"
   ami_regions = var.aws_regions
   tag {
     key   = "Name"
@@ -143,6 +143,7 @@ build {
       "./files/git.sh",
       "./files/runner_bootstrap.sh",
       "./files/docker-buildx.sh",
+      "./files/regctl.sh",
       "./files/cleanup.sh",
     ]
     execute_command = "chmod +x '{{ .Path }}'; sudo sh -c '{{ .Vars }} {{ 
.Path }}'"

Reply via email to