diff options
Diffstat (limited to 'jjb')
-rw-r--r-- | jjb/armband/armband-ci-jobs.yml | 18 | ||||
-rwxr-xr-x | jjb/dovetail/dovetail-run.sh | 3 | ||||
-rwxr-xr-x | jjb/fuel/fuel-deploy.sh | 53 | ||||
-rw-r--r-- | jjb/infra/bifrost-verify-jobs.yml | 2 | ||||
-rwxr-xr-x | jjb/infra/bifrost-verify.sh | 4 | ||||
-rw-r--r-- | jjb/opnfv/opnfv-docker.sh | 19 | ||||
-rw-r--r-- | jjb/opnfv/opnfv-utils.yml | 40 | ||||
-rw-r--r-- | jjb/releng/releng-ci-jobs.yml | 50 |
8 files changed, 61 insertions, 128 deletions
diff --git a/jjb/armband/armband-ci-jobs.yml b/jjb/armband/armband-ci-jobs.yml index f6b48656a..55ab7fc34 100644 --- a/jjb/armband/armband-ci-jobs.yml +++ b/jjb/armband/armband-ci-jobs.yml @@ -228,7 +228,7 @@ - trigger: name: 'fuel-os-odl_l2-nofeature-ha-armband-baremetal-master-trigger' triggers: - - timed: '0 0 * * 1' + - timed: '0 0 * * 1,6' - trigger: name: 'fuel-os-nosdn-nofeature-ha-armband-baremetal-master-trigger' triggers: @@ -236,7 +236,7 @@ - trigger: name: 'fuel-os-odl_l3-nofeature-ha-armband-baremetal-master-trigger' triggers: - - timed: '0 0 * * 3' + - timed: '0 0 * * 3,7' - trigger: name: 'fuel-os-odl_l2-bgpvpn-ha-armband-baremetal-master-trigger' triggers: @@ -251,23 +251,23 @@ - trigger: name: 'fuel-os-odl_l2-nofeature-ha-armband-baremetal-colorado-trigger' triggers: - - timed: '0 4 * * *' + - timed: '0 8 * * 1,4,6' - trigger: name: 'fuel-os-nosdn-nofeature-ha-armband-baremetal-colorado-trigger' triggers: - - timed: '0 8 * * *' + - timed: '0 16 * * 2,5' - trigger: - name: 'fuel-os-odl_l3-nofeature-ha-armband-baremetal-colorado-trigger' + name: 'fuel-os-odl_l2-bgpvpn-ha-armband-baremetal-colorado-trigger' triggers: - - timed: '0 12 * * *' + - timed: '0 8 * * 1,3,6' - trigger: - name: 'fuel-os-odl_l2-bgpvpn-ha-armband-baremetal-colorado-trigger' + name: 'fuel-os-odl_l3-nofeature-ha-armband-baremetal-colorado-trigger' triggers: - - timed: '0 16 * * *' + - timed: '0 16 * * 2,4,7' - trigger: name: 'fuel-os-odl_l2-nofeature-noha-armband-baremetal-colorado-trigger' triggers: - - timed: '0 20 * * *' + - timed: '0 8 * * 3,5,7' #--------------------------------------------------------------- # Enea Armband CI Virtual Triggers running against master branch #--------------------------------------------------------------- diff --git a/jjb/dovetail/dovetail-run.sh b/jjb/dovetail/dovetail-run.sh index 6453425ce..3f7a47bee 100755 --- a/jjb/dovetail/dovetail-run.sh +++ b/jjb/dovetail/dovetail-run.sh @@ -48,5 +48,8 @@ sudo docker run ${opts} ${envs} ${labconfig} ${sshkey} opnfv/dovetail:${DOCKER_T echo "Dovetail: store results..." sudo cp -r /home/opnfv/dovetail/results ./ +#To make sure the file owner is jenkins, for the copied results files in the above line +#if not, there will be error when next time to wipe workspace +sudo chown -R jenkins:jenkins ${WORKSPACE}/results echo "Dovetail: done!" diff --git a/jjb/fuel/fuel-deploy.sh b/jjb/fuel/fuel-deploy.sh index 2104d9090..ef47ff0e3 100755 --- a/jjb/fuel/fuel-deploy.sh +++ b/jjb/fuel/fuel-deploy.sh @@ -104,58 +104,5 @@ if [[ $exit_code -ne 0 ]]; then exit $exit_code else echo "Deployment is successful!" -fi - -# Quick and dirty fix for SFC scenatio - will be fixed properly post-release -if [[ ! "$DEPLOY_SCENARIO" =~ "os-odl_l2-sfc" ]]; then exit 0 fi - -echo -echo "SFC Scenario is deployed" -echo - -# The stuff below is here temporarily and will be fixed once the release is out -# The stuff below is here temporarily and will be fixed once the release is out -export FUEL_MASTER_IP=10.20.0.2 -export TACKER_SCRIPT_URL="https://git.opnfv.org/cgit/fuel/plain/prototypes/sfc_tacker/poc.tacker-up.sh?h=${GIT_BRANCH#*/}" -export CONTROLLER_NODE_IP=$(sshpass -pr00tme /usr/bin/ssh -o UserKnownHostsFile=/dev/null \ - -o StrictHostKeyChecking=no root@$FUEL_MASTER_IP 'fuel node list' | \ - grep controller | head -1 | cut -d'|' -f5) - -# we can't do much if we do not have the controller IP -if [[ ! "$CONTROLLER_NODE_IP" =~ "10.20.0" ]]; then - echo "Unable to retrieve controller IP" - exit 1 -fi - -echo -echo "Copying and executing poc.tacker-up.sh script on controller node $CONTROLLER_NODE_IP" -echo - -expect << END -spawn /usr/bin/ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -l root $::env(FUEL_MASTER_IP) -expect { - -re ".*sword.*" { - exp_send "r00tme\r" - } -} -expect "# " -send "/usr/bin/ssh -l root $::env(CONTROLLER_NODE_IP)\r" -expect "# " -send "PS1=\"tacker_poc> \"\r" -expect -re {tacker_poc> $} -send "sudo apt-get install -y git\r" -expect -re {tacker_poc> $} -sleep 10 -send "/bin/mkdir -p /root/sfc-poc && cd /root/sfc-poc\r" -expect -re {tacker_poc> $} -send "git clone https://gerrit.opnfv.org/gerrit/fuel && cd fuel\r" -expect -re {tacker_poc> $} -send "/bin/bash /root/sfc-poc/fuel/prototypes/sfc_tacker/poc.tacker-up.sh\r" -expect -re {tacker_poc> $} -send "exit\r" -expect "Connection to $::env(CONTROLLER_NODE_IP) closed. " -send "exit\r" -expect "Connection to $::env(FUEL_MASTER_IP) closed. " -END diff --git a/jjb/infra/bifrost-verify-jobs.yml b/jjb/infra/bifrost-verify-jobs.yml index b117b32ae..17796a832 100644 --- a/jjb/infra/bifrost-verify-jobs.yml +++ b/jjb/infra/bifrost-verify-jobs.yml @@ -173,4 +173,6 @@ file-paths: - compare-type: ANT pattern: 'prototypes/bifrost/**' + - compare-type: ANT + pattern: 'jjb/infra/**' readable-message: true diff --git a/jjb/infra/bifrost-verify.sh b/jjb/infra/bifrost-verify.sh index 759b50b8e..f7920a36f 100755 --- a/jjb/infra/bifrost-verify.sh +++ b/jjb/infra/bifrost-verify.sh @@ -18,6 +18,7 @@ function fix_ownership() { echo "Not running as part of Jenkins. Handle the logs manually." else sudo chown -R jenkins:jenkins $WORKSPACE + sudo chown -R jenkins:jenkins ${HOME}/.cache fi } @@ -30,6 +31,9 @@ fi # remove previously cloned repos sudo /bin/rm -rf /opt/bifrost /opt/puppet-infracloud /opt/stack /opt/releng +# Fix up permissions +fix_ownership + # clone all the repos first and checkout the patch afterwards sudo git clone https://git.openstack.org/openstack/bifrost /opt/bifrost sudo git clone https://git.openstack.org/openstack-infra/puppet-infracloud /opt/puppet-infracloud diff --git a/jjb/opnfv/opnfv-docker.sh b/jjb/opnfv/opnfv-docker.sh index f56de7f60..e637f7b32 100644 --- a/jjb/opnfv/opnfv-docker.sh +++ b/jjb/opnfv/opnfv-docker.sh @@ -67,22 +67,9 @@ fi # cd to directory where Dockerfile is located -if [[ "$DOCKER_REPO_NAME" == "opnfv/bottlenecks" ]]; then - cd $WORKSPACE/ci/docker -elif [[ "$DOCKER_REPO_NAME" == "opnfv/cperf" ]]; then - cd $WORKSPACE/docker -elif [[ "$DOCKER_REPO_NAME" == "opnfv/dovetail" ]]; then - cd $WORKSPACE/docker -elif [[ "$DOCKER_REPO_NAME" == "opnfv/functest" ]]; then - cd $WORKSPACE/docker -elif [[ "$DOCKER_REPO_NAME" == "opnfv/qtip" ]]; then - cd $WORKSPACE/docker -elif [[ "$DOCKER_REPO_NAME" == "opnfv/storperf" ]]; then - cd $WORKSPACE/docker -elif [[ "$DOCKER_REPO_NAME" == "opnfv/yardstick" ]]; then - cd $WORKSPACE/tests/ci/docker/yardstick-ci -else - echo "ERROR: DOCKER_REPO_NAME parameter not valid: $DOCKER_REPO_NAME" +cd $WORKSPACE/docker +if [ ! -f ./Dockerfile ]; then + echo "ERROR: Dockerfile not found." exit 1 fi diff --git a/jjb/opnfv/opnfv-utils.yml b/jjb/opnfv/opnfv-utils.yml new file mode 100644 index 000000000..94a99d451 --- /dev/null +++ b/jjb/opnfv/opnfv-utils.yml @@ -0,0 +1,40 @@ +- project: + + name: opnfv-utils + + jobs: + - 'prune-docker-images' +######################## +# job templates +######################## +- job-template: + name: 'prune-docker-images' + + disabled: false + + concurrent: true + + parameters: + - node: + name: SLAVE_NAME + description: Slaves to prune docker images + default-slaves: + - arm-build1 + - arm-build2 + - ericsson-build4 + - ericsson-build5 + - lf-build2 + allowed-multiselect: true + ignore-offline-nodes: true + + builders: + - description-setter: + description: "Built on $NODE_NAME" + - shell: | + #!/bin/bash + + (docker ps -q; docker ps -aq) | sort | uniq -u | xargs --no-run-if-empty docker rm + docker images -f dangling=true -q | xargs --no-run-if-empty docker rmi + + triggers: + - timed: '@midnight' diff --git a/jjb/releng/releng-ci-jobs.yml b/jjb/releng/releng-ci-jobs.yml index ac323a3c1..2d88449e8 100644 --- a/jjb/releng/releng-ci-jobs.yml +++ b/jjb/releng/releng-ci-jobs.yml @@ -2,7 +2,6 @@ name: builder-jobs jobs: - 'builder-verify-jjb' - - 'builder-sandbox' - 'builder-merge' - 'artifacts-api' @@ -102,55 +101,6 @@ jenkins-jobs update -r --delete-old jjb/ - job-template: - name: 'builder-sandbox' - - # Upload all jjb jobs to sandbox instance, excluding jobs jjb - # builder jobs - - parameters: - - project-parameter: - project: '{project}' - - gerrit-parameter: - branch: 'master' - - scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - choosing-strategy: 'default' - - triggers: - - gerrit: - trigger-on: - - change-merged-event - - comment-added-contains-event: - comment-contains-value: 'remerge' - projects: - - project-compare-type: 'ANT' - project-pattern: 'releng' - branches: - - branch-compare-type: 'ANT' - branch-pattern: '**/sandbox' - file-paths: - - compare-type: ANT - pattern: jjb/** - - compare-type: ANT - pattern: utils/** - - builders: - - shell: - !include-raw: verify-releng.sh - - shell: | - #!/bin/bash - source /opt/virtualenv/jenkins-job-builder/bin/activate - cd /opt/jenkins-ci/releng - git pull - cp /etc/jenkins_jobs/jenkins_jobs.ini jenkins_sandbox.ini - sed -i 's/url=.*/url=https:\/\/sandbox.opnfv.org\//g' jenkins_sandbox.ini - jenkins-jobs --conf jenkins_sandbox.ini update -r -x jjb/releng --delete-old jjb - rm -f jenkins_sandbox.ini - -- job-template: name: 'artifacts-api' # Generate and upload the JSON file to used for artifacts site |