Skip to content

Commit

Permalink
Updated config.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
longbui98 committed Oct 24, 2023
1 parent 1cd8e40 commit b6741bc
Showing 1 changed file with 24 additions and 21 deletions.
45 changes: 24 additions & 21 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,25 +162,28 @@ jobs:
paths:
- project/.circleci/ansible/inventory.txt
- destroy-environment
# configure-infrastructure:
# docker:
# # Docker image here that supports Ansible
# steps:
# # Checkout code from git
# # Add ssh keys with fingerprint
# # attach workspace
# - run:
# name: Install dependencies
# command: |
# # Your code here
# exit 1
# - run:
# name: Configure server
# command: |
# # Your code here
# exit 1
# # Here's where you will add some code to rollback on failure

configure-infrastructure:
docker:
- image: ubuntu-2004:2023.10.1
steps:
- checkout
- add_ssh_keys:
fingerprints: [ad:8d:62:dc:0b:b1:23:7d:90:1f:17:39:51:2c:29:8f]
- persist_to_workspace:
root: ~/
paths: ~/
- run:
name: Install dependencies
command: |
sudo apt-add-repository ppa:ansible/ansible
sudo apt update
sudo apt install ansible
- run:
name: Configure server
command: |
cd .circleci/ansible
ansible-playbook -i inventory.txt configure-server.yml
- destroy-environment
# run-migrations:
# docker:
# # Docker image here that supports NodeJS
Expand Down Expand Up @@ -312,8 +315,8 @@ workflows:
filters:
branches:
only: [test-feature-branch]
# - configure-infrastructure:
# requires: [deploy-infrastructure]
- configure-infrastructure:
requires: [deploy-infrastructure]
# - run-migrations:
# requires: [configure-infrastructure]
# - deploy-frontend:
Expand Down

0 comments on commit b6741bc

Please sign in to comment.