Skip to content

Commit

Permalink
Issue:3900446:Fix existing (Jenkins) CI for PDR plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
vg12345 committed Jun 6, 2024
1 parent fcbf68d commit b54b26c
Showing 1 changed file with 75 additions and 73 deletions.
148 changes: 75 additions & 73 deletions plugins/pdr_deterministic_plugin/.ci/ci_matrix.yaml
Original file line number Diff line number Diff line change
@@ -1,71 +1,73 @@
# ---
# job: ufm-pdr-deterministic-plugin
---
job: ufm-pdr-deterministic-plugin

# registry_host: harbor.mellanox.com
# registry_path: /swx-storage/ci-demo
# registry_auth: swx-storage
registry_host: harbor.mellanox.com
registry_path: /swx-storage/ci-demo
registry_auth: swx-storage

# env:
# plugin_dir: pdr_deterministic_plugin
# plugin_name: ufm-plugin-pdr_deterministic
# DOCKER_CLI_EXPERIMENTAL: enabled
env:
plugin_dir: pdr_deterministic_plugin
plugin_name: ufm-plugin-pdr_deterministic
DOCKER_CLI_EXPERIMENTAL: enabled

# kubernetes:
# cloud: swx-k8s-spray
kubernetes:
cloud: swx-k8s-spray

# volumes:
# - {mountPath: /var/run/docker.sock, hostPath: /var/run/docker.sock}
# - {mountPath: /auto/UFM, hostPath: /auto/UFM }
volumes:
- {mountPath: /var/run/docker.sock, hostPath: /var/run/docker.sock}
- {mountPath: /auto/UFM, hostPath: /auto/UFM }

# runs_on_agents:
# - nodeLabel: 'UFM-POC'

# credentials:
# - {credentialsId: '2c8fd3fe-df05-4f6f-9d1f-f1896d611434', usernameVariable: 'REST_USER', passwordVariable: 'PASSWORD'}


# steps:
# - name: Build Plugin
# agentSelector: "{nodeLabel: 'UFM-POC'}"
# run: |
# cd plugins/$plugin_dir/build
# bash -x ./docker_build.sh latest /
# ls -l /
# cp /ufm-plugin* /auto/UFM/tmp/${JOB_NAME}/${BUILD_ID}/
# parallel: true


# - name: remove plugin if exists on the location
# agentSelector: "{nodeLabel: 'UFM-POC'}"
# run: |
# env
# bash -x plugins/pdr_deterministic_plugin/.ci/do_remove_plugin.sh
# parallel: false
runs_on_agents:
- nodeLabel: 'UFM-POC'

credentials:
- {credentialsId: '2c8fd3fe-df05-4f6f-9d1f-f1896d611434', usernameVariable: 'REST_USER', passwordVariable: 'PASSWORD'}


steps:
- name: Build Plugin
agentSelector: "{nodeLabel: 'UFM-POC'}"
run: |
cd plugins/$plugin_dir/build
bash -x ./docker_build.sh latest /
ls -l /
cp /ufm-plugin* /auto/UFM/tmp/${JOB_NAME}/${BUILD_ID}/
parallel: true


- name: remove plugin if exists on the location
agentSelector: "{nodeLabel: 'UFM-POC'}"
run: |
env
bash -x plugins/pdr_deterministic_plugin/.ci/do_remove_plugin.sh
parallel: false


# - name: Install the new plugin on Server
# agentSelector: "{nodeLabel: 'UFM-POC'}"
# credentialsId: '2c8fd3fe-df05-4f6f-9d1f-f1896d611434'
# run: |
# env
# pwd
# export PASSWORD=$PASSWORD
# bash -x plugins/pdr_deterministic_plugin/.ci/do_install_plugin_server.sh
# parallel: false


# - name: load plugin
# agentSelector: "{nodeLabel: 'UFM-POC'}"
# run: |
# bash -x plugins/pdr_deterministic_plugin/.ci/do_load_plugin.sh
# parallel: false
- name: Install the new plugin on Server
agentSelector: "{nodeLabel: 'UFM-POC'}"
credentialsId: '2c8fd3fe-df05-4f6f-9d1f-f1896d611434'
run: |
env
pwd
export PASSWORD=$PASSWORD
bash -x plugins/pdr_deterministic_plugin/.ci/do_install_plugin_server.sh
parallel: false

# - name: add plugin
# agentSelector: "{nodeLabel: 'UFM-POC'}"
# run: |
# bash -x plugins/pdr_deterministic_plugin/.ci/do_add_plugin.sh
# parallel: false

- name: load plugin
agentSelector: "{nodeLabel: 'UFM-POC'}"
run: |
bash -x plugins/pdr_deterministic_plugin/.ci/do_load_plugin.sh
parallel: false

- name: add plugin
agentSelector: "{nodeLabel: 'UFM-POC'}"
run: |
bash -x plugins/pdr_deterministic_plugin/.ci/do_add_plugin.sh
sleep 30
parallel: false

# # This test is moved to Git actions CI
# - name: run simulation and tests on machine
# agentSelector: "{nodeLabel: 'UFM-POC'}"
# run: |
Expand All @@ -77,23 +79,23 @@
# ssh root@$SERVER_HOST '/tmp/run_simulation_test.sh'
# parallel: false

# - name: remove plugin end
# agentSelector: "{nodeLabel: 'UFM-POC'}"
# run: |
# bash -x plugins/pdr_deterministic_plugin/.ci/do_remove_plugin.sh
# parallel: false
- name: remove plugin end
agentSelector: "{nodeLabel: 'UFM-POC'}"
run: |
bash -x plugins/pdr_deterministic_plugin/.ci/do_remove_plugin.sh
parallel: false


# pipeline_start:
# run: |
# mkdir -p /auto/UFM/tmp/${JOB_NAME}/${BUILD_ID}
pipeline_start:
run: |
mkdir -p /auto/UFM/tmp/${JOB_NAME}/${BUILD_ID}
# pipeline_stop:
# run: |
# echo 'All done';
# #sudo rm -rf /auto/UFM/tmp/${JOB_NAME}/${BUILD_ID}
pipeline_stop:
run: |
echo 'All done';
#sudo rm -rf /auto/UFM/tmp/${JOB_NAME}/${BUILD_ID}
# # Fail job if one of the steps fails or continue
# failFast: false
# Fail job if one of the steps fails or continue
failFast: false

0 comments on commit b54b26c

Please sign in to comment.