From 8ff9a5ef74151fda9de74d64776f90a66805b325 Mon Sep 17 00:00:00 2001 From: Chris Roberts Date: Mon, 15 May 2023 08:31:05 -0700 Subject: [PATCH] Remove old scripts and workflows --- .ci/build.sh | 101 ------------------------------------ .ci/init.sh | 6 --- .ci/test.sh | 27 ---------- .github/workflows/build.yml | 35 ------------- 4 files changed, 169 deletions(-) delete mode 100755 .ci/build.sh delete mode 100644 .ci/init.sh delete mode 100755 .ci/test.sh delete mode 100644 .github/workflows/build.yml diff --git a/.ci/build.sh b/.ci/build.sh deleted file mode 100755 index 5a6b0d3cd..000000000 --- a/.ci/build.sh +++ /dev/null @@ -1,101 +0,0 @@ -#!/usr/bin/env bash - -csource="${BASH_SOURCE[0]}" -while [ -h "$csource" ] ; do csource="$(readlink "$csource")"; done -root="$( cd -P "$( dirname "$csource" )/../" && pwd )" - -. "${root}/.ci/load-ci.sh" - -pushd "${root}" - -info "Building Vagrant RubyGem..." -wrap gem build ./*.gemspec \ - "Failed to build Vagrant RubyGem" - -# Get the path of our new gem -files=( vagrant*.gem ) -gem="${files[0]}" -if [ ! -f "${gem}" ]; then - debug "could not locate gem in %s" "${files[*]}" - failure "Unable to locate built Vagrant RubyGem" -fi - -# Create folder to store artifacts -wrap mkdir -p "generated-artifacts" \ - "Failed to create artifiact directory" - -wrap mv "${gem}" ./generated-artifacts \ - "Failed to move Vagrant RubyGem" - -info "Installing submodules for vagrant-go build..." -wrap git submodule update --init --recursive \ - "Failed to install git submodules" - -# Build our binaries - -info "Building vagrant-go linux amd64..." - -# Build linux amd64 binary -wrap make bin/linux \ - "Failed to build the Vagrant go linux amd64 binary" - -# Rename our binary -wrap mv vagrant vagrant-go_linux_amd64 \ - "Failed to rename vagrant linux amd64 binary" - -# Zip the binary -wrap zip vagrant-go_linux_amd64 vagrant-go_linux_amd64 \ - "Failed to compress go linux amd64 binary" - -# Move the binary asset -wrap mv vagrant-go_linux_amd64.zip ./generated-artifacts \ - "Failed to move Vagrant Go linux amd64 build" - -info "Building vagrant-go linux 386..." - -# Build linux 386 binary -wrap make bin/linux-386 \ - "Failed to build the Vagrant go linux 386 binary" - -# Rename our binary -wrap mv vagrant vagrant-go_linux_386 \ - "Failed to rename vagrant linux 386 binary" - -# Zip the binary -wrap zip vagrant-go_linux_386 vagrant-go_linux_386 \ - "Failed to compress go linux 386 binary" - -# Move the binary asset -wrap mv vagrant-go_linux_386.zip ./generated-artifacts \ - "Failed to move Vagrant Go linux 386 build" - -info "Building vagrant-go darwin amd64..." - -# Build darwin binary -wrap make bin/darwin \ - "Failed to build the Vagrant go darwin amd64 binary" - -# Rename our binary -wrap mv vagrant vagrant-go_darwin_amd64 \ - "Failed to rename vagrant darwin amd64 binary" - -# Zip the binary -wrap zip vagrant-go_darwin_amd64 vagrant-go_darwin_amd64 \ - "Failed to compress go darwin amd64 binary" - -# Move the binary asset -wrap mv vagrant-go_darwin_amd64.zip ./generated-artifacts \ - "Failed to move Vagrant Go darwin amd64 build" - -info "Storing commit ID information..." -printf "%s\n" "${full_sha}" > ./generated-artifacts/commit-id.txt - -if github_draft_release_exists "vagrant" "${ident_ref}"; then - debug "found existing draft release for %s, deleting existing drafts" "${ident_ref}" - github_delete_draft_release "${ident_ref}" -fi - -info "Storing artifacts in draft release '%s'..." "${ident_ref}" - -# Store the artifacts for the builders -draft_release "${ident_ref}" ./generated-artifacts diff --git a/.ci/init.sh b/.ci/init.sh deleted file mode 100644 index b46e51ff3..000000000 --- a/.ci/init.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env bash - -. "${root}/.ci/load-ci.sh" - -export DEBIAN_FRONTEND="noninteractive" -export PATH="${PATH}:${root}/.ci" diff --git a/.ci/test.sh b/.ci/test.sh deleted file mode 100755 index f7ad3b2a0..000000000 --- a/.ci/test.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env bash - -csource="${BASH_SOURCE[0]}" -while [ -h "$csource" ] ; do csource="$(readlink "$csource")"; done -root="$( cd -P "$( dirname "$csource" )/../" && pwd )" - -pushd "${root}" > /dev/null - -export DEBIAN_FRONTEND="noninteractive" - -# Install required dependencies -sudo apt-get update || exit 1 -sudo apt-get install -yq bsdtar || exit 1 - -# Ensure bundler is installed -gem install --no-document bundler || exit 1 - -# Install the bundle -bundle install || exit 1 - -# Run tests -bundle exec rake test:unit - -result=$? -popd > /dev/null - -exit $result diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 4769e0946..000000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,35 +0,0 @@ -on: - push: - branches: - - main - paths-ignore: - - 'CHANGELOG.md' - - 'website/**' - -concurrency: build - -permissions: - contents: write - -jobs: - build-gem: - if: github.repository == 'hashicorp/vagrant' - name: Build Vagrant RubyGem - runs-on: ubuntu-latest - steps: - - name: Code Checkout - uses: actions/checkout@v1 - - name: Setup Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: '3.1' - - name: Setup Go - uses: actions/setup-go@v3 - with: - go-version-file: go.mod - - name: Build RubyGem and binary - run: ./.ci/build.sh - working-directory: ${{github.workspace}} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}