Skip to content
This repository was archived by the owner on Nov 24, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions .github/actions/check-go-modules/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,6 @@ colored_text() {
sed "s/^/${color}/" | sed "s/$/${normal_fg}/"
}

download_go() {
. build/functions.sh
if verify_and_set_go_version; then
return
fi
go_version="$(cat "${GITHUB_WORKSPACE}/GO_VERSION")"
wget -O go.tar.gz "https://dl.google.com/go/go${go_version}.linux-amd64.tar.gz" --no-verbose
echo "Extracting Go ${go_version}..."
<<-'SUDO_COMMANDS' sudo sh
set -o errexit
go_dir="$(command -v go | xargs realpath | xargs dirname | xargs dirname)"
mv "$go_dir" "${go_dir}.unused"
tar -C /usr/local -xzf go.tar.gz
SUDO_COMMANDS
rm go.tar.gz
go version
}

vendor_dependencies() {
go mod tidy
go mod vendor
Expand Down Expand Up @@ -86,13 +68,10 @@ check_go_file() {
exit_code=1
}

GOROOT=/usr/local/go
export PATH="${PATH}:${GOROOT}/bin"
export GOPATH="${HOME}/go"

exit_code=0
declare -A command_exists
command_exists[download_go]=1
command_exists[vendor_dependencies]=1
command_exists[check_vendored_deps]=1
command_exists[check_go_file]=1
Expand Down
23 changes: 0 additions & 23 deletions .github/actions/pr-to-update-go/update_golang_org_x.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,31 +19,8 @@
set -o errexit -o nounset
trap 'echo "Error on line ${LINENO} of ${0}"; exit 1' ERR

# download_go downloads and installs the GO version specified in GO_VERSION
download_go() {
. build/functions.sh
if verify_and_set_go_version; then
return
fi
go_version="$(cat "${GITHUB_WORKSPACE}/GO_VERSION")"
wget -O go.tar.gz "https://dl.google.com/go/go${go_version}.linux-amd64.tar.gz" --no-verbose
echo "Extracting Go ${go_version}..."
<<-'SUDO_COMMANDS' sudo sh
set -o errexit
go_dir="$(command -v go | xargs realpath | xargs dirname | xargs dirname)"
mv "$go_dir" "${go_dir}.unused"
tar -C /usr/local -xzf go.tar.gz
SUDO_COMMANDS
rm go.tar.gz
go version
}

GOROOT=/usr/local/go
export PATH="${PATH}:${GOROOT}/bin"
export GOPATH="${HOME}/go"

download_go

# update all golang.org/x dependencies in go.mod/go.sum
go get -u \
golang.org/x/crypto \
Expand Down
26 changes: 0 additions & 26 deletions .github/actions/tm-integration-tests/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,29 +33,6 @@ function wait_for_endpoint() {
}
export -f wait_for_endpoint

download_go() {
. build/functions.sh
if verify_and_set_go_version; then
return
fi
go_version="$(cat "${GITHUB_WORKSPACE}/GO_VERSION")"
wget -O go.tar.gz "https://dl.google.com/go/go${go_version}.linux-amd64.tar.gz"
echo "Extracting Go ${go_version}..."
<<-'SUDO_COMMANDS' sudo sh
set -o errexit
go_dir="$(
dirname "$(
dirname "$(
realpath "$(
which go
)")")")"
mv "$go_dir" "${go_dir}.unused"
tar -C /usr/local -xzf go.tar.gz
SUDO_COMMANDS
rm go.tar.gz
go version
}

gray_bg="$(printf '%s%s' $'\x1B' '[100m')";
red_bg="$(printf '%s%s' $'\x1B' '[41m')";
yellow_bg="$(printf '%s%s' $'\x1B' '[43m')";
Expand All @@ -73,9 +50,6 @@ ciab_dir="${GITHUB_WORKSPACE}/infrastructure/cdn-in-a-box";

sudo apt-get install -y --no-install-recommends gettext

