Skip to content
This repository was archived by the owner on Feb 5, 2020. It is now read-only.

tests: Run rspec tests out of bazel build output#2907

Merged
mxinden merged 1 commit intocoreos:masterfrom
mxinden:bazel-rspec
Feb 16, 2018
Merged

tests: Run rspec tests out of bazel build output#2907
mxinden merged 1 commit intocoreos:masterfrom
mxinden:bazel-rspec

Conversation

@mxinden
Copy link
Contributor

@mxinden mxinden commented Feb 7, 2018

  1. Build tarball and smoke tests in previous Jenkins stage
  2. Unzip the release tarball
  3. Setup build folder and $PATH
  4. Make rspec use release folder instead of git repository

@coreosbot
Copy link

Can one of the admins verify this patch?

output += "Standard output: \n#{stdout}"
output += "\nStandard error: \n#{stderr}"
output += "\nEnd of journal of #{service} service on #{destination_ip}"
puts output
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cpanato We have the logs output as a Jenkins archive. Is the print statement to the Jenkins logs still needed?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can remove, please.

@mxinden mxinden changed the title tests: Run rspec tests out of bazel build output [WIP] tests: Run rspec tests out of bazel build output Feb 7, 2018
@mxinden mxinden force-pushed the bazel-rspec branch 15 times, most recently from ea2a18b to be148ce Compare February 9, 2018 13:43
@mxinden mxinden force-pushed the bazel-rspec branch 4 times, most recently from 32f764b to 99003a3 Compare February 14, 2018 09:53
@mxinden mxinden force-pushed the bazel-rspec branch 2 times, most recently from c1fc083 to 7a03544 Compare February 14, 2018 12:11
Jenkinsfile Outdated
) {
unstash 'clean-repo'
unstash 'smoke-test-binary'
unstash 'tectonic.tar.gz'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can combine the unstash lines here into a function and invoke that function in runRSpecTestBareMetal as well.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1


def create
Dir.chdir('../../contrib/internal-cluster') do
Dir.chdir(File.join(ENV['RSPEC_PATH'], '../../contrib/internal-cluster')) do
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of relying on the current dir to be the correct dir, I use absolute paths via the RSPEC_PATH and RELEASE_TARBALL_PATH. What do you think @cpanato? Should make the framework more robust for the future.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good!

# SmokeTest contains helper functions to operate the smoke tests written in
# golang
module SmokeTest
def self.build
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Smoke test binary is build by Bazel from now on.

config.silence_filter_announcements = true

# Untar release tarball
# TODO: Pipe tar output to /dev/null
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mxinden address TODO

raise 'failed to untar build tarball' unless succeeded

# Add terraform binary to path
ENV['PATH'] =
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the new CLI, this should not be needed anymore.

@mxinden
Copy link
Contributor Author

mxinden commented Feb 14, 2018

@cpanato Would you mind giving this another review? Looking forward to your thoughts.

Jenkinsfile Outdated

cp bazel-bin/tectonic.tar.gz .
cp bazel-bin/tests/smoke/linux_amd64_stripped/smoke .
ls -la
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you need this?

@cpanato
Copy link
Contributor

cpanato commented Feb 15, 2018

can we run on aws as well?

make a few comments. this looks great to me 😄 nice job to adapt to use bazel!

0. Build tarball and smoke tests in previous Jenkins stage
1. Unzip the release tarball
2. Setup build folder and $PATH
3. Make rspec use release folder instead of git repository
Copy link
Contributor

@cpanato cpanato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice work!

@mxinden mxinden changed the title [WIP] tests: Run rspec tests out of bazel build output tests: Run rspec tests out of bazel build output Feb 15, 2018
@mxinden mxinden merged commit 7ff529e into coreos:master Feb 16, 2018
mxinden added a commit that referenced this pull request Feb 16, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants