Skip to content
Snippets Groups Projects
Commit 55ed606c authored by Andreas Hamacher's avatar Andreas Hamacher
Browse files

simple rename

parent fcc780c1
No related branches found
No related tags found
1 merge request!323simple rename
variables: variables:
GIT_SUBMODULE_STRATEGY: recursive GIT_SUBMODULE_STRATEGY: recursive
STACKNAME: CICD_aciab_$CI_COMMIT_REF_NAME STACKNAME: CICD_${CI_PROJECT_NAME}_$CI_COMMIT_REF_NAME
NECTAR_ALLOCATION: HPCCICD NECTAR_ALLOCATION: HPCCICD
ANSIBLE_HOST_KEY_CHECKING: "False" ANSIBLE_HOST_KEY_CHECKING: "False"
DEFAULT_PATH: "CICD" DEFAULT_PATH: "CICD"
...@@ -16,33 +16,33 @@ stages: ...@@ -16,33 +16,33 @@ stages:
- integration_test #https://docs.gitlab.com/ee/ci/triggers/ - integration_test #https://docs.gitlab.com/ee/ci/triggers/
- clean - clean
trigger_pipeline_in_Clusterbuild: trigger_pipeline_in_Clusterbuild:
stage: integration_test stage: integration_test
tags: tags:
- ansible - ansible
script: script:
- echo ${CI_JOB_TOKEN} - echo ${CI_JOB_TOKEN}
- curl --request POST --form token=${CI_JOB_TOKEN} --form "variables[TRIGGER_CI_COMMIT_SHA]=${CI_COMMIT_SHA}" --form ref=master https://gitlab.erc.monash.edu.au/api/v4/projects/193/trigger/pipeline # ID is from clusterbuild - curl --request POST --form token=${CI_JOB_TOKEN} --form "variables[TRIGGER_CI_COMMIT_SHA]=${CI_COMMIT_SHA}" --form ref=master https://gitlab.erc.monash.edu.au/api/v4/projects/193/trigger/pipeline # ID is from clusterbuild
only: only:
- ${CI_PROJECT_NAME} == 'ansible_cluster_in_a_box' - ${CI_PROJECT_NAME} == 'ansible_cluster_in_a_box'
trigger_pipeline_in_monarch: trigger_pipeline_in_monarch:
stage: integration_test stage: integration_test
tags: tags:
- ansible - ansible
script: script:
- echo ${CI_JOB_TOKEN} - echo ${CI_JOB_TOKEN}
- curl --request POST --form token=${CI_JOB_TOKEN} --form "variables[TRIGGER_CI_COMMIT_SHA]=${CI_COMMIT_SHA}" --form ref=master https://gitlab.erc.monash.edu.au/api/v4/projects/385/trigger/pipeline # ID is from monarch - curl --request POST --form token=${CI_JOB_TOKEN} --form "variables[TRIGGER_CI_COMMIT_SHA]=${CI_COMMIT_SHA}" --form ref=master https://gitlab.erc.monash.edu.au/api/v4/projects/385/trigger/pipeline # ID is from monarch
only: only:
- ${CI_PROJECT_NAME} == 'ansible_cluster_in_a_box' - ${CI_PROJECT_NAME} == 'ansible_cluster_in_a_box'
yamllint: yamllint:
stage: lint stage: lint
allow_failure: true allow_failure: true
tags: tags:
- yamllint - yamllint
script: script:
- echo "stage yamllint" - echo "stage yamllint"
...@@ -67,13 +67,13 @@ yamllint: ...@@ -67,13 +67,13 @@ yamllint:
ansiblelint: ansiblelint:
allow_failure: true allow_failure: true
stage: lint stage: lint
tags: tags:
- ansiblelint - ansiblelint
script: script:
- echo "stage ansiblelint" - echo "stage ansiblelint"
- cd CICD - cd CICD
- python3 ansiblelint/run_lint.py --targets master_playbook.yml - python3 ansiblelint/run_lint.py --targets master_playbook.yml
build_cluster_cicd: build_cluster_cicd:
stage: heat stage: heat
allow_failure: false allow_failure: false
...@@ -100,7 +100,7 @@ build_cluster_cicd: ...@@ -100,7 +100,7 @@ build_cluster_cicd:
ansible_create_cluster_stage: ansible_create_cluster_stage:
stage: ansible_create_cluster_stage stage: ansible_create_cluster_stage
tags: tags:
- ansible - ansible
before_script: before_script:
- cd $DEFAULT_PATH/.. - cd $DEFAULT_PATH/..
...@@ -120,8 +120,8 @@ ansible_create_cluster_stage: ...@@ -120,8 +120,8 @@ ansible_create_cluster_stage:
- ansible-playbook -i files/inventory.$STACKNAME --key-file ../../gc_key.pem --skip-tags monitoring computenodes.yml | tee nochange.log - ansible-playbook -i files/inventory.$STACKNAME --key-file ../../gc_key.pem --skip-tags monitoring computenodes.yml | tee nochange.log
- echo [ `grep changed= ./nochange.log -c` = `grep changed=0 ./nochange.log -c` ] > bashtest.sh # a crude way to make sure all changed lines are equal to changed=0 - echo [ `grep changed= ./nochange.log -c` = `grep changed=0 ./nochange.log -c` ] > bashtest.sh # a crude way to make sure all changed lines are equal to changed=0
- bash ./bashtest.sh - bash ./bashtest.sh
- ansible-playbook -i files/inventory.$STACKNAME --key-file ../../gc_key.pem --skip-tags monitoring --check computenodes.yml - ansible-playbook -i files/inventory.$STACKNAME --key-file ../../gc_key.pem --skip-tags monitoring --check computenodes.yml
tests: tests:
stage: tests stage: tests
...@@ -140,14 +140,14 @@ tests: ...@@ -140,14 +140,14 @@ tests:
- grep -qv "I could not find any resouces tagged with project_name:" ./files/inventory.$STACKNAME #fail if inventory file is empty - grep -qv "I could not find any resouces tagged with project_name:" ./files/inventory.$STACKNAME #fail if inventory file is empty
- ansible -m ping -i files/inventory.$STACKNAME --key-file ../gc_key.pem all - ansible -m ping -i files/inventory.$STACKNAME --key-file ../gc_key.pem all
- ansible -i files/inventory.$STACKNAME --key-file ../gc_key.pem -a "sudo ls" all - ansible -i files/inventory.$STACKNAME --key-file ../gc_key.pem -a "sudo ls" all
- echo -e '[defaults]\r\nallow_world_readable_tmpfiles = True' > ansible.cfg - echo -e '[defaults]\r\nallow_world_readable_tmpfiles = True' > ansible.cfg
# Need to find a better check for sinfo # Need to find a better check for sinfo
#- ansible -B 30 -i files/inventory.$STACKNAME --key-file ../gc_key.pem -a "find /opt/ -name sinfo -type f" ManagementNodes #- ansible -B 30 -i files/inventory.$STACKNAME --key-file ../gc_key.pem -a "find /opt/ -name sinfo -type f" ManagementNodes
#- ansible -B 30 -i files/inventory.$STACKNAME --key-file ../gc_key.pem -a "find /opt/ -name squeue -type f" ManagementNodes #- ansible -B 30 -i files/inventory.$STACKNAME --key-file ../gc_key.pem -a "find /opt/ -name squeue -type f" ManagementNodes
- ansible -B 30 -i files/inventory.$STACKNAME --key-file ../gc_key.pem -a "systemctl is-active --quiet mariadb" SQLNodes - ansible -B 30 -i files/inventory.$STACKNAME --key-file ../gc_key.pem -a "systemctl is-active --quiet mariadb" SQLNodes
- ansible -B 30 -i files/inventory.$STACKNAME --key-file ../gc_key.pem -a "systemctl is-active --quiet slurmctld" ManagementNodes - ansible -B 30 -i files/inventory.$STACKNAME --key-file ../gc_key.pem -a "systemctl is-active --quiet slurmctld" ManagementNodes
- ansible -B 30 -i files/inventory.$STACKNAME --key-file ../gc_key.pem -a "systemctl is-active --quiet slurmdbd" ManagementNodes - ansible -B 30 -i files/inventory.$STACKNAME --key-file ../gc_key.pem -a "systemctl is-active --quiet slurmdbd" ManagementNodes
- bash -e ./tests/run_tests.sh all "files/inventory.$STACKNAME" "../gc_key.pem" - bash -e ./tests/run_tests.sh all "files/inventory.$STACKNAME" "../gc_key.pem"
- bash -e ./tests/run_tests.sh ComputeNodes "files/inventory.$STACKNAME" "../gc_key.pem" - bash -e ./tests/run_tests.sh ComputeNodes "files/inventory.$STACKNAME" "../gc_key.pem"
- bash -e ./tests/run_tests.sh LoginNodes "files/inventory.$STACKNAME" "../gc_key.pem" - bash -e ./tests/run_tests.sh LoginNodes "files/inventory.$STACKNAME" "../gc_key.pem"
...@@ -155,7 +155,7 @@ tests: ...@@ -155,7 +155,7 @@ tests:
- bash -e ./tests/run_tests.sh NFSNodes "files/inventory.$STACKNAME" "../gc_key.pem" - bash -e ./tests/run_tests.sh NFSNodes "files/inventory.$STACKNAME" "../gc_key.pem"
- bash -e ./tests/run_tests.sh SQLNodes "files/inventory.$STACKNAME" "../gc_key.pem" - bash -e ./tests/run_tests.sh SQLNodes "files/inventory.$STACKNAME" "../gc_key.pem"
- bash -e ./tests/run_tests.sh slurm "files/inventory.$STACKNAME" "../gc_key.pem" - bash -e ./tests/run_tests.sh slurm "files/inventory.$STACKNAME" "../gc_key.pem"
extended: extended:
stage: extended stage: extended
tags: tags:
...@@ -171,7 +171,7 @@ extended: ...@@ -171,7 +171,7 @@ extended:
only: only:
variables: variables:
- $EXTENDED != null - $EXTENDED != null
manual_cluster_spawn: manual_cluster_spawn:
stage: push_button_spawn_cluster stage: push_button_spawn_cluster
...@@ -193,11 +193,11 @@ manual_cluster_spawn: ...@@ -193,11 +193,11 @@ manual_cluster_spawn:
- export STACKNAME=$MANUAL_STACKNAME - export STACKNAME=$MANUAL_STACKNAME
- sleep 25 - sleep 25
- bash -x CICD/ansible_create_cluster_script.sh - bash -x CICD/ansible_create_cluster_script.sh
when: manual when: manual
only: only:
refs: refs:
- "cicd" - "cicd"
clean: clean:
stage: clean stage: clean
tags: tags:
...@@ -210,7 +210,7 @@ clean: ...@@ -210,7 +210,7 @@ clean:
- source ./$NECTAR_ALLOCATION-openrc.sh - source ./$NECTAR_ALLOCATION-openrc.sh
- bash -x ./CICD/heat/heatcicdwrapper.sh delete_if_exists $STACKNAME - bash -x ./CICD/heat/heatcicdwrapper.sh delete_if_exists $STACKNAME
# heat_test: # heat_test:
# stage: heat_test # stage: heat_test
# allow_failure: false # allow_failure: false
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment