Skip to content

Commit

Permalink
CASMTRIAGE-4986 : Modify the VCS pre flight service check (Cray-HPE#3342
Browse files Browse the repository at this point in the history
)

* CASMTRIAGE-4986 1.4 : Modify the VCS per flight service check

(cherry picked from commit 10fbebe)

* Updated copyright year.

Signed-off-by: Greg Baker <80114231+gbaker-hpe@users.noreply.github.com>

---------

Signed-off-by: Greg Baker <80114231+gbaker-hpe@users.noreply.github.com>
Co-authored-by: kimjensen-hpe <kim.jensen@hpe.com>
Co-authored-by: Greg Baker <80114231+gbaker-hpe@users.noreply.github.com>
  • Loading branch information
3 people authored Feb 24, 2023
1 parent a673688 commit d8ee2f5
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions workflows/iuf/operations/preflight-checks-for-services.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# MIT License
#
# (C) Copyright 2022 Hewlett Packard Enterprise Development LP
# (C) Copyright 2022-2023 Hewlett Packard Enterprise Development LP
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
Expand Down Expand Up @@ -94,17 +94,16 @@ spec:
fi
# check gitea VCS
tmpdir=$(mktemp -d)
pushd $tmpdir > /dev/null
gp=$(kubectl get secret -n services vcs-user-credentials --template={{.data.vcs_password}} 2> /dev/null | base64 --decode)
if ! git clone --depth 1 https://crayvcs:"${gp}"@api-gw-service-nmn.local/vcs/cray/cos-config-management.git &> /dev/null; then
echo "ERROR VCS is not operational. This check will fail if there are not valid SSL certificates located at '/var/lib/ca-certificates'."
vcs_user=$(kubectl get secret -n services vcs-user-credentials --template={{.data.vcs_username}} | base64 --decode)
vcs_pass=$(kubectl get secret -n services vcs-user-credentials --template={{.data.vcs_password}} | base64 --decode)
vcs_vers=$(curl -s https://api-gw-service-nmn.local/vcs/api/v1/version -u ${vcs_user}:${vcs_pass} | jq -r '. | .version')
if [[ -z $vcs_vers ]]; then
echo "ERROR VCS is not operational. This check will fail if VCS is unable to return the api version."
error_flag=1
else
echo "INFO VCS is operational."
fi
popd > /dev/null
rm -rf $tmpdir
# Check IMS
if ! cray ims images list > /dev/null; then
Expand Down

0 comments on commit d8ee2f5

Please sign in to comment.