-
Notifications
You must be signed in to change notification settings - Fork 10
DevOps: Run rails tasks from a VAEC Jenkins Instance
elisa lee edited this page Sep 15, 2020
·
4 revisions
- Have an account
- Browse to http://internal-dm-devops-523064655.us-gov-west-1.elb.amazonaws.com/
- Log in
- Click on "Task"
- Click on "Configure" from the side navigation
- Scroll down to "Build"
- In the "Execute shell" section and "Command" textarea, type the following command
ssh ec2-user@[SERVER VARIABLE] "sudo docker exec [CONTAINER NAME] rails [RAKE TASK COMMAND];"
Replace [SERVER VARIABLE]
with the variable of the server you want to run this task on:
- production:
$PROD_SERVER
- staging:
$STG_SERVER
- development:
$DEV_SERVER
Replace [CONTAINER NAME]
with the name of the docker container
for the application: diffusion-marketplace_app_1
Replace [RAKE TASK COMMAND]
with the name of the task you want to run.
For a full list of available tasks, you can run rake --tasks
in your local project folder.
- ex:
milestones:port_milestones_to_timelines
So an example command would look like this:
ssh ec2-user@$DEV_SERVER "sudo docker exec diffusion-marketplace_app_1 rails milestones:port_milestones_to_timelines;"
- Click "Save"
- Click "Build Now"
- Click the task number in the "Build History"
- Click "Console Output"
- Ensure you see "SUCCESS" in the logs