Skip to content

Commit

Permalink
Check that there are no errors in the deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
enolfc committed Sep 22, 2023
1 parent d94d9ab commit 678e775
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ jobs:
ANSIBLE_ENCODED_SECRETS="$(echo "$ANSIBLE_SECRETS" | base64 -w 0)"
echo "::add-mask::$ANSIBLE_ENCODED_SECRETS"
sed -i -e "s/%ANSIBLE_SECRETS%/$ANSIBLE_ENCODED_SECRETS/" cloud-init.yaml
sed -i -e "s/%CLOUDS_YAML%/$(base64 -w 0 < clouds.yaml)" cloud-init.yaml
- name: terraform plan
id: plan
if: github.event_name == 'pull_request'
Expand Down Expand Up @@ -124,7 +125,25 @@ jobs:
if: steps.plan.outcome == 'failure'
run: exit 1
- name: Terraform Apply
id: terraform-apply
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
run: |
cd deploy
terraform apply -auto-approve -var-file="$EGI_SITE.tfvars"
echo "VM_ID=$(terraform output -raw instance-id)" >> "$GITHUB_ENV"
- name: Get the status file from swift
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
uses: nick-fields/retry@v2
with:
timeout_minutes: 10
max_attempts: 10
command: |
cd deploy
openstack --os-cloud backend object save fedcloud-catchall $VM_ID
- name: Look for errors
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
run:
cd deploy
# show the status
cat $VM_ID
grep -v "error" $VM_ID

0 comments on commit 678e775

Please sign in to comment.