GOROOT=/usr/local/go
export GOROOT PATH="${PATH}:${GOROOT}/bin"
download_go
export GOPATH="${HOME}/go"
org_dir="$GOPATH/src/github.com/apache"
repo_dir="${org_dir}/trafficcontrol"
Expand Down
26 changes: 0 additions & 26 deletions .github/actions/to-integration-tests/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,6 @@
# specific language governing permissions and limitations
# under the License.

download_go() {
. build/functions.sh
if verify_and_set_go_version; then
return
fi
go_version="$(cat "${GITHUB_WORKSPACE}/GO_VERSION")"
wget -O go.tar.gz "https://dl.google.com/go/go${go_version}.linux-amd64.tar.gz"
echo "Extracting Go ${go_version}..."
<<-'SUDO_COMMANDS' sudo sh
set -o errexit
go_dir="$(
dirname "$(
dirname "$(
realpath "$(
which go
)")")")"
mv "$go_dir" "${go_dir}.unused"
tar -C /usr/local -xzf go.tar.gz
SUDO_COMMANDS
rm go.tar.gz
go version
}

gray_bg="$(printf '%s%s' $'\x1B' '[100m')";
red_bg="$(printf '%s%s' $'\x1B' '[41m')";
yellow_bg="$(printf '%s%s' $'\x1B' '[43m')";
Expand Down Expand Up @@ -98,9 +75,6 @@ start_traffic_vault & disown

sudo apt-get install -y --no-install-recommends gettext

GOROOT=/usr/local/go
export GOROOT PATH="${PATH}:${GOROOT}/bin"
download_go
export GOPATH="${HOME}/go"
org_dir="$GOPATH/src/github.com/apache"
repo_dir="${org_dir}/trafficcontrol"
Expand Down
22 changes: 0 additions & 22 deletions .github/actions/tp-integration-tests/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,24 +74,6 @@ QUERY

sudo useradd trafops

download_go() {
. build/functions.sh
if verify_and_set_go_version; then
return
fi
go_version="$(cat "${GITHUB_WORKSPACE}/GO_VERSION")"
wget -O go.tar.gz "https://dl.google.com/go/go${go_version}.linux-amd64.tar.gz" --no-verbose
echo "Extracting Go ${go_version}..."
<<-'SUDO_COMMANDS' sudo sh
set -o errexit
go_dir="$(command -v go | xargs realpath | xargs dirname | xargs dirname)"
mv "$go_dir" "${go_dir}.unused"
tar -C /usr/local -xzf go.tar.gz
SUDO_COMMANDS
rm go.tar.gz
go version
}

gray_bg="$(printf '%s%s' $'\x1B' '[100m')";
red_bg="$(printf '%s%s' $'\x1B' '[41m')";
yellow_bg="$(printf '%s%s' $'\x1B' '[43m')";
Expand Down Expand Up @@ -153,9 +135,6 @@ CHROMIUM_CONTAINER=$(docker ps -qf name=chromium)
HUB_CONTAINER=$(docker ps -qf name=hub)
CHROMIUM_VER=$(docker exec "$CHROMIUM_CONTAINER" chromium --version | grep -Eo '[0-9.]+')

GOROOT=/usr/local/go
export PATH="${PATH}:${GOROOT}/bin"
download_go
export GOPATH="${HOME}/go"
readonly ORG_DIR="$GOPATH/src/github.com/apache"
readonly REPO_DIR="${ORG_DIR}/trafficcontrol"
Expand Down Expand Up @@ -213,7 +192,6 @@ onFail() {
exit 1
}


