Building and Deploying Artifacts to AC - NCIOCPL/cgov-digital-platform GitHub Wiki
High-level Process
- Develop something on your own branch
- Create a Pull Request into a branch within the NCIOCPL/cgov-digital-platform repository.
- During development this will either be the develop branch, feature branch, hotfix branch or a release branch.
- Wait for the status checks to pass.
- Spin up an ODE and let the product team know which environment to review
- Begin Review Cycle
- Product team reviews work and requests changes.
- Developers make changes pushing to their branch. This in turn automatically deploys to the ODE after passing tests.
- Pull request is approved, and code is merged into the branch.
- This should initiate a build and deployment to the development server.
Spinning Up an On-Demand Environment (ODE)
- Login to the cloud dashboard, and go to the
ncigovcd
application. - Click the
+ Add CD Environment
button in the upper right - Enter a Descriptive Name such as
Blog Posts
or something. ClickContinue
button. - Select the
pipelines-build-develop
branch to start the ODE. Click theContinue
button. - Click
Add Environment
to accept the build.- You should see a new environment card appear on the list of environments. It will have a spinning arrow and be mostly white. It is provisioning and you can see the "status" in the Task Log under the Environment cards.
- Wait for the environment to finish spinning up.
- Click on the environment card.
- Click on Variables > Add Environment Variable, and add the
PDQ_IMPORTER_PASS
variable if you need the CDR to connect to your ODE. - Scroll down to the SSH URL and copy it out.
- Open a command prompt and ssh into the server.
cd ~
- Ensure that the two files,
cgov-drupal-users.yml
andslack_settings
exist in the home directory.- If they do not exist, STOP! Feel free to document how to update those files if this happens to you.
- Basically, copy the two files from the dev server.
- If they do not exist, STOP! Feel free to document how to update those files if this happens to you.
- Log out.
- Go back to the main application screen where the listing of environments are.
- Go to your environment's card and click the
Switch Code
button (it is the one with the two arrows) - Select the
pipelines-build-pr-xxx
branch which contains your deployment artifact. (NOTE: this is slightly different from what is in our GitHub codebase.) - Click the
Switch
button - Wait for "Switching Code" to finish and the environment is ready for use.