mirror of
https://github.com/status-im/status-mobile.git
synced 2025-01-10 16:56:31 +00:00
Jakub Sokołowski
58d20967ae
For some unknown to me reason we are using a different Yarn call to Shadow-cljs to generate the JSBundle for iOS builds, while the one created by the Android derivation shoudl be exactly the same. I'm changing the target to just be `make jsbundle` while keeping aliases referencing old naming, and moving things around in `nix` folder to reflect the fact that the derivation is no longer Android-specific. Also, crucially, I've changed the `import` in `index.js` to use the `./result/index.js` path, since that's what Nix creates. I'm not sure if this clashes with any developer workflow that takes place locally, so I'd appreciate some testing from developers. Depends on: https://github.com/status-im/status-jenkins-lib/pull/67 Signed-off-by: Jakub Sokołowski <jakub@status.im>
93 lines
2.0 KiB
Plaintext
93 lines
2.0 KiB
Plaintext
library 'status-jenkins-lib@v1.7.7'
|
|
|
|
/* Options section can't access functions in objects. */
|
|
def isPRBuild = utils.isPRBuild()
|
|
|
|
pipeline {
|
|
agent { label 'linux && x86_64 && nix-2.11' }
|
|
|
|
options {
|
|
timestamps()
|
|
/* Prevent Jenkins jobs from running forever */
|
|
timeout(time: 15, unit: 'MINUTES')
|
|
/* Limit builds retained */
|
|
buildDiscarder(logRotator(
|
|
numToKeepStr: '10',
|
|
daysToKeepStr: '20',
|
|
artifactNumToKeepStr: '10',
|
|
))
|
|
/* Abort old PR builds. */
|
|
disableConcurrentBuilds(
|
|
abortPrevious: isPRBuild
|
|
)
|
|
}
|
|
|
|
parameters {
|
|
string(
|
|
name: 'BUILD_TYPE',
|
|
description: 'Specify build type. Values: pr / e2e / nightly / release',
|
|
defaultValue: 'pr',
|
|
)
|
|
}
|
|
|
|
environment {
|
|
LANG = "en_US.UTF-8"
|
|
LC_ALL = "en_US.UTF-8"
|
|
LANGUAGE = "en_US.UTF-8"
|
|
TARGET = 'tests'
|
|
BUILD_ENV = 'prod'
|
|
NIX_CONF_DIR = "${env.WORKSPACE}/nix"
|
|
LOG_FILE = utils.pkgFilename(ext: 'log', arch: 'tests')
|
|
}
|
|
|
|
stages {
|
|
stage('Prep') {
|
|
steps {
|
|
script {
|
|
utils.doGitRebasePR()
|
|
}
|
|
}
|
|
}
|
|
stage('Checks') {
|
|
parallel {
|
|
stage('Lint') {
|
|
steps {
|
|
sh """#!/bin/bash
|
|
set -eo pipefail
|
|
make lint 2>&1 | tee ${LOG_FILE}
|
|
"""
|
|
}
|
|
}
|
|
stage('Tests') {
|
|
steps {
|
|
sh """#!/bin/bash
|
|
set -eo pipefail
|
|
make test 2>&1 | tee -a ${LOG_FILE}
|
|
"""
|
|
}
|
|
}
|
|
}
|
|
}
|
|
stage('Component Tests') {
|
|
steps {
|
|
sh """#!/bin/bash
|
|
set -eo pipefail
|
|
make component-test 2>&1 | tee -a ${LOG_FILE}
|
|
"""
|
|
}
|
|
}
|
|
stage('Upload') {
|
|
steps {
|
|
script {
|
|
env.PKG_URL = s3.uploadArtifact(LOG_FILE)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
post {
|
|
success { script { github.notifyPR(true) } }
|
|
failure { script { github.notifyPR(false) } }
|
|
always { sh 'make purge' }
|
|
}
|
|
}
|