cd "${REPO_DIR}/traffic_portal/test/integration"
npm ci
PATH=$(pwd)/node_modules/.bin/:$PATH
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/check-go-modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,13 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@master
- name: Download Go
run: .github/actions/check-go-modules/entrypoint.sh download_go
- name: Check Go Version
run: echo "::set-output name=value::$(cat GO_VERSION)"
id: go-version
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ steps.go-version.outputs.value }}
- name: Vendor dependencies
id: vendor-dependencies
run: .github/actions/check-go-modules/entrypoint.sh vendor_dependencies
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/go.vet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:
uses: actions/checkout@master
- name: go-version
run: echo "::set-output name=value::$(cat GO_VERSION)"
id: go-version
- uses: actions/setup-go@v2
with:
go-version: ${{ steps.go-version.outputs.value }} # The Go version to download (if necessary) and use.
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/pr-to-update-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ jobs:
- name: Install dependencies
if: ${{ steps.checkout.outcome == 'success' }}
run: pip install .github/actions/pr-to-update-go
- name: Check Go Version
run: echo "::set-output name=value::$(cat GO_VERSION)"
id: go-version
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ steps.go-version.outputs.value }}
- name: PR to Update Go
if: ${{ steps.checkout.outcome == 'success' }}
run: python3 -m pr_to_update_go
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/tm.integration.tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ jobs:
uses: actions/checkout@master
with:
fetch-depth: 1
- name: Check Go Version
run: echo "::set-output name=value::$(cat GO_VERSION)"
id: go-version
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ steps.go-version.outputs.value }}
- name: Run integration tests
uses: ./.github/actions/tm-integration-tests
env:
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/tp.integration.tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,13 @@ jobs:
- name: Initialize Traffic Ops Database
id: todb
uses: ./.github/actions/todb-init
- name: Check Go Version
run: echo "::set-output name=value::$(cat GO_VERSION)"
id: go-version
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ steps.go-version.outputs.value }}
- name: Run TP
uses: ./.github/actions/tp-integration-tests
with:
Expand All @@ -119,4 +126,3 @@ jobs:
path: ${{ github.workspace }}/traffic_portal/test/integration/Reports/
- name: Save Alpine Docker image
run: .github/actions/save-alpine-tar/entrypoint.sh save ${{ env.ALPINE_VERSION }}

7 changes: 7 additions & 0 deletions .github/workflows/traffic-ops.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,13 @@ jobs:
- name: Initialize Traffic Ops Database
id: todb
uses: ./.github/actions/todb-init
- name: Check Go Version
run: echo "::set-output name=value::$(cat GO_VERSION)"
id: go-version
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ steps.go-version.outputs.value }}
- name: Run API v2 tests
id: v2Tests
if: ${{ steps.todb.outcome == 'success' && always() }}
Expand Down
6 changes: 0 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -84,17 +84,13 @@ go.etcd.io/bbolt v1.3.5 h1:XAzx9gjCb0Rxj7EoqcClPD1d5ZBxZJk0jbuoPHenBt0=
go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20210506145944-38f3c27a63bf h1:B2n+Zi5QeYRDAEodEu72OS36gmTWjgpXr2+cWcBW90o=
golang.org/x/crypto v0.0.0-20210506145944-38f3c27a63bf/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8=
golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97 h1:/UOmuWzQfxxo9UtlXMwuQU8CMgg1eZXqTRwkSQJWKOI=
golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20201006153459-a7d1128ccaa0/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20210505214959-0714010a04ed h1:V9kAVxLvz1lkufatrpHuUVyJ/5tR3Ms7rk951P4mI98=
golang.org/x/net v0.0.0-20210505214959-0714010a04ed/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20210716203947-853a461950ff h1:j2EK/QoxYNBsXI4R7fQkkRUk8y6wnOBI+6hgPdP/6Ds=
golang.org/x/net v0.0.0-20210716203947-853a461950ff/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f h1:wMNYb4v58l5UBM7MYRLPG6ZhfOqbKu7X5eyFl8ZhKvA=
Expand All @@ -110,8 +106,6 @@ golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210503173754-0981d6026fa6 h1:cdsMqa2nXzqlgs183pHxtvoVwU7CyzaCTAUOg94af4c=
golang.org/x/sys v0.0.0-20210503173754-0981d6026fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c h1:F1jZWGFhYfh0Ci55sIpILtKKK8p3i2/krTr0H1rg74I=
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
Expand Down