Skip to content
Permalink
Browse files
Merge pull request #44 from apache/add-latest-git-version
Add latest git version
  • Loading branch information
potiuk committed Nov 19, 2021
2 parents 3da7bd3 + 6534a7b commit 1b3043d26c4dc84f7c856edb6943984b99df368a
Showing 3 changed files with 58 additions and 1 deletion.
@@ -34,4 +34,11 @@ override.tf.json
# Include tfplan files to ignore the plan output of command: terraform plan -out=tfplan
# example: *tfplan*

# IDE Files
.idea
*.iml

# Session manager binaries
session-manager-plugin.*

# End of https://www.toptal.com/developers/gitignore/api/terraform
@@ -0,0 +1,49 @@
#!/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.

GIT_REPO="ppa:git-core/ppa"
GIT_LFS_REPO="https://packagecloud.io/install/repositories/github/git-lfs"

## Install git
add-apt-repository $GIT_REPO -y
apt-get update
apt-get install --upgrade git -y
git --version

# Install git-lfs
curl -s $GIT_LFS_REPO/script.deb.sh | bash
apt-get install -y git-lfs=2.13.3

# Install git-ftp
apt-get install git-ftp -y

# Remove source repo's
add-apt-repository --remove $GIT_REPO
rm /etc/apt/sources.list.d/github_git-lfs.list

#Install hub
tmp_hub="/tmp/hub"
mkdir -p "$tmp_hub"
url=$(curl -s https://api.github.com/repos/github/hub/releases/latest | jq -r '.assets[].browser_download_url | select(contains("hub-linux-amd64"))')
download_with_retries "$url" "$tmp_hub"
tar xzf "$tmp_hub"/hub-linux-amd64-*.tgz --strip-components 1 -C "$tmp_hub"
mv "$tmp_hub"/bin/hub /usr/local/bin

# Add well-known SSH host keys to known_hosts
ssh-keyscan -t rsa github.com >> /etc/ssh/ssh_known_hosts
ssh-keyscan -t rsa ssh.dev.azure.com >> /etc/ssh/ssh_known_hosts
@@ -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}-v2"
ami_name = "${var.ami_name}-${var.runner_version}-v4"
ami_regions = var.aws_regions
tag {
key = "Name"
@@ -140,6 +140,7 @@ build {
"./files/install-nodejs.sh",
"./files/install-github-cli.sh",
"./files/docker-compose.sh",
"./files/git.sh",
"./files/runner_bootstrap.sh",
"./files/cleanup.sh",
]

0 comments on commit 1b3043d

Please sign in to comment.