diff options
author | Evan Ahlberg <evanahlberg@gmail.com> | 2023-02-07 16:42:04 -0500 |
---|---|---|
committer | Evan Ahlberg <evanahlberg@gmail.com> | 2023-02-07 16:42:04 -0500 |
commit | a93a8fb6dec9f7214a58565e7695d8af6c1f1b6a (patch) | |
tree | da8cdf8aafede99dfb645351305ab9869eeb3eab /.expeditor | |
parent | ea5ee1d54abae873a1f60427fcfe5ae3f93a9fbd (diff) | |
download | chef-a93a8fb6dec9f7214a58565e7695d8af6c1f1b6a.tar.gz |
backport chef-18 pipelines to chef-16
Signed-off-by: Evan Ahlberg <evanahlberg@gmail.com>
Diffstat (limited to '.expeditor')
-rw-r--r-- | .expeditor/config.yml | 27 | ||||
-rwxr-xr-x | .expeditor/scripts/bk_container_prep.sh | 9 | ||||
-rw-r--r-- | .expeditor/scripts/download_built_omnibus_pkgs.ps1 | 11 | ||||
-rwxr-xr-x | .expeditor/scripts/download_built_omnibus_pkgs.sh | 59 | ||||
-rw-r--r-- | .expeditor/scripts/omnibus_chef_build.ps1 | 71 | ||||
-rwxr-xr-x | .expeditor/scripts/omnibus_chef_build.sh | 54 | ||||
-rw-r--r-- | .expeditor/scripts/omnibus_chef_publish.rb | 93 | ||||
-rw-r--r-- | .expeditor/scripts/prep_and_run_tests.ps1 | 27 | ||||
-rwxr-xr-x | .expeditor/scripts/prep_and_run_tests.sh | 47 | ||||
-rw-r--r-- | .expeditor/verify.adhoc.pipeline.yml | 12 | ||||
-rw-r--r-- | .expeditor/verify.pipeline.yml | 286 |
11 files changed, 407 insertions, 289 deletions
diff --git a/.expeditor/config.yml b/.expeditor/config.yml index d89ce72157..cc9441daf1 100644 --- a/.expeditor/config.yml +++ b/.expeditor/config.yml @@ -27,6 +27,26 @@ schedules: pipelines: - verify: public: true + env: + - IGNORE_ARTIFACTORY_RUBY_PROXY: true # Artifactory is throwing 500's when downloading some gems. + - validate/release: + definition: .expeditor/verify.pipeline.yml + env: + - IGNORE_CACHE: true # caching causes constant build failures + - IGNORE_ARTIFACTORY_RUBY_PROXY: true + - validate/adhoc: + definition: .expeditor/verify.adhoc.pipeline.yml + env: + - ADHOC: true + - IGNORE_CACHE: true # caching causes constant build failures + - IGNORE_ARTIFACTORY_RUBY_PROXY: true # Artifactory is throwing 500's when downloading some gems. + - validate/adhoc-canary: + canary: true + definition: .expeditor/verify.adhoc.pipeline.yml + env: + - ADHOC: true + - IGNORE_CACHE: true # caching causes constant build failures + - IGNORE_ARTIFACTORY_RUBY_PROXY: true # Artifactory is throwing 500's when downloading some gems. - docker/build - habitat/build - habitat/test: @@ -104,7 +124,12 @@ subscriptions: - "Expeditor: Skip Habitat" - "Expeditor: Skip All" only_if: built_in:bump_version - - trigger_pipeline:omnibus/release: + # - trigger_pipeline:omnibus/release: + # ignore_labels: + # - "Expeditor: Skip Omnibus" + # - "Expeditor: Skip All" + # only_if: built_in:bump_version + - trigger_pipeline:validate/release: ignore_labels: - "Expeditor: Skip Omnibus" - "Expeditor: Skip All" diff --git a/.expeditor/scripts/bk_container_prep.sh b/.expeditor/scripts/bk_container_prep.sh index e065f20579..20937b7eb8 100755 --- a/.expeditor/scripts/bk_container_prep.sh +++ b/.expeditor/scripts/bk_container_prep.sh @@ -1,10 +1,11 @@ # This script gets a container ready to run our various tests in BuildKite -echo "--- Container Config..." - -source /etc/os-release -echo $PRETTY_NAME +# Install Chef Foundation +echo "--- Installing Chef Foundation" +curl -fsSL https://omnitruck.chef.io/chef/install.sh | bash -s -- -c "current" -P "chef-foundation" -v "$CHEF_FOUNDATION_VERSION" +export PATH="/opt/chef/bin:${PATH}" +echo "--- Container Config..." echo "ruby version:" ruby -v echo "bundler version:" diff --git a/.expeditor/scripts/download_built_omnibus_pkgs.ps1 b/.expeditor/scripts/download_built_omnibus_pkgs.ps1 new file mode 100644 index 0000000000..7f337857ea --- /dev/null +++ b/.expeditor/scripts/download_built_omnibus_pkgs.ps1 @@ -0,0 +1,11 @@ +$ErrorActionPreference = "Stop" + +Write-Host "--- Installing package from BuildKite" +buildkite-agent artifact download "pkg\*.msi" . --step "${Env:OMNIBUS_BUILDER_KEY}" +$package_file = (Get-ChildItem pkg -Filter "*.msi").FullName + +Write-Output "--- Installing $package_file" +Start-Process "$package_file" /quiet -Wait + +Write-Output "--- Deleting $package_file" +Remove-Item -Force "$package_file" -ErrorAction SilentlyContinue
\ No newline at end of file diff --git a/.expeditor/scripts/download_built_omnibus_pkgs.sh b/.expeditor/scripts/download_built_omnibus_pkgs.sh new file mode 100755 index 0000000000..d8d7311ceb --- /dev/null +++ b/.expeditor/scripts/download_built_omnibus_pkgs.sh @@ -0,0 +1,59 @@ +#! /bin/bash +set -eu -o pipefail + +echo "--- Installing package from BuildKite" + +if [[ $OSTYPE == "msys" ]]; then + buildkite-agent artifact download "pkg\*.msi" . --step "$OMNIBUS_BUILDER_KEY" + package_file=$(find pkg/*) +else + extensions=( deb rpm amd64.sh ) + for ext in "${extensions[@]}" + do + buildkite-agent artifact download "pkg/*.${ext}" . --step "$OMNIBUS_BUILDER_KEY" || true + done + package_file=$(find pkg/*) +fi + +if [[ -z $package_file ]]; then + buildkite-agent annotate "Failed to download packages from the $OMNIBUS_BUILDER_KEY builder." --style "warning" --context "ctx-warn" || true + exit 1 +fi + +# if [[ -v $OMNIBUS_RPM_SIGNING_PASSPHRASE ]]; then +# case "$package_file" in +# *.rpm) +# echo "--- Checking that $package_file has been signed." +# if [[ $(rpm -qpi "$package_file" 2>&1 | grep -c "Signature.*Key ID") -eq 1 ]]; then +# echo "Verified $package_file has been signed." +# else +# echo "Exiting with an error because $package_file has not been signed. Check your omnibus project config." +# exit 1 +# fi +# ;; +# esac +# fi + +echo "--- Installing ${package_file}" +FILE_TYPE="${package_file##*.}" +case "$FILE_TYPE" in + "rpm") + if [[ "${IGNORE_INSTALL_DEPENDENCIES:-false}" == true ]]; then + IGNORE_DEPENDS_OPTION="--nodeps" + fi + sudo rpm -Uvh ${IGNORE_DEPENDS_OPTION:-} --oldpackage --replacepkgs "$package_file" + ;; + "deb") + if [[ "${IGNORE_INSTALL_DEPENDENCIES:-false}" == true ]]; then + IGNORE_DEPENDS_OPTION="--force-depends" + fi + sudo dpkg ${IGNORE_DEPENDS_OPTION:-} -i "$package_file" + ;; + "sh" ) + sudo sh "$package_file" + ;; + *) + echo "Unknown filetype: $FILE_TYPE" + exit 1 + ;; +esac
\ No newline at end of file diff --git a/.expeditor/scripts/omnibus_chef_build.ps1 b/.expeditor/scripts/omnibus_chef_build.ps1 new file mode 100644 index 0000000000..bcedaa1b60 --- /dev/null +++ b/.expeditor/scripts/omnibus_chef_build.ps1 @@ -0,0 +1,71 @@ +$ScriptDir = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent + +if ($env:BUILDKITE_ORGANIZATION_SLUG -eq "chef-oss" ) +{ + Write-Output "--- Generating self-signed Windows package signing certificate" + $thumb = (New-SelfSignedCertificate -Type Custom -Subject "CN=Chef Software, O=Progress, C=US" -KeyUsage DigitalSignature -FriendlyName "Chef Software Inc." -CertStoreLocation "Cert:\LocalMachine\My" -TextExtension @("2.5.29.37={text}1.3.6.1.5.5.7.3.3", "2.5.29.19={text}")).Thumbprint +} +else +{ + Write-Output "--- Installing Windows package signing certificate" + $windows_certificate_json = "windows-package-signing-certificate.json" + $windows_certificate_pfx = "windows-package-signing-certificate.pfx" + + aws ssm get-parameter --name "windows-package-signing-cert" --with-decryption --region "us-west-1" --query Parameter.Value --output text | Set-Content -Path $windows_certificate_json + If ($lastexitcode -ne 0) { Throw $lastexitcode } + + $cert_passphrase = Get-Content $windows_certificate_json | ConvertFrom-Json | Select-Object -ExpandProperty cert_passphrase | ConvertTo-SecureString -asplaintext -force + Get-Content $windows_certificate_json | ConvertFrom-Json | Select-Object -ExpandProperty cert_content_base64 | Set-Content -Path $windows_certificate_pfx + Remove-Item -Force $windows_certificate_json + Import-PfxCertificate $windows_certificate_pfx -CertStoreLocation Cert:\LocalMachine\My -Password $cert_passphrase + Remove-Item -Force $windows_certificate_pfx + $thumb = "13B510D1CF1B3467856A064F1BEA12D0884D2528" +} + +Write-Output "THUMB=$thumb" + +$env:ARTIFACTORY_BASE_PATH="com/getchef" +$env:ARTIFACTORY_ENDPOINT="https://artifactory-internal.ps.chef.co/artifactory" +$env:ARTIFACTORY_USERNAME="buildkite" + +Write-Output "--- Install Chef Foundation" +. { Invoke-WebRequest -useb https://omnitruck.chef.io/chef/install.ps1 } | Invoke-Expression; install -channel "current" -project "chef-foundation" -v $CHEF_FOUNDATION_VERSION + +$env:PROJECT_NAME="chef" +$env:OMNIBUS_PIPELINE_DEFINITION_PATH="${ScriptDir}/../release.omnibus.yaml" +$env:OMNIBUS_SIGNING_IDENTITY="${thumb}" +$env:HOMEDRIVE = "C:" +$env:HOMEPATH = "\Users\ContainerAdministrator" +$env:OMNIBUS_TOOLCHAIN_INSTALL_DIR = "C:\opscode\omnibus-toolchain" +$env:SSL_CERT_FILE = "${env:OMNIBUS_TOOLCHAIN_INSTALL_DIR}\embedded\ssl\certs\cacert.pem" +$env:MSYS2_INSTALL_DIR = "C:\msys64" +$env:BASH_ENV = "${env:MSYS2_INSTALL_DIR}\etc\bash.bashrc" +$env:OMNIBUS_WINDOWS_ARCH = "x64" +$env:MSYSTEM = "MINGW64" +$omnibus_toolchain_msystem = & "${env:OMNIBUS_TOOLCHAIN_INSTALL_DIR}\embedded\bin\ruby" -e "puts RUBY_PLATFORM" +If ($omnibus_toolchain_msystem -eq "x64-mingw-ucrt") { + $env:MSYSTEM = "UCRT64" +} +$original_path = $env:PATH +$env:PATH = "${env:MSYS2_INSTALL_DIR}\$env:MSYSTEM\bin;${env:MSYS2_INSTALL_DIR}\usr\bin;${env:OMNIBUS_TOOLCHAIN_INSTALL_DIR}\embedded\bin;C:\wix;C:\Program Files (x86)\Windows Kits\8.1\bin\x64;${original_path}" +Write-Output "env:PATH = $env:PATH" + +Write-Output "--- Running bundle install for Omnibus" +Set-Location "$($ScriptDir)/../../omnibus" +bundle config set --local without development +bundle install + +Write-Output "--- Building Chef" +bundle exec omnibus build chef -l internal --override append_timestamp:false + +Write-Output "--- Uploading package to BuildKite" +C:\buildkite-agent\bin\buildkite-agent.exe artifact upload "pkg/*.msi*" + +if ($env:BUILDKITE_ORGANIZATION_SLUG -ne "chef-oss" ) +{ + Write-Output "--- Setting up Gem API Key" + $env:GEM_HOST_API_KEY = "Basic ${env:ARTIFACTORY_API_KEY}" + + Write-Output "--- Publishing package to Artifactory" + bundle exec ruby "${ScriptDir}/omnibus_chef_publish.rb" +} diff --git a/.expeditor/scripts/omnibus_chef_build.sh b/.expeditor/scripts/omnibus_chef_build.sh new file mode 100755 index 0000000000..3c4130a8c3 --- /dev/null +++ b/.expeditor/scripts/omnibus_chef_build.sh @@ -0,0 +1,54 @@ +#!/bin/bash +set -ueo pipefail + +SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) + +export ARTIFACTORY_BASE_PATH="com/getchef" +export ARTIFACTORY_ENDPOINT="https://artifactory-internal.ps.chef.co/artifactory" +export ARTIFACTORY_USERNAME="buildkite" + +export PROJECT_NAME="chef" +export PATH="/opt/omnibus-toolchain/bin:${PATH}" +export OMNIBUS_FIPS_MODE="true" +export OMNIBUS_PIPELINE_DEFINITION_PATH="${SCRIPT_DIR}/../release.omnibus.yaml" + +echo "--- Installing Chef Foundation" +curl -fsSL https://omnitruck.chef.io/chef/install.sh | bash -s -- -c "current" -P "chef-foundation" -v "$CHEF_FOUNDATION_VERSION" + +if [[ -f "/opt/omnibus-toolchain/embedded/ssl/certs/cacert.pem" ]]; then + export SSL_CERT_FILE="/opt/omnibus-toolchain/embedded/ssl/certs/cacert.pem" +fi + +if [[ "$BUILDKITE_LABEL" =~ rhel|sles|centos ]] && [[ $BUILDKITE_ORGANIZATION_SLUG != "chef-oss" ]]; then + export OMNIBUS_RPM_SIGNING_PASSPHRASE='' + + echo "$RPM_SIGNING_KEY" | gpg --import + + cat <<-EOF > ~/.rpmmacros + %_signature gpg + %_gpg_name Opscode Packages +EOF +fi + +echo "--- Running bundle install for Omnibus" +cd "${SCRIPT_DIR}/../../omnibus" +bundle config set --local without development +bundle install + +echo "--- Building Chef" +bundle exec omnibus build chef -l internal --override append_timestamp:false + +echo "--- Uploading package to BuildKite" +extensions=( bff deb dmg msi p5p rpm solaris amd64.sh i386.sh ) +for ext in "${extensions[@]}" +do + buildkite-agent artifact upload "pkg/*.${ext}*" +done + +if [[ $BUILDKITE_ORGANIZATION_SLUG != "chef-oss" ]]; then + echo "--- Setting up Gem credentials" + export GEM_HOST_API_KEY="Basic ${ARTIFACTORY_API_KEY}" + + echo "--- Publishing package to Artifactory" + bundle exec ruby "${SCRIPT_DIR}/omnibus_chef_publish.rb" +fi
\ No newline at end of file diff --git a/.expeditor/scripts/omnibus_chef_publish.rb b/.expeditor/scripts/omnibus_chef_publish.rb new file mode 100644 index 0000000000..9413e9740d --- /dev/null +++ b/.expeditor/scripts/omnibus_chef_publish.rb @@ -0,0 +1,93 @@ +#!/usr/bin/env ruby + +require 'artifactory' +require 'fileutils' +require 'json' +require 'omnibus' +require 'tempfile' +require 'rubygems/commands/push_command' +require 'yaml' + +OMNIBUS_PACKAGE_PATTERN = '**/{pkg,notarized}/*.{bff,deb,dmg,msi,p5p,rpm,solaris,amd64.sh,i386.sh}'.freeze + +def self.env_or_empty(key) + ENV[key] || '' +end + +def self.env_or_raise(key) + ENV[key] || raise("Required ENV variable `#{key}` is unset!") +end + +project_name = env_or_raise('PROJECT_NAME') +omnibus_pipeline_definition_path = env_or_raise('OMNIBUS_PIPELINE_DEFINITION_PATH') +artifactory_endpoint = env_or_raise('ARTIFACTORY_ENDPOINT') +artifactory_base_path = env_or_raise('ARTIFACTORY_BASE_PATH') +artifactory_username = env_or_raise('ARTIFACTORY_USERNAME') +artifactory_password = env_or_raise('ARTIFACTORY_PASSWORD') + +package_glob_pattern = "./#{OMNIBUS_PACKAGE_PATTERN}" + +puts "Publishing with glob pattern of #{package_glob_pattern}" +puts '' + +if File.exist?(omnibus_pipeline_definition_path) + omnibus_pipeline_definition = YAML.safe_load(File.read(omnibus_pipeline_definition_path)) + skip_artifactory_platforms = omnibus_pipeline_definition["skip-artifactory-platforms"] || [] + builder_to_testers_map = omnibus_pipeline_definition['builder-to-testers-map'] + + skip_artifactory_platforms.each do |skip_platform| + builder_to_testers_map.each { |builder, tester| tester.reject! { |tester| File.fnmatch(skip_platform, tester) } }.reject! { |builder, tester| tester.empty? } + end +end + +Omnibus::Config.artifactory_endpoint(artifactory_endpoint) +Omnibus::Config.artifactory_base_path(artifactory_base_path) +Omnibus::Config.artifactory_username(artifactory_username) +Omnibus::Config.artifactory_password(artifactory_password) +publisher = Omnibus::ArtifactoryPublisher.new( + package_glob_pattern, + repository: 'omnibus-unstable-local', + platform_mappings: builder_to_testers_map, + build_record: false +) + +if publisher.packages.empty? + puts "Could not locate any #{project_name} artifacts to publish." + return +else + publisher.publish do |package| + puts "Published '#{package.name}' for #{package.metadata[:platform]}-#{package.metadata[:platform_version]}-#{package.metadata[:arch]}" + end + + puts <<-EOH + +DONE! \\m/ + + EOH +end + +# This publishes the chef gem to artifactory +if (project_name == "chef") && (ENV['ADHOC'] != 'true') + GEM_PACKAGE_PATTERN = '**/[^/]*\.gem'.freeze + gem_base_name = project_name + project_source = "#{Omnibus::Config.base_dir}/**/src/#{gem_base_name}" + + # This will exclude any gems in a /spec/ directory + gems_found = Dir.glob("#{project_source}/#{GEM_PACKAGE_PATTERN}") - Dir.glob("#{project_source}/**/spec/#{GEM_PACKAGE_PATTERN}") + + # Sometimes there are multiple copies of a gem on disk -- only upload one copy. + gems_to_publish = gems_found.uniq { |gem| File.basename(gem) } + + puts "Publishing Gems from #{project_source}" + puts '' + + gems_to_publish.each do |gem_path| + puts 'Publishing gem ' + gem_path + artifactory_endpoint = "#{Omnibus::Config.artifactory_endpoint}/api/gems/omnibus-gems-local" + # This mimics the behavior of the gem command line, and is a public api: + # http://docs.seattlerb.org/rubygems/Gem/Command.html + gem_pusher = Gem::Commands::PushCommand.new + gem_pusher.handle_options [gem_path, '--host', artifactory_endpoint, '--verbose'] + gem_pusher.execute + end +end diff --git a/.expeditor/scripts/prep_and_run_tests.ps1 b/.expeditor/scripts/prep_and_run_tests.ps1 new file mode 100644 index 0000000000..76e475cd8a --- /dev/null +++ b/.expeditor/scripts/prep_and_run_tests.ps1 @@ -0,0 +1,27 @@ +param( + # The test type ot be run (unit, integration or functional) + [Parameter(Position=0)][String]$TestType +) + +. { Invoke-WebRequest -useb https://omnitruck.chef.io/chef/install.ps1 } | Invoke-Expression; install -channel "current" -project "chef-foundation" -v $CHEF_FOUNDATION_VERSION +$env:Path = 'C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\ProgramData\chocolatey\bin;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\Git\cmd;C:\Users\ContainerAdministrator\AppData\Local\Microsoft\WindowsApps;C:\opscode\chef\bin;C:\opscode\chef\embedded\bin' + +if ($TestType -eq 'Functional') { + winrm quickconfig -q +} + +Write-Output "--- Running Chef bundle install" +bundle install --jobs=3 --retry=3 + +switch ($TestType) { + "Unit" {[string[]]$RakeTest = 'spec:unit','component_specs'; break} + "Integration" {[string[]]$RakeTest = "spec:integration"; break} + "Functional" {[string[]]$RakeTest = "spec:functional"; break} + default {throw "TestType $TestType not valid"} +} + +foreach($test in $RakeTest) { + Write-Output "--- Chef $test run" + bundle exec rake $test + if (-not $?) { throw "Chef $test tests failed" } +}
\ No newline at end of file diff --git a/.expeditor/scripts/prep_and_run_tests.sh b/.expeditor/scripts/prep_and_run_tests.sh new file mode 100755 index 0000000000..221f6e13cc --- /dev/null +++ b/.expeditor/scripts/prep_and_run_tests.sh @@ -0,0 +1,47 @@ +#!/usr/bin/env bash + +set -euo pipefail + +if [ -z "$1" ] + then + echo "No TestType supplied" +fi + +TestType=$1 + +curl -fsSL https://omnitruck.chef.io/chef/install.sh | bash -s -- -c "current" -P "chef-foundation" -v "$CHEF_FOUNDATION_VERSION" +export PATH="/opt/chef/bin:${PATH}" + +if [ "$TestType" == "Unit" ] +then + mkdir spec/data/nodes && touch spec/data/nodes/test.rb && touch spec/data/nodes/default.rb && touch spec/data/nodes/test.example.com.rb +fi + +echo "--- Running Chef bundle install" +bundle install --jobs=3 --retry=3 + +case $TestType in + + Unit) + RakeTest=("spec:unit" "component_specs") + ;; + + Integration) + RakeTest=("spec:integration") + ;; + + Functional) + RakeTest=("spec:functional") + ;; + + *) + echo -e "\nTestType $TestType not valid\n" >&2 + exit 1 + ;; +esac + +for test in "${RakeTest[@]}" +do + echo "--- Chef $test run" + bundle exec rake "$test" +done
\ No newline at end of file diff --git a/.expeditor/verify.adhoc.pipeline.yml b/.expeditor/verify.adhoc.pipeline.yml new file mode 100644 index 0000000000..12f140bdb4 --- /dev/null +++ b/.expeditor/verify.adhoc.pipeline.yml @@ -0,0 +1,12 @@ +--- +expeditor: + defaults: + buildkite: + retry: + automatic: + limit: 1 + timeout_in_minutes: 60 + +steps: + - command: .buildkite/verify.adhoc.pipeline.sh | buildkite-agent pipeline upload + label: ":pipeline: Upload" diff --git a/.expeditor/verify.pipeline.yml b/.expeditor/verify.pipeline.yml index 007dfd9725..579fd42f5f 100644 --- a/.expeditor/verify.pipeline.yml +++ b/.expeditor/verify.pipeline.yml @@ -1,7 +1,5 @@ --- expeditor: - cached_folders: - - vendor defaults: buildkite: retry: @@ -10,285 +8,5 @@ expeditor: timeout_in_minutes: 60 steps: - -######################################################################### - # Tests Ruby 2.7 -######################################################################### - -- label: "Integration Ubuntu 18.04 :ruby: 2.7" - commands: - - /workdir/.expeditor/scripts/bk_container_prep.sh - - cd /workdir; bundle config set --local without omnibus_package - - cd /workdir; bundle install --jobs=3 --retry=3 --path=vendor/bundle - - bundle exec rake spec:integration - expeditor: - executor: - docker: - image: rubydistros/ubuntu-18.04:2.7 - privileged: true - -- label: "Functional Ubuntu 18.04 :ruby: 2.7" - commands: - - /workdir/.expeditor/scripts/bk_container_prep.sh - - apt-get update -y - - apt-get install -y cron locales # needed for functional tests to pass - - cd /workdir; bundle config set --local without omnibus_package ruby_prof - - cd /workdir; bundle install --jobs=3 --retry=3 --path=vendor/bundle - - bundle exec rake spec:functional - expeditor: - executor: - docker: - image: rubydistros/ubuntu-18.04:2.7 - privileged: true - -- label: "Unit Ubuntu 18.04 :ruby: 2.7" - commands: - - /workdir/.expeditor/scripts/bk_container_prep.sh - - bundle config set --local without omnibus_package ruby_prof - - bundle install --jobs=3 --retry=3 --path=vendor/bundle - - bundle exec rake spec:unit - - bundle exec rake component_specs - expeditor: - executor: - docker: - image: rubydistros/ubuntu-18.04:2.7 - -- label: "Integration Ubuntu 20.04 :ruby: 2.7" - commands: - - /workdir/.expeditor/scripts/bk_container_prep.sh - - cd /workdir; bundle config set --local without omnibus_package - - cd /workdir; bundle install --jobs=3 --retry=3 --path=vendor/bundle - - bundle exec rake spec:integration - expeditor: - executor: - docker: - image: rubydistros/ubuntu-20.04:2.7 - privileged: true - -- label: "Functional Ubuntu 20.04 :ruby: 2.7" - commands: - - /workdir/.expeditor/scripts/bk_container_prep.sh - - apt-get update -y - - apt-get install -y cron locales # needed for functional tests to pass - - cd /workdir; bundle config set --local without omnibus_package ruby_prof - - cd /workdir; bundle install --jobs=3 --retry=3 --path=vendor/bundle - - bundle exec rake spec:functional - expeditor: - executor: - docker: - image: rubydistros/ubuntu-20.04:2.7 - privileged: true - -- label: "Unit Ubuntu 20.04 :ruby: 2.7" - commands: - - /workdir/.expeditor/scripts/bk_container_prep.sh - - bundle config set --local without omnibus_package ruby_prof - - bundle install --jobs=3 --retry=3 --path=vendor/bundle - - bundle exec rake spec:unit - - bundle exec rake component_specs - expeditor: - executor: - docker: - image: rubydistros/ubuntu-20.04:2.7 - -- label: "Integration CentOS 7 :ruby: 2.7" - commands: - - /workdir/.expeditor/scripts/bk_container_prep.sh - - cd /workdir; bundle config set --local without omnibus_package - - cd /workdir; bundle install --jobs=3 --retry=3 --path=vendor/bundle - - bundle exec rake spec:integration - expeditor: - executor: - docker: - image: rubydistros/centos-7:2.7 - privileged: true - -- label: "Functional CentOS 7 :ruby: 2.7" - commands: - - /workdir/.expeditor/scripts/bk_container_prep.sh - - yum install -y crontabs e2fsprogs - - cd /workdir; bundle config set --local without omnibus_package ruby_prof - - cd /workdir; bundle install --jobs=3 --retry=3 --path=vendor/bundle - - bundle exec rake spec:functional - expeditor: - executor: - docker: - image: rubydistros/centos-7:2.7 - privileged: true - -- label: "Unit CentOS 7 :ruby: 2.7" - commands: - - /workdir/.expeditor/scripts/bk_container_prep.sh - - bundle config set --local without omnibus_package ruby_prof - - bundle install --jobs=3 --retry=3 --path=vendor/bundle - - bundle exec rake spec:unit - - bundle exec rake component_specs - expeditor: - executor: - docker: - image: rubydistros/centos-7:2.7 - -- label: "Integration openSUSE 15 :ruby: 2.7" - commands: - - /workdir/.expeditor/scripts/bk_container_prep.sh - - /workdir/.expeditor/scripts/zypper_prep.sh - - zypper install -y cron insserv-compat - - cd /workdir; bundle config set --local without omnibus_package - - cd /workdir; bundle install --jobs=3 --retry=3 --path=vendor/bundle - - bundle exec rake spec:integration - expeditor: - executor: - docker: - image: rubydistros/opensuse-15:2.7 - privileged: true - -- label: "Functional openSUSE 15 :ruby: 2.7" - commands: - - /workdir/.expeditor/scripts/bk_container_prep.sh - - /workdir/.expeditor/scripts/zypper_prep.sh - - zypper install -y cronie insserv-compat - - cd /workdir; bundle config set --local without omnibus_package ruby_prof - - cd /workdir; bundle install --jobs=3 --retry=3 --path=vendor/bundle - - bundle exec rake spec:functional - expeditor: - executor: - docker: - image: rubydistros/opensuse-15:2.7 - privileged: true - -- label: "Unit openSUSE 15 :ruby: 2.7" - commands: - - /workdir/.expeditor/scripts/bk_container_prep.sh - - /workdir/.expeditor/scripts/zypper_prep.sh - - zypper install -y cron insserv-compat - - bundle config set --local without omnibus_package ruby_prof - - bundle install --jobs=3 --retry=3 --path=vendor/bundle - - bundle exec rake spec:unit - - bundle exec rake component_specs - expeditor: - executor: - docker: - image: rubydistros/opensuse-15:2.7 - -- label: "Integration Fedora :ruby: 2.7" - commands: - - /workdir/.expeditor/scripts/bk_container_prep.sh - - cd /workdir; bundle config set --local without omnibus_package - - cd /workdir; bundle install --jobs=3 --retry=3 --path=vendor/bundle - - bundle exec rake spec:integration - expeditor: - executor: - docker: - image: rubydistros/fedora-latest:2.7 - privileged: true - -- label: "Functional Fedora :ruby: 2.7" - commands: - - /workdir/.expeditor/scripts/bk_container_prep.sh - - dnf install -y crontabs e2fsprogs - - cd /workdir; bundle config set --local without omnibus_package ruby_prof - - cd /workdir; bundle install --jobs=3 --retry=3 --path=vendor/bundle - - bundle exec rake spec:functional - expeditor: - executor: - docker: - image: rubydistros/fedora-latest:2.7 - privileged: true - environment: - - FORCE_FFI_YAJL=ext - - CHEF_LICENSE=accept-no-persist - -- label: "Unit Fedora :ruby: 2.7" - commands: - - /workdir/.expeditor/scripts/bk_container_prep.sh - - bundle config set --local without omnibus_package ruby_prof - - bundle install --jobs=3 --retry=3 --path=vendor/bundle - - bundle exec rake spec:unit - - bundle exec rake component_specs - expeditor: - executor: - docker: - image: rubydistros/fedora-latest:2.7 - -- label: "Functional Windows :ruby: 2.7" - commands: - - .expeditor/scripts/bk_win_functional.ps1 - expeditor: - executor: - windows: - privileged: true - single-use: true - shell: ["powershell", "-Command"] - -- label: "Integration Windows :ruby: 2.7" - commands: - - /workdir/.expeditor/scripts/bk_win_integration.ps1 - expeditor: - executor: - docker: - host_os: windows - image: rubydistros/windows-2019:2.7 - environment: - - FORCE_FFI_YAJL=ext - - CHEF_LICENSE=accept-no-persist - shell: ["powershell", "-Command"] - -- label: "Chocolatey Windows :ruby: 2.7" - commands: - - /workdir/.expeditor/scripts/bk_run_choco.ps1 - expeditor: - executor: - docker: - host_os: windows - image: rubydistros/windows-2019:2.7 - shell: ["powershell", "-Command"] - -- label: "Unit Windows :ruby: 2.7" - commands: - - /workdir/.expeditor/scripts/bk_win_unit.ps1 - expeditor: - executor: - docker: - host_os: windows - image: rubydistros/windows-2019:2.7 - environment: - - FORCE_FFI_YAJL=ext - - CHEF_LICENSE=accept-no-persist - shell: ["powershell", "-Command"] - -######################################################################### - # HABITAT TESTING -######################################################################### - -- label: ":habicat: Linux plan" - commands: - - sudo ./.expeditor/scripts/install-hab.sh 'x86_64-linux' - - sudo ./.expeditor/scripts/verify-plan.sh - timeout_in_minutes: 60 - expeditor: - executor: - linux: - privileged: true - single-use: true - -- label: ":habicat: Linux plan (kernel2)" - commands: - - sudo ./.expeditor/scripts/install-hab.sh 'x86_64-linux-kernel2' - - sudo ./.expeditor/scripts/verify-plan.sh - timeout_in_minutes: 60 - expeditor: - executor: - linux: - privileged: true - single-use: true - -- label: ":habicat: Windows plan" - commands: - - ./.expeditor/scripts/verify-plan.ps1 - timeout_in_minutes: 60 - expeditor: - executor: - windows: - privileged: true - single-use: true - shell: ["powershell", "-Command"] + - command: .buildkite/verify.pipeline.sh | buildkite-agent pipeline upload + label: ":pipeline: Upload"
\ No newline at end of file |