Skip to content

Commit

Permalink
Hotfix/cf check (#3340)
Browse files Browse the repository at this point in the history
* Standardizing on use of cf-check on older workflow

* Standardizing use of cf-check on older workflows

* terraform executor edge-case

* Testing pipeline with non-develop branch

* included this branch for deployment workflows

* exclude duplicate deploy-dev workflow

* more exclusions for hotfix branch

* apk doesn't have install, use add

* certifying whole pipeline runs for this branch

* Removing branch-specific carve-outs in pipeline

---------

Co-authored-by: jtimpe <[email protected]>
  • Loading branch information
andrew-jameson and jtimpe authored Dec 5, 2024
1 parent 1bd1a43 commit 52653f2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
1 change: 1 addition & 0 deletions .circleci/deployment/commands.yml
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@
default: CF_APP
steps:
- checkout
- sudo-check
- cf-check
- login-cloud-dot-gov:
cf-password: <<parameters.cf-password>>
Expand Down
6 changes: 3 additions & 3 deletions scripts/cf-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ if command -v cf /dev/null 2>&1; then
echo The command cf is available
else
if [[ -f /bin/terraform ]]; then
echo "This is our Terraform executor"
echo "This is our Terraform executor, Alpine Linux v3.13"
apk update
apk install curl jq
apk add curl jq

else
apt-get update
apt-get install curl wget gnupg2 apt-transport-https jq
Expand All @@ -18,5 +19,4 @@ else
tar xzf $NEXUS_ARCHIVE
mv ./cf7 /usr/local/bin/cf
cf --version

fi
10 changes: 8 additions & 2 deletions scripts/sudo-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ if command -v sudo /dev/null 2>&1; then
echo The command sudo is available
else
echo The command sudo is not available installing...
apt-get update && apt-get install -y sudo
ls -al /bin/sh && sudo rm /bin/sh && sudo ln -s /bin/bash /bin/sh && ls -al /bin/sh
if [ -f /bin/terraform ]; then
echo "This is our Terraform executor, Alpine Linux v3.13"
apk update
apk add sudo
else
apt-get update && apt-get install -y sudo
ls -al /bin/sh && sudo rm /bin/sh && sudo ln -s /bin/bash /bin/sh && ls -al /bin/sh
fi
fi

0 comments on commit 52653f2

Please sign in to comment.