diff --git a/.expeditor/automate_build.sh b/.expeditor/automate_build.sh index 564106d1ca..47a404971c 100755 --- a/.expeditor/automate_build.sh +++ b/.expeditor/automate_build.sh @@ -4,7 +4,6 @@ export ORIGIN=chef export HAB_ORIGIN=chef export HAB_LICENSE=accept-no-persist export OCTOKIT_ACCESS_TOKEN -export HAB_LICENSE=accept export CHEF_LICENSE="accept-no-persist" export CI=true export HAB_ORIGIN_KEYS=chef @@ -36,11 +35,6 @@ echo "generating package for nginx" openresty_hart=$(ls -1t results/chef-openresty*.hart | head -1) HAB_FEAT_OFFLINE_INSTALL=true HAB_FEAT_IGNORE_LOCAL=false HAB_ORIGIN=chef HAB_CACHE_KEY_PATH="$JOB_TEMP_ROOT/keys" DO_CHECK=true HAB_BLDR_CHANNEL=dev hab studio run -D "set -e; hab pkg install $openresty_hart; hab pkg build src/nginx" -cp $HAB_CACHE_KEY_PATH/* results -# tar -cvf results.tar results -# gzip results.tar -# buildkite-agent artifact upload results.tar.gz - git clone https://github.com/chef/automate.git cd automate git checkout vikas/cs-changes-for-pipeline @@ -48,7 +42,9 @@ git checkout vikas/cs-changes-for-pipeline RESOLVED_RESULTS_DIR=$(realpath results/) export DO_CHECK=true -cp ../results/*.hart ../results/chef*.pub ../results/chef*.key results +cp ../results/*.hart $HAB_CACHE_KEY_PATH/* results + +#cp ../results/*.hart ../results/chef*.pub ../results/chef*.key results ../.expeditor/replace.sh bookshelf_hart=$(ls -1t results/chef-bookshelf*.hart | head -1) chef_server_ctl_hart=$(ls -1t results/chef-chef-server-ctl*.hart | head -1) diff --git a/.expeditor/replace.sh b/.expeditor/replace.sh index bdbc64ca61..66c892ab1a 100755 --- a/.expeditor/replace.sh +++ b/.expeditor/replace.sh @@ -67,14 +67,11 @@ do fi done cp $tmp_file $plan_file - rm $tmp_file "${tmp_file}tmp" + rm $tmp_file echo "==================================" echo "file content after replace" cat $plan_file echo "==================================" - echo "results dir content" - ls results/*.hart - echo "==================================" done exit 0 diff --git a/.expeditor/verify.pipeline.yml b/.expeditor/verify.pipeline.yml index 9b2aac8ec5..96283b9774 100644 --- a/.expeditor/verify.pipeline.yml +++ b/.expeditor/verify.pipeline.yml @@ -12,343 +12,124 @@ steps: # Lint Tests ######################################################################### -# - label: license-scout -# command: -# - .expeditor/license_scout.sh -# expeditor: -# executor: -# docker: -# environment: -# - OCTOKIT_ACCESS_TOKEN +- label: license-scout + command: + - .expeditor/license_scout.sh + expeditor: + executor: + docker: + environment: + - OCTOKIT_ACCESS_TOKEN ######################################################################### # Component Tests ######################################################################### -# - label: omnibus -# command: -# - /workdir/scripts/bk_tests/bk_install.sh -# - gem uninstall bundler -v '>= 2.0.1' -a -# - cd /workdir/omnibus; make install -# - make ci -# expeditor: -# executor: -# docker: -# image: "chefes/a1-buildkite" -# environment: -# - LUALIB=~/.luarocks/lib/lua/5.2 -# - COMPONENT=omnibus - -# - label: chef-server-ctl -# command: -# - /workdir/scripts/bk_tests/bk_install.sh -# - cd /workdir/src/chef-server-ctl; make install -# - make ci -# expeditor: -# executor: -# docker: -# image: "chefes/a1-buildkite" -# environment: -# - COMPONENT=src/chef-server-ctl - -# - label: oc_erchef_unit -# command: -# - date -# - /workdir/scripts/bk_tests/bk_install.sh -# - date -# - cd /workdir/src/oc_erchef; make install -# - make ci_eunit -# - date -# expeditor: -# executor: -# docker: -# image: "chefes/a1-buildkite" -# environment: -# - PATH=/opt/asdf/shims:/opt/asdf/bin:/opt/ci-studio-common/bin:/go/bin:/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/chefdk/bin -# - PERL5LIB=~/perl5/lib/perl5/x86_64-linux-gnu-thread-multi:~/perl5/lib/perl5:/etc/perl:/usr/local/lib/perl/5.14.2:/usr/local/share/perl/5.14.2:/usr/lib/perl5:/usr/share/perl5:/usr/lib/perl/5.14:/usr/share/perl/5.14:/usr/local/lib/site_perl -# - LUALIB=~/.luarocks/lib/lua/5.2 -# - ELIXIR_VERSION=1.4 -# - COMPONENT=src/oc_ - -# - label: oc_erchef_ct -# command: -# - date -# - /workdir/scripts/bk_tests/bk_install.sh -# - date -# - cd /workdir/src/oc_erchef; make install -# - make ci_ct -# - date -# expeditor: -# executor: -# docker: -# image: "chefes/a1-buildkite" -# environment: -# - PATH=/opt/asdf/shims:/opt/asdf/bin:/opt/ci-studio-common/bin:/go/bin:/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/chefdk/bin -# - PERL5LIB=~/perl5/lib/perl5/x86_64-linux-gnu-thread-multi:~/perl5/lib/perl5:/etc/perl:/usr/local/lib/perl/5.14.2:/usr/local/share/perl/5.14.2:/usr/lib/perl5:/usr/share/perl5:/usr/lib/perl/5.14:/usr/share/perl/5.14:/usr/local/lib/site_perl -# - LUALIB=~/.luarocks/lib/lua/5.2 -# - ELIXIR_VERSION=1.4 -# - COMPONENT=src/oc_erchef - -# - label: oc-id -# command: -# - /workdir/scripts/bk_tests/bk_install.sh -# - cd /workdir/src/oc-id -# - make install ci -# expeditor: -# executor: -# docker: -# image: "chefes/a1-buildkite" -# environment: -# - COMPONENT=src/oc-id - -# - label: oc_bifrost -# command: -# - /workdir/scripts/bk_tests/bk_install.sh -# - cd /workdir/src/oc_bifrost; make install -# - make ci -# expeditor: -# executor: -# docker: -# image: "chefes/a1-buildkite" -# environment: -# - PATH=/opt/asdf/shims:/opt/asdf/bin:/opt/ci-studio-common/bin:/go/bin:/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/chefdk/bin -# - PERL5LIB=~/perl5/lib/perl5/x86_64-linux-gnu-thread-multi:~/perl5/lib/perl5:/etc/perl:/usr/local/lib/perl/5.14.2:/usr/local/share/perl/5.14.2:/usr/lib/perl5:/usr/share/perl5:/usr/lib/perl/5.14:/usr/share/perl/5.14:/usr/local/lib/site_perl -# - LUALIB=~/.luarocks/lib/lua/5.2 -# - COMPONENT=src/oc_bifrost - -# - label: bookshelf -# command: -# - /workdir/scripts/bk_tests/bk_install.sh -# - cd /workdir/src/bookshelf; make install -# - make ci -# expeditor: -# executor: -# docker: -# image: "chefes/a1-buildkite" -# environment: -# - PATH=/opt/asdf/shims:/opt/asdf/bin:/opt/ci-studio-common/bin:/go/bin:/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/chefdk/bin -# - PERL5LIB=~/perl5/lib/perl5/x86_64-linux-gnu-thread-multi:~/perl5/lib/perl5:/etc/perl:/usr/local/lib/perl/5.14.2:/usr/local/share/perl/5.14.2:/usr/lib/perl5:/usr/share/perl5:/usr/lib/perl/5.14:/usr/share/perl/5.14:/usr/local/lib/site_perl -# - LUALIB=~/.luarocks/lib/lua/5.2 -# - COMPONENT=src/bookshelf - -# ######################################################################### -# # Habitat Packages of Infra Server -# ######################################################################### - -# - label: bookshelf-hab -# command: -# - /workdir/.expeditor/habitat.sh -# expeditor: -# executor: -# docker: -# privileged: true -# environment: -# - OCTOKIT_ACCESS_TOKEN -# - HAB_LICENSE=accept -# - CHEF_LICENSE="accept-no-persist" -# - CI="true" -# - HAB_ORIGIN=chef -# - HAB_ORIGIN_KEYS=chef -# - HAB_STUDIO_SECRET_HAB_FEAT_IGNORE_LOCAL="true" -# - HAB_FEAT_IGNORE_LOCAL="true" -# - PACKAGE_NAME=bookshelf - -# - label: cs-nginx-hab -# command: -# - /workdir/.expeditor/habitat.sh -# expeditor: -# executor: -# docker: -# privileged: true -# environment: -# - OCTOKIT_ACCESS_TOKEN -# - HAB_LICENSE=accept -# - CHEF_LICENSE="accept-no-persist" -# - CI="true" -# - HAB_ORIGIN=chef -# - HAB_ORIGIN_KEYS=chef -# - HAB_STUDIO_SECRET_HAB_FEAT_IGNORE_LOCAL="true" -# - HAB_FEAT_IGNORE_LOCAL="true" -# - PACKAGE_NAME=nginx - -# # - label: chef-server-ctl-hab -# # command: -# # - /workdir/.expeditor/habitat.sh -# # expeditor: -# # executor: -# # docker: -# # privileged: true -# # environment: -# # - OCTOKIT_ACCESS_TOKEN -# # - HAB_LICENSE=accept -# # - CHEF_LICENSE="accept-no-persist" -# # - CI="true" -# # - HAB_ORIGIN=chef -# # - HAB_ORIGIN_KEYS=chef -# # - HAB_STUDIO_SECRET_HAB_FEAT_IGNORE_LOCAL="true" -# # - HAB_FEAT_IGNORE_LOCAL="true" -# # - PACKAGE_NAME=chef-server-ctl - -# - label: oc_bifrost-hab -# command: -# - /workdir/.expeditor/habitat.sh -# expeditor: -# executor: -# docker: -# privileged: true -# environment: -# - OCTOKIT_ACCESS_TOKEN -# - HAB_LICENSE=accept -# - CHEF_LICENSE="accept-no-persist" -# - CI="true" -# - HAB_ORIGIN=chef -# - HAB_ORIGIN_KEYS=chef -# - HAB_STUDIO_SECRET_HAB_FEAT_IGNORE_LOCAL="true" -# - HAB_FEAT_IGNORE_LOCAL="true" -# - PACKAGE_NAME=oc_bifrost - -# - label: oc_erchef-hab -# command: -# - /workdir/.expeditor/habitat.sh -# expeditor: -# executor: -# docker: -# privileged: true -# environment: -# - OCTOKIT_ACCESS_TOKEN -# - HAB_LICENSE=accept -# - CHEF_LICENSE="accept-no-persist" -# - CI="true" -# - HAB_ORIGIN=chef -# - HAB_ORIGIN_KEYS=chef -# - HAB_STUDIO_SECRET_HAB_FEAT_IGNORE_LOCAL="true" -# - HAB_FEAT_IGNORE_LOCAL="true" -# - PACKAGE_NAME=oc_erchef - -# - label: openresty-noroot-hab -# command: -# - /workdir/.expeditor/habitat.sh -# expeditor: -# executor: -# docker: -# privileged: true -# environment: -# - OCTOKIT_ACCESS_TOKEN -# - HAB_LICENSE=accept -# - CHEF_LICENSE="accept-no-persist" -# - CI="true" -# - HAB_ORIGIN=chef -# - HAB_ORIGIN_KEYS=chef -# - HAB_STUDIO_SECRET_HAB_FEAT_IGNORE_LOCAL="true" -# - HAB_FEAT_IGNORE_LOCAL="true" -# - PACKAGE_NAME=openresty-noroot - -# - label: oc_id-hab -# command: -# - /workdir/.expeditor/habitat.sh -# expeditor: -# executor: -# docker: -# privileged: true -# environment: -# - OCTOKIT_ACCESS_TOKEN -# - HAB_LICENSE=accept -# - CHEF_LICENSE="accept-no-persist" -# - CI="true" -# - HAB_ORIGIN=chef -# - HAB_ORIGIN_KEYS=chef -# - HAB_STUDIO_SECRET_HAB_FEAT_IGNORE_LOCAL="true" -# - HAB_FEAT_IGNORE_LOCAL="true" -# - PACKAGE_NAME=oc-id - -# ######################################################################### -# # Tests for Chef-Automate -# ######################################################################### - -# - label: "chef server" -# command: -# - /workdir/integration/run_test /workdir/integration/tests/chef_server.sh -# timeout_in_minutes: 30 # longer timeout for chef-server -# expeditor: -# executor: -# linux: -# privileged: true -# # secrets: -# # A2_LICENSE: -# # path: secret/a2/license -# # field: license - -# - label: "chef server only" -# command: -# - integration/run_test integration/tests/chef_server_only.sh -# timeout_in_minutes: 30 -# expeditor: -# executor: -# linux: -# privileged: true -# secrets: -# A2_LICENSE: -# path: secret/a2/license -# field: license - -# - label: "ha chef server" -# command: -# - integration/run_test integration/tests/ha_chef_server.sh -# timeout_in_minutes: 35 -# expeditor: -# executor: -# linux: -# single-use: true -# privileged: true -# secrets: -# A2_LICENSE: -# path: secret/a2/license -# field: license - - -# ######################################################################### -# # Pedant Tests -# ######################################################################### +- label: omnibus + command: + - /workdir/scripts/bk_tests/bk_install.sh + - gem uninstall bundler -v '>= 2.0.1' -a + - cd /workdir/omnibus; make install + - make ci + expeditor: + executor: + docker: + image: "chefes/a1-buildkite" + environment: + - LUALIB=~/.luarocks/lib/lua/5.2 + - COMPONENT=omnibus -# - label: With chef-zero -# command: -# - /workdir/scripts/bk_tests/bk_install.sh -# - gem uninstall bundler -v '>= 2.0.1' -a -# - cp scripts/bk_tests/chef_zero-Gemfile oc-chef-pedant/Gemfile -# - bundle install --jobs=3 --retry=3 --path=/workdir/vendor/bundle -# - cd /workdir/oc-chef-pedant -# - bundle exec rake chef_zero_spec -# expeditor: -# executor: -# docker: -# image: "chefes/a1-buildkite" -# environment: -# - LUALIB=~/.luarocks/lib/lua/5.2 -# - USE_OMNIBUS_FILES=0 -# - PEDANT_OPTS="--skip-oc_id" -# - BUNDLE_GEMFILE=/workdir/oc-chef-pedant/Gemfile +- label: chef-server-ctl + command: + - /workdir/scripts/bk_tests/bk_install.sh + - cd /workdir/src/chef-server-ctl; make install + - make ci + expeditor: + executor: + docker: + image: "chefes/a1-buildkite" + environment: + - COMPONENT=src/chef-server-ctl -# - label: With ChefFS=1 -# command: -# - /workdir/scripts/bk_tests/bk_install.sh -# - gem install bundler -v 2.2.4 -# - gem uninstall bundler -v '> 2.2.4' -a -# - cp scripts/bk_tests/chef_zero-Gemfile oc-chef-pedant/Gemfile -# - bundle install --jobs=3 --retry=3 --path=/workdir/vendor/bundle -# - cd /workdir/oc-chef-pedant -# - bundle exec rake chef_zero_spec -# expeditor: -# executor: -# docker: -# image: "chefes/a1-buildkite" -# environment: -# - LUALIB=~/.luarocks/lib/lua/5.2 -# - USE_OMNIBUS_FILES=0 -# - PEDANT_OPTS="--skip-oc_id" -# - CHEF_FS=1 - # - BUNDLE_GEMFILE=/workdir/oc-chef-pedant/Gemfile +- label: oc_erchef_unit + command: + - date + - /workdir/scripts/bk_tests/bk_install.sh + - date + - cd /workdir/src/oc_erchef; make install + - make ci_eunit + - date + expeditor: + executor: + docker: + image: "chefes/a1-buildkite" + environment: + - PATH=/opt/asdf/shims:/opt/asdf/bin:/opt/ci-studio-common/bin:/go/bin:/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/chefdk/bin + - PERL5LIB=~/perl5/lib/perl5/x86_64-linux-gnu-thread-multi:~/perl5/lib/perl5:/etc/perl:/usr/local/lib/perl/5.14.2:/usr/local/share/perl/5.14.2:/usr/lib/perl5:/usr/share/perl5:/usr/lib/perl/5.14:/usr/share/perl/5.14:/usr/local/lib/site_perl + - LUALIB=~/.luarocks/lib/lua/5.2 + - ELIXIR_VERSION=1.4 + - COMPONENT=src/oc_ + +- label: oc_erchef_ct + command: + - date + - /workdir/scripts/bk_tests/bk_install.sh + - date + - cd /workdir/src/oc_erchef; make install + - make ci_ct + - date + expeditor: + executor: + docker: + image: "chefes/a1-buildkite" + environment: + - PATH=/opt/asdf/shims:/opt/asdf/bin:/opt/ci-studio-common/bin:/go/bin:/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/chefdk/bin + - PERL5LIB=~/perl5/lib/perl5/x86_64-linux-gnu-thread-multi:~/perl5/lib/perl5:/etc/perl:/usr/local/lib/perl/5.14.2:/usr/local/share/perl/5.14.2:/usr/lib/perl5:/usr/share/perl5:/usr/lib/perl/5.14:/usr/share/perl/5.14:/usr/local/lib/site_perl + - LUALIB=~/.luarocks/lib/lua/5.2 + - ELIXIR_VERSION=1.4 + - COMPONENT=src/oc_erchef + +- label: oc-id + command: + - /workdir/scripts/bk_tests/bk_install.sh + - cd /workdir/src/oc-id + - make install ci + expeditor: + executor: + docker: + image: "chefes/a1-buildkite" + environment: + - COMPONENT=src/oc-id -- wait +- label: oc_bifrost + command: + - /workdir/scripts/bk_tests/bk_install.sh + - cd /workdir/src/oc_bifrost; make install + - make ci + expeditor: + executor: + docker: + image: "chefes/a1-buildkite" + environment: + - PATH=/opt/asdf/shims:/opt/asdf/bin:/opt/ci-studio-common/bin:/go/bin:/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/chefdk/bin + - PERL5LIB=~/perl5/lib/perl5/x86_64-linux-gnu-thread-multi:~/perl5/lib/perl5:/etc/perl:/usr/local/lib/perl/5.14.2:/usr/local/share/perl/5.14.2:/usr/lib/perl5:/usr/share/perl5:/usr/lib/perl/5.14:/usr/share/perl/5.14:/usr/local/lib/site_perl + - LUALIB=~/.luarocks/lib/lua/5.2 + - COMPONENT=src/oc_bifrost + +- label: bookshelf + command: + - /workdir/scripts/bk_tests/bk_install.sh + - cd /workdir/src/bookshelf; make install + - make ci + expeditor: + executor: + docker: + image: "chefes/a1-buildkite" + environment: + - PATH=/opt/asdf/shims:/opt/asdf/bin:/opt/ci-studio-common/bin:/go/bin:/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/chefdk/bin + - PERL5LIB=~/perl5/lib/perl5/x86_64-linux-gnu-thread-multi:~/perl5/lib/perl5:/etc/perl:/usr/local/lib/perl/5.14.2:/usr/local/share/perl/5.14.2:/usr/lib/perl5:/usr/share/perl5:/usr/lib/perl/5.14:/usr/share/perl/5.14:/usr/local/lib/site_perl + - LUALIB=~/.luarocks/lib/lua/5.2 + - COMPONENT=src/bookshelf - label: automate_build command: @@ -380,18 +161,4 @@ steps: executor: linux: privileged: true - # executor: - # docker: - # privileged: true - # environment: - # - OCTOKIT_ACCESS_TOKEN - # - HAB_LICENSE=accept - # - CHEF_LICENSE="accept-no-persist" - # - CI="true" - # - HAB_ORIGIN=chef - # - HAB_ORIGIN_KEYS=chef - # - HAB_STUDIO_SECRET_HAB_FEAT_IGNORE_LOCAL="true" - # - HAB_FEAT_IGNORE_LOCAL="true" - # - PACKAGE_NAME=oc-id - # - HAB_FEAT_OFFLINE_INSTALL=true