Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ def matrix = [
'target': 'arm-linux-androideabi',
'test': false,
],
'ghostery-alpha':[
'bundleid': 'com.ghostery.android.alpha',
'ghostery-canary':[
'bundleid': 'com.ghostery.android.canary',
'target': 'arm-linux-androideabi',
'test': false,
],
Expand Down
88 changes: 76 additions & 12 deletions Jenkinsfile.nightlyadhoc
Original file line number Diff line number Diff line change
@@ -1,17 +1,29 @@
#!/bin/env groovy
@Library(['cliqz-shared-library@v1.2', 'browser-android@automation']) _

final CLIQZ = 'cliqz'
final CLIQZ_ALPHA = 'cliqz-alpha'
final GHOSTERY = 'ghostery'
final GHOSTERY_CANARY = 'ghostery-canary'
final CERT_FILE_ID = 'd746a1dd-e075-4844-869a-32116a496352'
final CERT_PASS_ID = 'b7422020-fe1b-4c57-9230-f3d52afee3cf'
final CLIQZ_APIFILE_ID = '2939d2e1-dd9a-4097-adc2-430e3d67157a'
final GHOSTERY_APIFILE_ID = '81d5a4c2-c504-4d18-a29f-18421bb04ddc'
properties([
pipelineTriggers([cron(env.BRANCH_NAME == 'master' ? 'H 23 * * * ' : '')]),
pipelineTriggers([pollSCM(env.BRANCH_NAME == 'master' ? 'H 23 * * * ' : '')]),
parameters([
booleanParam(name: 'CLIQZ_ARM', defaultValue: false, description: 'Builds the Cliqz branded `arm` build.'),
booleanParam(name: 'CLIQZ_X86', defaultValue: false, description: 'Builds the Cliqz branded `x86` build.'),
booleanParam(name: 'GHOSTERY_ARM', defaultValue: true, description: 'Builds the Ghostery branded `arm` build.'),
booleanParam(name: 'GHOSTERY_X86', defaultValue: true, description: 'Builds the Ghostery branded `x86` build.'),
booleanParam(name: 'GHOSTERY_X86', defaultValue: false, description: 'Builds the Ghostery branded `x86` build.'),
booleanParam(name: 'CLIQZ_ALPHA_ARM', defaultValue: false, description: 'Builds the Cliqz-Alpha branded `arm` build.'),
booleanParam(name: 'CLIQZ_ALPHA_X86', defaultValue: false, description: 'Builds the Cliqz-Alpha branded `x86` build.'),
booleanParam(name: 'GHOSTERY_ALPHA_ARM', defaultValue: true, description: 'Builds the Ghostery-Alpha branded `arm` build.'),
booleanParam(name: 'GHOSTERY_ALPHA_X86', defaultValue: false, description: 'Builds the Ghostery-Alpha branded `x86` build.')
booleanParam(name: 'GHOSTERY_CANARY_ARM', defaultValue: true, description: 'Builds the Ghostery-Alpha branded `arm` build.'),
booleanParam(name: 'GHOSTERY_CANARY_X86', defaultValue: true, description: 'Builds the Ghostery-Alpha branded `x86` build.'),
choice( name: 'BRAND',
choices: [ GHOSTERY_CANARY, GHOSTERY, CLIQZ_ALPHA, CLIQZ],
description: 'Pick a brand to publish to the playstore'
)
])
])

Expand Down Expand Up @@ -58,19 +70,19 @@ def matrix = [
'target': 'i686-linux-android',
'buildParam': params.CLIQZ_ALPHA_X86,
],
'Ghostery Alpha ARM':[
'Ghostery Canary ARM':[
'arch': 'arm',
'brand': 'ghostery-alpha',
'brand': 'ghostery-canary',
'channel': 'MA52',
'target': 'arm-linux-androideabi',
'buildParam': params.GHOSTERY_ALPHA_ARM,
'buildParam': params.GHOSTERY_CANARY_ARM,
],
'Ghostery Alpha X86':[
'Ghostery Canary X86':[
'arch': 'x86',
'brand': 'ghostery-alpha',
'brand': 'ghostery-canary',
'channel': 'MA52',
'target': 'i686-linux-android',
'buildParam': params.GHOSTERY_ALPHA_X86,
'buildParam': params.GHOSTERY_CANARY_X86,
],
]
def baseImage
Expand Down Expand Up @@ -124,7 +136,7 @@ def build(Map m){
apk = cliqz.buildBrowser("${androidtarget}", "${brandname}", "nightly", "/app")
}
}
stage("Upload: ${flavorname}") {
stage("S3Upload: ${flavorname}") {
withCredentials([
[
$class: 'UsernamePasswordMultiBinding',
Expand Down Expand Up @@ -174,6 +186,58 @@ def stepsForParallelBuilds = helpers.entries(matrix).collectEntries{
stage('Build Applications'){
parallel stepsForParallelBuilds
}
if (params.GHOSTERY_CANARY_ARM && params.GHOSTERY_CANARY_X86 == true){
node ('kria'){
baseImage.inside(){
stage('Upload') {
final brand = params.BRAND
withCredentials([
[
$class: 'UsernamePasswordMultiBinding',
credentialsId: 'f1732e5f-3e84-47ad-9286-a5fa6657ec43',
passwordVariable: 'AWS_SECRET_ACCESS_KEY',
usernameVariable: 'AWS_ACCESS_KEY_ID',
]
]) {
utils.s3Copy(
"s3://repository.cliqz.com/dist/android/nightly/${BRANCH_NAME}/${brand}/latest.apk",
"mozilla-release/mobile/android/",
"arm",
"",
false
)
utils.s3Copy(
"s3://repository.cliqz.com/dist/android/nightly/${BRANCH_NAME}/${brand}/latest_x86.apk",
"mozilla-release/mobile/android/",
"",
"x86",
false
)
sh'mv mozilla-release/mobile/android/_x86.apk mozilla-release/mobile/android/x86.apk'
}
def apiFile
switch(brand) {
case CLIQZ:
case CLIQZ_ALPHA:
apiFile = CLIQZ_APIFILE_ID
break
case GHOSTERY:
case GHOSTERY_CANARY:
apiFile = GHOSTERY_APIFILE_ID
break
default:
error("Invalid Brand")
}
utils.fastlaneRelease(
brand,
CERT_FILE_ID,
CERT_PASS_ID,
apiFile
)
}
}
}
}

def transitionIssueList
def passedBuilds
Expand All @@ -193,7 +257,7 @@ stage('Send email') {
Check console output at ${env.JOB_URL}${env.BUILD_NUMBER}/ to view the results.
"""
params.each { prop, val ->
if(prop != "BRANCH"){
if(prop != "BRAND"){
if(val){
def splitText = prop.toString().toLowerCase().split("_")
def brand = ""
Expand Down
42 changes: 31 additions & 11 deletions Jenkinsfile.upload
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
#!/bin/env groovy
@Library(['cliqz-shared-library@v1.2', 'browser-android@automation']) _

final CLIQZ = 'cliqz'
final CLIQZ_ALPHA = 'cliqz-alpha'
final GHOSTERY = 'ghostery'
final GHOSTERY_CANARY = 'ghostery-canary'
final CERT_FILE_ID = 'd746a1dd-e075-4844-869a-32116a496352'
final CERT_PASS_ID = 'b7422020-fe1b-4c57-9230-f3d52afee3cf'
final CLIQZ_APIFILE_ID = '2939d2e1-dd9a-4097-adc2-430e3d67157a'
final GHOSTERY_APIFILE_ID = '81d5a4c2-c504-4d18-a29f-18421bb04ddc'

properties([
parameters([
booleanParam(name: 'CLIQZ', defaultValue: false, description: 'Builds and uploads the Cliqz brand to Play Store. If False, the Ghostery Brand.')
choice( name: 'BRAND',
choices: [ CLIQZ, CLIQZ_ALPHA, GHOSTERY, GHOSTERY_CANARY ],
description: 'Pick a brand to use' )
])
])

Expand All @@ -22,13 +33,13 @@ node('master') {
baseImage.inside() {
try {
def apk = ""
def brand = (params.CLIQZ) ? "cliqz" : "ghostery"
final brand = params.BRAND
stage('Build and Signs APKS') {
cliqz.buildCliqzReactNative("cliqz")

withCredentials([
file(credentialsId: 'd746a1dd-e075-4844-869a-32116a496352', variable: 'CERT_PATH' ),
string(credentialsId: 'b7422020-fe1b-4c57-9230-f3d52afee3cf', variable: 'CERT_PASS')
file(credentialsId: CERT_FILE_ID, variable: 'CERT_PATH' ),
string(credentialsId: CERT_PASS_ID, variable: 'CERT_PASS')
]) {
apk = cliqz.buildBrowser("i686-linux-android", "${brand}", "release")
sh "cp build/${apk} mozilla-release/mobile/android/x86.apk"
Expand All @@ -37,16 +48,25 @@ node('master') {
}
}
stage('Upload') {
def storeCert = '81d5a4c2-c504-4d18-a29f-18421bb04ddc'
if (params.CLIQZ){
storeCert = '2939d2e1-dd9a-4097-adc2-430e3d67157a'
def apiFile
switch(brand) {
case CLIQZ:
case CLIQZ_ALPHA:
apiFile = CLIQZ_APIFILE_ID
break
case GHOSTERY:
case GHOSTERY_CANARY:
apiFile = GHOSTERY_APIFILE_ID
break
default:
error("Invalid Brand")
}
archiveArtifacts allowEmptyArchive: true, artifacts: "build/*.apk"
utils.fastlaneRelease(
"${brand}",
'd746a1dd-e075-4844-869a-32116a496352',
'b7422020-fe1b-4c57-9230-f3d52afee3cf',
storeCert
brand,
CERT_FILE_ID,
CERT_PASS_ID,
apiFile
)
}
}
Expand Down
2 changes: 1 addition & 1 deletion mozconfigs/deploy.mozconfig
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ ac_add_options --disable-debug
ac_add_options --with-android-sdk=$ANDROID_HOME
ac_add_options --with-android-ndk=$ANDROID_NDK

# Available Brands: 'cliqz', 'cliqz-alpha', 'ghostery' & 'ghostery-alpha'
# Available Brands: 'cliqz', 'cliqz-alpha', 'ghostery' & 'ghostery-canary'
# Write build artifacts to:
mk_add_options MOZ_OBJDIR=./objdir-frontend-android/$BRAND

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
mk_add_options GIT=/usr/bin/git

# Branding
ac_add_options --with-branding=mobile/android/branding/ghostery-alpha
ac_add_options --with-branding=mobile/android/branding/ghostery-canary


# Build Firefox for Android Artifact Mode:
Expand All @@ -17,7 +17,7 @@ ac_add_options --with-android-sdk=/home/jenkins/.mozbuild/android-sdk-linux


# Write build artifacts to:
mk_add_options MOZ_OBJDIR=./objdir-frontend-android/ghostery-alpha
mk_add_options MOZ_OBJDIR=./objdir-frontend-android/ghostery-canary

# l10n support
ac_add_options --with-l10n-base="$topsrcdir/../l10n"
2 changes: 1 addition & 1 deletion mozconfigs/jenkins.mozconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ac_add_options --with-android-sdk=$ANDROID_HOME
# Allow artifact builds:
ac_add_options --enable-artifact-builds

# Available Brands: 'cliqz', 'cliqz-alpha', 'ghostery' & 'ghostery-alpha'
# Available Brands: 'cliqz', 'cliqz-alpha', 'ghostery' & 'ghostery-canary'
# Write build artifacts to:
mk_add_options MOZ_OBJDIR=./objdir-frontend-android/$BRAND

Expand Down
2 changes: 1 addition & 1 deletion mozconfigs/spacifici.mozconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ fi
# Branding
if [ -z "${CLIQZ_BRANDING}" ]
then
CLIQZ_BRANDING="ghostery-alpha"
CLIQZ_BRANDING="ghostery-canary"
fi
ac_add_options --with-branding="mobile/android/branding/${CLIQZ_BRANDING}"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,9 @@
<color name="light_theme_start_tab_font_color">#97A4AE</color>

<color name="light_theme_url_bar_text_highlight">@color/url_bar_dark_blue_color</color>

<!-- Canary branding -->
<color name="canary_background_color">#FDC257</color>
<!-- Cliqz end -->

</resources>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

ANDROID_PACKAGE_NAME=com.ghostery.android.alpha
MOZ_APP_DISPLAYNAME="Ghostery Alpha"
ANDROID_PACKAGE_NAME=com.ghostery.android.canary
MOZ_APP_DISPLAYNAME="Ghostery Canary"
MOZ_APP_VERSION="2.4.2"
KEYSTORE_ALIAS="ghostery"
MOZ_UPDATER=
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright © Cliqz 2019 -->
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/general_blue_color" />
<background android:drawable="@color/canary_background_color" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>
</adaptive-icon>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
json_key_file(ENV["PLAY_STORE_CERT"]) # Path to the json secret file - Follow https://docs.fastlane.tools/actions/supply/#setup to get one
package_name("com.ghostery.android.canary") # e.g. com.krausefx.app