-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ALS-4884] Add Google Analytics job (#72)
[ALS-4884] Add new Jenkins Job to set Google analytics ID in the `picsureui_settings.json`. Add Google manager to CSP to allow Google Tag script to load when an Analytics ID has been set.
- Loading branch information
Showing
5 changed files
with
41 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
initial-configuration/jenkins/jenkins-docker/jobs/Configure Google Analytics/config.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?xml version='1.1' encoding='UTF-8'?> | ||
<project> | ||
<actions/> | ||
<description></description> | ||
<keepDependencies>false</keepDependencies> | ||
<properties> | ||
<hudson.model.ParametersDefinitionProperty> | ||
<parameterDefinitions> | ||
<hudson.model.StringParameterDefinition> | ||
<name>ANALYTICS_ID</name> | ||
<description>Google Analytics id. Reset to default to remove.</description> | ||
<defaultValue>__ANALYTICS_ID__</defaultValue> | ||
<trim>false</trim> | ||
</hudson.model.StringParameterDefinition> | ||
</parameterDefinitions> | ||
</hudson.model.ParametersDefinitionProperty> | ||
</properties> | ||
<scm class="hudson.scm.NullSCM"/> | ||
<canRoam>true</canRoam> | ||
<disabled>false</disabled> | ||
<blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding> | ||
<blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding> | ||
<triggers/> | ||
<concurrentBuild>false</concurrentBuild> | ||
<builders> | ||
<hudson.tasks.Shell> | ||
<command>export old_analytics_id=`cat /usr/local/docker-config/httpd/picsureui_settings.json | grep analytics_id | cut -d ':' -f 2 | sed 's/\",*//g'` | ||
|
||
sed -i "s/$old_analytics_id/ANALYTICS_ID/g" /usr/local/docker-config/httpd/picsureui_settings.json | ||
</command> | ||
</hudson.tasks.Shell> | ||
</builders> | ||
<publishers/> | ||
<buildWrappers/> | ||
</project> |