Whenever you submit a pull request or commit to master, two validation checks occur:
Whenever a pull request to master is created, GitHub checks for merge conflicts as part of its built-in functionality. In addition, we have extended GitHub to run a series of tests on the code using the Jenkins platform to see if content can be published without problems.
When you submit a pull request, you can see the status of these checks on the pull request page:
In this case, both validation passes were successful. When that happens, you can merge your pull request. If one or both of these validation passes fail, this article explains how to fix the errors.
Use the notification that appears in Slack as your publishing dashboard.
No more fishing around in Jenkins for the error log or for the error within the log.
If the job fails, you see the list of errors.
If the job succeeds, you’ll see the following:
[FUTURE ERROR]issues you’ll want to address at some point.
Complete summary of errors - The full set of errors in the repo is listed, not just the error that stopped validation.
Review environment - Create a branch called
review to stage content for Adobe reviewers. See Staging review content.
By default, when you commit to the master branch, you’ll receive a Slack notification for the EXL job. If it fails, it looks something like this:
The errors (and only the errors) are listed as part of the Slack message.
If the job succeeds, it looks something like this:
You’ll get a different publish button (Publish or Publish Now) depending on whether your repo is set to auto-activate. If your content is valid but preview fails, you get a Publish Anyway button.
When you submit a pull request, you do not get a Slack notification. However, the validation summary (including errors) appears in the GitHub page.
Use your LDAP account to sign in to Jenkins.
If you’re a contractor, you might need to get access rights. Contact IT to request to add
http://docs.ci to the list of approved servers for the “Vendor_Basic” VPN.
To change auto-activate or Slack notifications, open your repo in the appropriate tab (EXL, PRs, or Review), and click Configure.
Do any of the following:
@bbringhu) to the Default Value field. Or, if you want to see Slack summaries only for failed validations in that repo, add your Slack name to SLACKERRORSONLY.
The Jenkins validation check makes sure that your content is propertly formatted before it goes through the pipeline and into preview.
Jenkins is a popular open-source automation server. It is responsible for testing and deploying all changes that are made to our markdown on GitHub.
Pipelines - Jenkins is made up of pipelines. In Jenkins, a pipeline can be any kind of workflow. For our documentation, a pipeline represents the workflow of taking changes created in a pull request, building them, testing them, and uploading them.
Jobs - Each pipeline has jobs associated with it. A job is an execution of the pipeline. Each job is recorded so that there is a detailed log of all jobs processed.
There are three types of jobs:
<repo>_exljob kicks off. If validation checks pass, the content is uploaded for preview:
<repo>_pr-exljob kicks off.
<repo>_review-exljob kicks off. If validation checks pass, the content is staged for review:
In some instances, your job shows up as red even though there are no content errors. These ‘false failures’ are caused when the job times out due to an outage or update in the pipeline. If you see that everything passes except for preview, it’s usually the result of a timeout failure.
If everything passes except for preview, you can still publish your content.
Validation checks to make sure that you don’t have any broken links and that you’re using valid Markdown syntax.
Most of the errors you see in this section are self-explanatory. You get the Markdown filename, a description of the error, and the line number where the error occurs. See the Syntax Style Guide.
To fix this, open the file containing the error. Make sure that you open the file in your branch if you submitted a pull request, not in master. Then edit the file and commit the changes to your branch. Committing the change to your branch automatically triggers a new validation job.
Links to images or markdown files that cannot be resolved are failures. Failures stop validation. You can view these broken links in the summary of a Slack notification or Git pull request.
Absolute links to URLs are not checked for validation by default. However, the absolute links might result in broken or unsecure links. We recommend that you check for absolute link errors periodically by running a full link check.
To check absolute links:
Open your repo in Jenkins.
Choose Build with Parameters.
Select the FULLLINKCHECK check box (and REPORTONLY to generate only the log file without deployment).
When the job finishes, click Integrity Link Check in the Slack summary or navigate to the
integrity-link-check.log file in your Jenkins job.
Fix your broken links by doing any of the following:
www.mysite.com) in code blocks so they aren’t rendered as links.
linkcheckexclude.json) in your repo.
These settings are not sticky; the next time you run a job, any check box you selected will be turned off.
We use markdownlint as the basis for validating Markdown syntax. The markdownlint Visual Studio Code extension includes a library of rules to encourage standards and consistency for Markdown files. See this markdownlist readme file for a description of the rules we start with.
The pipeline includes a markdownlint.json file that includes custom rules and turns off rules we don’t want to use. (We turn off MD009, MD012, MD014, MD026, MD028, MD030, MD039, MD027, MD038, MD026, MD024, MD036, MD040, and MD045.) Each repo includes a
markdownlint_custom.json file for turning off rules within that repo.
For editing in Visual Studio Code, an Adobe Markdown extension pack is in its final stages. For now, we recommend that you use the
This extension does not include our current set of rules, but it’s still helpful. We’re working on an Extensions Pack for Adobe that will include these rules.
A Git conflict occurs when an edit in your branch is in conflict with an edit in the master branch that occurred since you created your branch.
The most common Git conflict occurs when two people try to make changes to the same section of content within an article.
When you submit a pull request, check to see if there’s a conflict between your branch and the master.
Click Resolve Conflicts.
In this example, one person changed “AEM rendered” to “staged” and another person added links in the same line. Git doesn’t know which change to pick, so it flags the conflict and makes you decide.
Edit the section or sections with conflicts. Remember to remove the extra lines that are added.
Click Mark as resolved.
Click Commit merged.
Clicking the “Commit merged” option commits the changes you made to your pull request. You can then go on to merge the pull request, assuming of course that the Jenkins validation check passes. If not, well, keep reading.
What if “Resolve Conflicts” is dimmed?
If “Resolve Conflicts” is dimmed, it means there is a Git conflict that cannot be resolved in the editing view. For example, if one person deletes, moves, or renames files that another person edits, that’s a more gnarly problem. You usually need to make the same file changes in the branch and then commit the changes to that branch. Or, contact a member of the SSE team or your local Git expert to help you resolve it.
If you’re willing to blow away the changes to resolve this conflict, select the branch in GitHub Desktop, choose Repository > Open and enter
git reset -hard master and then
git push --force (it’s the equivalent of deleting/re-creating the branch).