Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing jenkinsfile for new k8s slaves #231

Merged

Conversation

michelsciortino
Copy link
Contributor

@michelsciortino michelsciortino commented Oct 29, 2019

This PR has been created to fix Jenkins pipeline for new k8s slaves:

  • NEW: CI/extract_from_docker_image.sh script extracts all the binaries, headers and libraries
    from docker image to the slave file-system
  • NEW: CI/clean_slave.sh script cleans the slave's file-system deleting all the file extracted by CI/extract_from_docker_image.sh
  • Jenkins test stages now run CI/extract_from_docker_image.sh, execute tests and run CI/clean_slave.sh
  • pcn-pbforwarder tests have been modified as they were using a wrong grep regex to obtain the mac addresses of the namespaces
    'HWaddr \K.*$' -> 'ether \K[a-fA-F0-9:]{17}|[a-fA-F0-9]{12}$'
  • all the netcat timeouts have been increased from 2 to 5 seconds in pcn-nat's and pcn-iptables's tests

Jenkins pipeline is partially fixed as there is still a failing test of pcn-iptables (local_test_interfaces1.sh): a new Issue will be opened soon to report this.

Clean Instance Tests and Same Instance Tests now work and can be used as mandatory checks for new PRs.

@michelsciortino michelsciortino requested a review from a team as a code owner October 29, 2019 12:21
docker cp polycubed:/usr/local/bin/polycubectl ./bin/
docker run -d --name \$container --rm --privileged --pid=host --cap-add ALL --network host -v /proc:/host/proc -v /lib/modules:/lib/modules:ro -v /var/run/netns/:/var/run/netns:rw -v /usr/src:/usr/src:ro -v /etc/localtime:/etc/localtime:ro polycubebot/${image_name}-default:${image_tag}

# Copying binaries
Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry for the silly question: is there any way to define this code ones, such as with a function? It looks we have a lot of duplicated code here.

@frisso
Copy link
Contributor

frisso commented Oct 29, 2019

@michelsciortino Two comments.

  1. I believe this is still a work in progress, given the number of commits you have. Please mark as "WIP" so that everybody is aware of its status. Obviously, before finalizing the PR, we should perform a squash commit.
  2. The current code is out-of-data with the base branch. Remember to perform a git rebase before finalizing the PR.
    Thanks!

@michelsciortino michelsciortino changed the title Fixing jenkinsfile for new k8s slaves WIP: Fixing jenkinsfile for new k8s slaves (not a draft PR as i need this to trigger the jenkins pipeline) Oct 29, 2019
@michelsciortino michelsciortino force-pushed the ms-fixing-jenkins-tests branch from 280adeb to 56b3445 Compare November 6, 2019 16:11
…tables & pcn-nat test netcat timeouts

- NEW: CI/extract_from_docker_image.sh script extracts all the binaries, headers and libraries
  from docker image to the slave's file-system
- NEW: CI/clean_slave.sh script cleans the slave's file-system deleting all the file extracted by CI/extract_from_docker_image.sh
- Jenkins test stages now run CI/extract_from_docker_image.sh, execute the tests and run CI/clean_slave.sh
- pcn-pbforwarder tests have been modified as they used a wrong grep regex to obtain the mac addresses of the namespaces
      'HWaddr \K.*$' -> 'ether \K[a-fA-F0-9:]{17}|[a-fA-F0-9]{12}$'
- all the netcat timeouts have been increased from 2 to 5 seconds in pcn-nat's and pcn-iptables's tests
@michelsciortino michelsciortino force-pushed the ms-fixing-jenkins-tests branch from 56b3445 to 49cbc4d Compare November 6, 2019 16:14
@palexster palexster changed the title WIP: Fixing jenkinsfile for new k8s slaves (not a draft PR as i need this to trigger the jenkins pipeline) Fixing jenkinsfile for new k8s slaves (not a draft PR as i need this to trigger the jenkins pipeline) Nov 6, 2019
@palexster palexster changed the title Fixing jenkinsfile for new k8s slaves (not a draft PR as i need this to trigger the jenkins pipeline) Fixing jenkinsfile for new k8s slaves Nov 6, 2019
@palexster
Copy link
Collaborator

Hi @michelsciortino, thanks for this!
The remaining point is to move flaky tests out of the CI steps in next PRs in order to avoid false positives during builds. This would make the activation of new mandatory checks less painful for everybody.

@frisso frisso merged commit 44ba206 into polycube-network:master Nov 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants