Continuous Integration Techniques (8% Weighting) Flashcards
Given a complex customer scenario ability, identify the appropriate use of source control, automated test, and deployment tools and demonstrate the ability to articulate the process involved
Which of the following outcomes can be realized by teams who do not use version control?
A. Overwriting changes made by other users
B. Corruption of shared file servers
C. Deployment failures
D. Merge conflicts
A. Overwriting changes made by other users
How does version control ease the burden of collaboration among team members?
A. Maintaining regular backups of team member’s laptops
B. Enforcing strict rules and processes on team members
C. Provides a one-size-fits-all solution for teams to collaborate
D. Provides a way to organize work from many team members
D. Provides a way to organize work from many team members
GitHub enhances collaboration in teams by:
A. Providing a group chat functionality
B. Providing visibility into the team’s work and the ability to review code
C. Providing the ability to share screens
D. Providing a toll-free number to use for web meetings
B. Providing visibility into the team’s work and the ability to review code
What is the main difference between GIT and GitHub?
Git is a version control application
GitHub is a collaboration Platform
What is the key relationship between Git and GitHub?
A. Git is a VCS. GitHub is a collaboration platform that is built on top of Git
B. GitHub is Git for teams
C. Git and GitHub are the same product, but with slightly different names based on whether you use it locally or through a web browser.
D. GitHub is the graphical user interface for Git, but it has identical functionality
A. Git is a VCS. GitHub is a collaboration platform that is built on top of Git
Which of the following is considered an essential tool in the modern developer’s toolkit?
A. A shared drive for maintaining backups of project versions
B. A Flash drive for sharing files with team members
C. Continuous integration
D. A backup strategy for compiled versions of your project
C. Continuous integration
GitHub helps you customize your workflows with:
A. A growing list of integration partners like Waffle.io and ZenHub
B. A built-in lightweight project management solution
C. The ability to integrate with continuous integration and continuous deployment applications
D. All of the above
D. All of the above
Where can you view the files within a repository on GitHub?
A. Code tab
B. Issues tab
C. Pull Requests tab
D. Projects tab
A. Code tab
Which account type is best suited for large, diverse teams with many projects?
A. Individual
B. Organization
C. Team
D. Administrator
B. Organization
What is the primary function of Issues in GitHub?
A. Making commits
B. Comparing branches
C. Having conversations
D. Cross referencing other issues and pull requests
C. Having conversations
What are the 5 main steps in a GitHub workflow?
- Create a branch off a master
- Make commits
- Open a pull request
- Collaborate (Make more commits, interact with integrations)
- Merge to master branch
What is the first step of the GitHub flow?
A. Merging
B. Committing
C. Branching
D. Cloning
C. Branching
Which of the following commands is used to synchronize the remote and local working environments?
A. git pull
B. git merge
C. git status
D. git commit
A. git pull
What command moves a file from the working directory to the staging area?
A. git status
B. git remove -v
C. git staging
D. git add
D. git add
Typically how long should branches (in Git) exist?
A. It doesn’t matter
B. Shorter is better all the time
C. Shorter is best, but long-lived branches may be appropriate in some cases
D. Long-living branches are better for small teams
C. Shorter is best, but long-lived branches may be appropriate in some cases
Merge conflicts happen when:
A. Tow or more people are working on the same file
B. Two or more people are working on the same file at the same time
C. Two or more branches have had changes on the same part of the same file since the branches were created
D. Two or more branches have had changes on the same part of the same file
C. Two or more branches have had changes on the same part of the same file since the branches were created
What is the right amount of change to include in a commit?
A. About 2 hours’ worth of work
B. All of the changes necessary to implement the requested feature
C. A single line of code
D. Enough for a small, logical unit of change
D. Enough for a small, logical unit of change
What hashing algorithm does Git use to identify commits?
A. MD5
B. SHA-1
C. SHA-2
D. AES
B. SHA-1
What command is used to see the history of commits?
A. git status
B. git revert
C. git log
D. git history
C. git log
What is the safest command to use to change history?
A. git reset –soft
B. git commit –amend
C. git revert
D. git rebase
C. git revert
How is rebase used in relation to a merge?
A. A rebase is the same as a merge
B. A rebase lets you move from a fast-foward to a recursive merge scenario
C. A rebase enables you to move from a recursive to a fast-foward merge scenario
D. A rebase lets you select the merge strategy you would like to use
C. A rebase enables you to move from a recursive to a fast-foward merge scenario
Once a project is underway, what important step must a developer do before making changes?
A) Create a new GitHub repo for their code, then create a branch
B) Deploy any changes from the repository into their Developer sandbox
C) Create their own Salesforce DX project
D) Refactor all the code provided by other developers
B) Deploy any changes from the repository into their Developer sandbox
After a developer makes a change in a sandbox org, what step is required to share it with others?
A) Create a new branch in the source control system and a new DX project
B) Test the changes after pushing them to a clean testing org
C) Deploy the changes to every teammate’s sandbox
D) Retrieve the changes from their sandbox to the project in the source repository
D) Retrieve the changes from their sandbox to the project in the source repository
What is the release artifact?
A) A .zip file that contains all the objects and components for the language training services customizations
B) A .zip file that contains only the objects and components that are changing in the release
C) A package version of the changes that the development team has made in this release
D) The inbound change set to deploy to the production environment
B) A .zip file that contains only the objects and components that are changing in the release
Why does the org development model use ‘force:mdapi:deploy’ to deploy changes to staging and production?
A) To skip the step of converting source to metadata format
B) To eliminate the need to run local and integration tests in the staging sandbox
C) To deploy all components in the artifact in a single transaction
D) To give teams 14 days to perform the deployment to minimize customer impact
C) To deploy all components in the artifact in a single transaction
What can developers use the Salesforce CLI for?
Manage their DX projects, create scratch orgs, push and pull metadata to and from a scratch org, and run unit tests
What can DevOps use the Salesforce CLI for?
As part of build automation scripts: To create and access environments, to deploy source, to install packages and to run tests
Scratch orgs provide:
A) A Salesforce org that multiple developers use at the same time
B) A dedicated and disposable Salesforce environment for a developer and their project
C) A copy of an existing sandbox
D) A and B
B) A dedicated and disposable Salesforce environment for a developer and their project
What is the role of sandboxes in the package development model?
A) You don’t use sandboxes in the package development life cycle
B) You use sandboxes for user acceptance testing and as a staging environment
C) It’s a starting point for the development process
D) It’s where you test your package during continuous delivery
E) B and D
E) B and D
How does the Salesforce CLI increase your productivity?
A) IT completely replaces the Setup UI
B) You can create scripts for repetitive tasks, for build automation, or to run tests
C) It contains commands that help you directly interact with your version control system
B) You can create scripts for repetitive tasks, for build automation, or to run tests
The Salesforce DX project:
A) Is an exact copy of your development sandbox
B) Does not have to be checked into source control
C) Contains your source and Salesforce DX configuration files
D) Contains only Salesforce DX Configuration file
C) Contains your source and Salesforce DX configuration files
How do we facilitate change tracking in Salesforce DX?
A) We track changes you make locally, but you need to manually track changes you make in your scratch org
B) We transform large source files into smaller files, which provide more project flexibility and reduce merge conflicts
C) We keep track of both changes you make locally as well as any in your scratch org
D) A and B
E) B and C
E) B and C
Use scratch orgs in the development process to:
A) Perform declarative (point-and-click) development and other tasks directly in an org
B) Maintain all your source for posterity
C) Develop new features over several releases
D) Replace sandboxes for staging
A) Perform declarative (point-and-click) development and other tasks directly in an org
How do scratch orgs support testing and continuous integration>
A) You can refresh them once a day so you can run tests
B) You can pull source and metadata from the scratch org for testing purposes
C) Best practices dictate that you use the same org for development and testing
D) You can spin up a new scratch org specifically for testing and CI
D) You can spin up a new scratch org specifically for testing and CI
Use sandboxes for continuous delivery and user acceptance testing to:
A) Provide new features directly to your customers
B) Test the same process you’ll use to deploy and release to the production org
C) Develop new features or customizations
D) Create the package.xml file
B) Test the same process you’ll use to deploy and release to the production org
What information does the sfdx-project.json file contain?
A) Information required to track source and metadata with your scratch org
B) Configuration information that determines scratch org shape
C) A list of the scratch orgs you’ve created in the Dev Hub
D) Configuration information for your sandbox and production orgs
A) Information required to track source and metadata with your scratch org
What is the CLI command to create a project called MyNewApp?
A) sfdx force:project:create -a MyNewApp
B) sfdx force:create:project -a MyNewApp
C) sfdx force:create:project -n MyNewApp
D) sfdx force:project:create -n MyNewApp
D) sfdx force:project:create -n MyNewApp
What’s an example of the CLI command to import existing Accounts sample data in a different project?
A) sfdx force:data:tree -q Account.json
B) sfdx force:data:tree:import –contenttype data/Account.json
C) sfdx force:data:tree:import –sobjecttreefiles data/Account.json
D) sfdx force:data:tree:import -s Account.json
C) sfdx force:data:tree:import –sobjecttreefiles data/Account.json
Continuous integration benefits your company and customers because:
A) Placing all your source in a central repository enables you to get to market faster
B) You can skip unit testing because all tests are automated
C) By detecting problems and fixing bugs early, you have happy customers and save your company money
D) You can continuously deliver to your sandbox to test the deploy process
C) By detecting problems and fixing bugs early, you have happy customers and save your company money
The tools you use with Salesforce DX for CI are:
A) Version control system and continuous integration tool
B) Version control system, continuous integration tool, Dev Hub, and Salesforce CLI
C) GitHub and Travis CI
D) Version control system, Travis CI, and a sandbox
B) Version control system, continuous integration tool, Dev Hub, and Salesforce CLI
The connected app enables:
A) You to generate the X.509 certificates and private key
B) The deployment of your app to the Dev Hub
C) Your headless process to authorize to the Dev Hub using the web login process
D) Your headless process to connect to the Dev Hub and execute Salesforce CLI commands
D) Your headless process to connect to the Dev Hub and execute Salesforce CLI commands
The command to request and generate the X.509 certificate is:
A) openssl rsa -passin pass:x -in server.pass.key -out server.key
B) which openssl
C) openssl req -new -key server.key -out server.csr
D) openssl genrsa -des3 -passout pass:x -out server.pas.key 2048
C) openssl req -new -key server.key -out server.csr
To execute the JWT bearer flow, Travis CI requires access to the encrypted:
A) server.key
B) server.csr
C) server.crt
D) server.pass.key
A) server.key
The ‘script’ section of the ‘travis.yml’ file contains the:
A) Steps to install Salesforce CLI in the Travis CI VMs
B) Travis CI commands to decrypt the server.key
C) CLI commands to update the Salesforce CLI and initiate the JWT bearer token flow
D) CLI commands to create a scratch org, push source, and run Apex tests
D) CLI commands to create a scratch org, push source, and run Apex tests
What kicks off a Travis CI build?
A) any modification to the ‘travis.yml’ file
B) Any change you commit back to your VCS
C) when you authorize into the Dev Hub
D) When you run any CLI command
B) Any change you commit back to your VCS
What characterizes continuous integration as a development process?
A) Keeping bugs hidden until the product is ready to be released
B) Allowing only one developer at a time to make changes to the source code
C) Including and integrating every code change on every commit
D) Making changes to the source code directly to save development time and resources
C) Including and integrating every code change on every commit
What’s the difference between continuous delivery and continuous deployment?
A) Continuous delivery happens in production while continuous deployment is part of staging
B) Continuous delivery is managed by developers while continuous deployment is managed by product owners
C) Continuous delivery is the next step of continuous deployment, during which changes are manually added to a release
D) In continuous deployment, every change that passes the automated tests is deployed to production automatically while in continuous this is a manual step
D) In continuous deployment, every change that passes the automated tests is deployed to production automatically while in continuous this is a manual step
What is Continuous Integration?
A product is built to include and integrate every code change on every commit (continuously), by any and all developers. An automated build then verifies each check-in, letting teams detect problems early.
What is Continuous Delivery?
Continuous delivery ensures that code can be rapidly and safely deployed to production by manually pushing every change to a production-like environment. You can then deploy the application to production with a push of a button when the time is right.
What is Continuous Deployment?
Continuous deployment is the next step of continuous delivery. Using Continuous Deployment, every change that passes the automated tests is deployed to production automatically.
What are some of the benefits of continuous delivery?
A) Shorter release cycles
B) Discovering issues close to the release time
C) Finding bugs earlier in the development process
D) A and C
D) A and C
Which process is part of a common continuous delivery workflow on Heroku?
A) A review app spins up when creating a pull request in GitHub
B) Heroku CI runs tests upon merging code changes back to the master branch
C) A developer transfers code from Bitbucket to GitHub
D) A and B
E) A and C
D) A and B
What’s one thing you can do with Release Phase (In Heroku?)
A) Run integration tests when code is merged to master
B) Leave comments on a pull request
C) Upload assets to CDN or invalidate a cache
D) Promote apps from staging to production
C) Upload assets to CDN or invalidate a cache
What are Heroku Pipelines?
A group of Heroku apps that share the same codebase
What does GitHub Integration with Heroku Pipelines allow you to do?
It makes it possible to manually or automatically deploy a branch on every GitHub push.
What is Review Apps in Heroku Flow?
It is a new way to propose, discuss, and decide whether to merge changes to your code base. It can even spin up a temporary test app on a unique URL for each opened pull request (PR)
What is the release phase in Heroku Flow?
Release Phase makes it possible to run tasks before a release is deployed to production, eliminating maintenance windows and reducing deployment risk
What is Heroku CI?
Heroku CI is a low-configuration test runner that integrates with Heroku Pipelines. Heroku CI runs your test scripts with zero queue time for faster results, using disposable apps that have parity with your staging and production environments.
What is Heroku ChatOps?
It uses the power of Heroku Pipelines to bring a collaborative deployment workflow to Slack. It enables developers to deploy to staging or promote to production from Slack.
Which of the following is a valid Heroku Pipeline name
A) Demo-Pipeline
B) testdemo
C) test/demo-pipeline
D) 1st-pipeline-test
B) testdemo
It must start with a lowercase letter and not have special characters in it
Review apps in Heroku are created when?
A) A new branch is created for a new feature or code changes in GitHub
B) The “Propose file change” option is selected in GitHub
C) The index.html file is edited
D) You create a pull request in GitHub
D) You create a pull request i nGitHub
What is the best way to preview code chagnes in a browser window?
A) Select “Promote to Production” from under the staging app in your pipeline.
B) Click Open under Update index.html file in GitHub
C) Select “Open app in browser” next to the review app
D) A and B
C) Select “Open app in browser” next to the review app
How do you set up Release Phase in Heroku?
A) Open Procfile and add a release process type and command
B) Move Procfile to the public folder at the root of the GitHub repository
C) Select “Enable automatic deploys” next to the staging app.
D) Add release:echo “You created a new release on Heroku” to the index.html file under the public folder
A) Open Procfile and add a release process type and command
Which feature provides one of the fastest solutions to bad deploys on Heroku?
A) Heroku CI
B) Heroku Rollback
C) Heroku ChatOps
D) A and B
B) Heroku Rollback
What is the best choice for an automated build process?
A) Change Sets
B) Force.com IDE
C) Force.com Migration Tool
And why :)?
C) Force.com Migration Tool
It is an Ant-based script that supports all metadata and allows migration of metadata from one environment to another across different production orgs.
This option requires moderate technical skills for initial setup.
What is Jenkins?
Jenkins is an open-source, extensible automation server for implementing continuous integration and continuous delivery.
You can easily integrate Salesforce DX into the Jenkins framework to automate testing of Salesforce applications against scratch orgs
Name 3 third-party CI Tools
CircleCI
Jenkins
Travis CI
What is CircleCI?
A commonly used integration tool that integrates with your existing version control system to push incremental updates to the environments you specify.
CircleCI can be used as a cloud-based or on-premise tool
What is Travis CI?
Travis CI is a cloud-based continuous integration (CI) service for building and testing software projects hosted on GitHub
What are usually the two main branches within GIT that will have an infinite lifetime (and what do they usually contain?
- master (Main branch where the source code always reflects a production-ready state)
- develop (Main branch where the source code always reflects a state with the latest delivered development changes for the next release)
What are the different type of branches that can typically be used with Git?
- Feature branches
- Release branches
- Hotfix branches
Where would feature branches typically branch from and merge back into?
From develop and merge back into develop
What would be good branch naming convention for feature branches?
Anything except master, develop, release-* or hotfix-*
Feature branches typically exist in developer repos only, not in origin
Where would release branches typically branch from and merge back into?
From develop and merge back into develop and master
What would be good branch naming convention for release branches?
release-*
Release branches typically support preparation of a new production release
Where would hotfix branches typically branch from and merge back into?
From masterand merge back into develop and master
What would be good branch naming convention for hotfix branches?
hotfix-*
Hotfix branches are very much like release branches in that they are also meant to prepare for a new production release, albeit unplanned