mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 06:03:45 +01:00
Merge pull request #30018 from overleaf/msm-fix-esm-import
[web] Fix ESM import GitOrigin-RevId: 887f4927248241cb3d237e0bdad36b05928657ef
This commit is contained in:
@@ -1,7 +0,0 @@
|
||||
# Autogenerated by build scripts. Do not edit.
|
||||
.eslint*
|
||||
.prettier*
|
||||
libraries/access-token-encryptor/**
|
||||
package-lock.json
|
||||
package.json
|
||||
patches/**
|
||||
-118
@@ -1,118 +0,0 @@
|
||||
// Autogenerated by build scripts. Do not edit.
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
node {
|
||||
label 'jenkins-agent-web'
|
||||
customWorkspace '/workspace'
|
||||
}
|
||||
}
|
||||
options {
|
||||
timestamps()
|
||||
timeout(time: 15, unit: 'MINUTES')
|
||||
}
|
||||
environment {
|
||||
BRANCH_NAME = "${env.CHANGE_BRANCH ? env.CHANGE_BRANCH : env.BRANCH_NAME}"
|
||||
JENKINS_BUILD_NUMBER = "${BUILD_NUMBER}"
|
||||
}
|
||||
stages {
|
||||
stage('Set Build Variables') {
|
||||
steps {
|
||||
script {
|
||||
def relevantCommitHash
|
||||
if (env.CHANGE_BRANCH) {
|
||||
def commitExistsOnRemote = sh(script: "git branch --remotes --contains ${GIT_COMMIT}", returnStdout: true).trim()
|
||||
if (commitExistsOnRemote) {
|
||||
echo "PR build detected, but commit exists on remote. Using ${GIT_COMMIT}"
|
||||
relevantCommitHash = "${GIT_COMMIT}"
|
||||
} else {
|
||||
def parentCommits = sh(script: 'git rev-parse HEAD^@', returnStdout: true).trim().split('\n')
|
||||
if (parentCommits.size() >= 2) {
|
||||
echo "PR build detected. Jenkins checked out a merge commit: ${GIT_COMMIT} (parents: ${parentCommits.join(', ')})"
|
||||
relevantCommitHash = parentCommits[0]
|
||||
echo "Using first parent (branch commit): ${relevantCommitHash}"
|
||||
} else {
|
||||
echo "WARN: PR build detected, but ${GIT_COMMIT} is neither a merge commit, nor does it exist on the remote."
|
||||
relevantCommitHash = "${GIT_COMMIT}"
|
||||
}
|
||||
}
|
||||
} else {
|
||||
echo "Branch build detected. Using commit: ${GIT_COMMIT}"
|
||||
relevantCommitHash = "${GIT_COMMIT}"
|
||||
}
|
||||
env.COMMIT_SHA = relevantCommitHash
|
||||
env.SHORT_SHA = relevantCommitHash.take(7)
|
||||
env.BUILD_NUMBER = "${env.SHORT_SHA}_${env.JENKINS_BUILD_NUMBER}"
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Stage 1') {
|
||||
parallel {
|
||||
stage('Install monorepo') {
|
||||
steps {
|
||||
retry(count: 3) {
|
||||
sh 'make monorepo_setup'
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Create reports folder') {
|
||||
steps {
|
||||
sh 'mkdir libraries/access-token-encryptor/reports'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Stage 2') {
|
||||
parallel {
|
||||
stage('Lint') {
|
||||
steps {
|
||||
sh 'bin/run -w /overleaf/libraries/access-token-encryptor monorepo npm run lint -- --format json --output-file reports/eslint.json'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh """
|
||||
sed -i 's_"filePath":"/overleaf_"filePath":"/workspace_g' libraries/access-token-encryptor/reports/eslint.json
|
||||
"""
|
||||
recordIssues checksAnnotationScope: 'ALL', enabledForFailure: true, failOnError: true, id: 'access-token-encryptor-eslint', name: 'access-token-encryptor eslint', qualityGates: [[integerThreshold: 1, threshold: 1.0, type: 'TOTAL']], sourceCodeRetention: 'LAST_BUILD', tools: [esLint(pattern: 'libraries/access-token-encryptor/reports/eslint.json')]
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Format') {
|
||||
steps {
|
||||
sh 'bin/run -w /overleaf/libraries/access-token-encryptor monorepo npm run format'
|
||||
}
|
||||
}
|
||||
stage('Typecheck') {
|
||||
steps {
|
||||
sh 'bin/run -w /overleaf/libraries/access-token-encryptor monorepo npm run types:check'
|
||||
}
|
||||
}
|
||||
stage('Test') {
|
||||
steps {
|
||||
retry(count: 3) {
|
||||
sh 'bin/run -w /overleaf/libraries/access-token-encryptor monorepo npm run test:ci'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
junit checksName: 'access-token-encryptor test results', testResults: 'libraries/access-token-encryptor/reports/junit-*.xml'
|
||||
}
|
||||
failure {
|
||||
script {
|
||||
if (env.BRANCH_NAME == 'main') {
|
||||
node('built-in') {
|
||||
sh '/usr/local/bin/open-gh-failure-issue --project="🚉 Platform"'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
cleanup {
|
||||
sh 'rm -rf libraries/access-token-encryptor/reports'
|
||||
sh 'make clean_jenkins -j10'
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
# Autogenerated by build scripts. Do not edit.
|
||||
.eslint*
|
||||
.prettier*
|
||||
libraries/fetch-utils/**
|
||||
libraries/o-error/**
|
||||
package-lock.json
|
||||
package.json
|
||||
patches/**
|
||||
Vendored
-118
@@ -1,118 +0,0 @@
|
||||
// Autogenerated by build scripts. Do not edit.
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
node {
|
||||
label 'jenkins-agent-web'
|
||||
customWorkspace '/workspace'
|
||||
}
|
||||
}
|
||||
options {
|
||||
timestamps()
|
||||
timeout(time: 15, unit: 'MINUTES')
|
||||
}
|
||||
environment {
|
||||
BRANCH_NAME = "${env.CHANGE_BRANCH ? env.CHANGE_BRANCH : env.BRANCH_NAME}"
|
||||
JENKINS_BUILD_NUMBER = "${BUILD_NUMBER}"
|
||||
}
|
||||
stages {
|
||||
stage('Set Build Variables') {
|
||||
steps {
|
||||
script {
|
||||
def relevantCommitHash
|
||||
if (env.CHANGE_BRANCH) {
|
||||
def commitExistsOnRemote = sh(script: "git branch --remotes --contains ${GIT_COMMIT}", returnStdout: true).trim()
|
||||
if (commitExistsOnRemote) {
|
||||
echo "PR build detected, but commit exists on remote. Using ${GIT_COMMIT}"
|
||||
relevantCommitHash = "${GIT_COMMIT}"
|
||||
} else {
|
||||
def parentCommits = sh(script: 'git rev-parse HEAD^@', returnStdout: true).trim().split('\n')
|
||||
if (parentCommits.size() >= 2) {
|
||||
echo "PR build detected. Jenkins checked out a merge commit: ${GIT_COMMIT} (parents: ${parentCommits.join(', ')})"
|
||||
relevantCommitHash = parentCommits[0]
|
||||
echo "Using first parent (branch commit): ${relevantCommitHash}"
|
||||
} else {
|
||||
echo "WARN: PR build detected, but ${GIT_COMMIT} is neither a merge commit, nor does it exist on the remote."
|
||||
relevantCommitHash = "${GIT_COMMIT}"
|
||||
}
|
||||
}
|
||||
} else {
|
||||
echo "Branch build detected. Using commit: ${GIT_COMMIT}"
|
||||
relevantCommitHash = "${GIT_COMMIT}"
|
||||
}
|
||||
env.COMMIT_SHA = relevantCommitHash
|
||||
env.SHORT_SHA = relevantCommitHash.take(7)
|
||||
env.BUILD_NUMBER = "${env.SHORT_SHA}_${env.JENKINS_BUILD_NUMBER}"
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Stage 1') {
|
||||
parallel {
|
||||
stage('Install monorepo') {
|
||||
steps {
|
||||
retry(count: 3) {
|
||||
sh 'make monorepo_setup'
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Create reports folder') {
|
||||
steps {
|
||||
sh 'mkdir libraries/fetch-utils/reports'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Stage 2') {
|
||||
parallel {
|
||||
stage('Lint') {
|
||||
steps {
|
||||
sh 'bin/run -w /overleaf/libraries/fetch-utils monorepo npm run lint -- --format json --output-file reports/eslint.json'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh """
|
||||
sed -i 's_"filePath":"/overleaf_"filePath":"/workspace_g' libraries/fetch-utils/reports/eslint.json
|
||||
"""
|
||||
recordIssues checksAnnotationScope: 'ALL', enabledForFailure: true, failOnError: true, id: 'fetch-utils-eslint', name: 'fetch-utils eslint', qualityGates: [[integerThreshold: 1, threshold: 1.0, type: 'TOTAL']], sourceCodeRetention: 'LAST_BUILD', tools: [esLint(pattern: 'libraries/fetch-utils/reports/eslint.json')]
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Format') {
|
||||
steps {
|
||||
sh 'bin/run -w /overleaf/libraries/fetch-utils monorepo npm run format'
|
||||
}
|
||||
}
|
||||
stage('Typecheck') {
|
||||
steps {
|
||||
sh 'bin/run -w /overleaf/libraries/fetch-utils monorepo npm run types:check'
|
||||
}
|
||||
}
|
||||
stage('Test') {
|
||||
steps {
|
||||
retry(count: 3) {
|
||||
sh 'bin/run -w /overleaf/libraries/fetch-utils monorepo npm run test:ci'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
junit checksName: 'fetch-utils test results', testResults: 'libraries/fetch-utils/reports/junit-*.xml'
|
||||
}
|
||||
failure {
|
||||
script {
|
||||
if (env.BRANCH_NAME == 'main') {
|
||||
node('built-in') {
|
||||
sh '/usr/local/bin/open-gh-failure-issue --project="🚉 Platform"'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
cleanup {
|
||||
sh 'rm -rf libraries/fetch-utils/reports'
|
||||
sh 'make clean_jenkins -j10'
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
# Autogenerated by build scripts. Do not edit.
|
||||
.eslint*
|
||||
.prettier*
|
||||
libraries/fetch-utils/**
|
||||
libraries/logger/**
|
||||
libraries/o-error/**
|
||||
package-lock.json
|
||||
package.json
|
||||
patches/**
|
||||
Vendored
-118
@@ -1,118 +0,0 @@
|
||||
// Autogenerated by build scripts. Do not edit.
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
node {
|
||||
label 'jenkins-agent-web'
|
||||
customWorkspace '/workspace'
|
||||
}
|
||||
}
|
||||
options {
|
||||
timestamps()
|
||||
timeout(time: 15, unit: 'MINUTES')
|
||||
}
|
||||
environment {
|
||||
BRANCH_NAME = "${env.CHANGE_BRANCH ? env.CHANGE_BRANCH : env.BRANCH_NAME}"
|
||||
JENKINS_BUILD_NUMBER = "${BUILD_NUMBER}"
|
||||
}
|
||||
stages {
|
||||
stage('Set Build Variables') {
|
||||
steps {
|
||||
script {
|
||||
def relevantCommitHash
|
||||
if (env.CHANGE_BRANCH) {
|
||||
def commitExistsOnRemote = sh(script: "git branch --remotes --contains ${GIT_COMMIT}", returnStdout: true).trim()
|
||||
if (commitExistsOnRemote) {
|
||||
echo "PR build detected, but commit exists on remote. Using ${GIT_COMMIT}"
|
||||
relevantCommitHash = "${GIT_COMMIT}"
|
||||
} else {
|
||||
def parentCommits = sh(script: 'git rev-parse HEAD^@', returnStdout: true).trim().split('\n')
|
||||
if (parentCommits.size() >= 2) {
|
||||
echo "PR build detected. Jenkins checked out a merge commit: ${GIT_COMMIT} (parents: ${parentCommits.join(', ')})"
|
||||
relevantCommitHash = parentCommits[0]
|
||||
echo "Using first parent (branch commit): ${relevantCommitHash}"
|
||||
} else {
|
||||
echo "WARN: PR build detected, but ${GIT_COMMIT} is neither a merge commit, nor does it exist on the remote."
|
||||
relevantCommitHash = "${GIT_COMMIT}"
|
||||
}
|
||||
}
|
||||
} else {
|
||||
echo "Branch build detected. Using commit: ${GIT_COMMIT}"
|
||||
relevantCommitHash = "${GIT_COMMIT}"
|
||||
}
|
||||
env.COMMIT_SHA = relevantCommitHash
|
||||
env.SHORT_SHA = relevantCommitHash.take(7)
|
||||
env.BUILD_NUMBER = "${env.SHORT_SHA}_${env.JENKINS_BUILD_NUMBER}"
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Stage 1') {
|
||||
parallel {
|
||||
stage('Install monorepo') {
|
||||
steps {
|
||||
retry(count: 3) {
|
||||
sh 'make monorepo_setup'
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Create reports folder') {
|
||||
steps {
|
||||
sh 'mkdir libraries/logger/reports'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Stage 2') {
|
||||
parallel {
|
||||
stage('Lint') {
|
||||
steps {
|
||||
sh 'bin/run -w /overleaf/libraries/logger monorepo npm run lint -- --format json --output-file reports/eslint.json'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh """
|
||||
sed -i 's_"filePath":"/overleaf_"filePath":"/workspace_g' libraries/logger/reports/eslint.json
|
||||
"""
|
||||
recordIssues checksAnnotationScope: 'ALL', enabledForFailure: true, failOnError: true, id: 'logger-eslint', name: 'logger eslint', qualityGates: [[integerThreshold: 1, threshold: 1.0, type: 'TOTAL']], sourceCodeRetention: 'LAST_BUILD', tools: [esLint(pattern: 'libraries/logger/reports/eslint.json')]
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Format') {
|
||||
steps {
|
||||
sh 'bin/run -w /overleaf/libraries/logger monorepo npm run format'
|
||||
}
|
||||
}
|
||||
stage('Typecheck') {
|
||||
steps {
|
||||
sh 'bin/run -w /overleaf/libraries/logger monorepo npm run types:check'
|
||||
}
|
||||
}
|
||||
stage('Test') {
|
||||
steps {
|
||||
retry(count: 3) {
|
||||
sh 'bin/run -w /overleaf/libraries/logger monorepo npm run test:ci'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
junit checksName: 'logger test results', testResults: 'libraries/logger/reports/junit-*.xml'
|
||||
}
|
||||
failure {
|
||||
script {
|
||||
if (env.BRANCH_NAME == 'main') {
|
||||
node('built-in') {
|
||||
sh '/usr/local/bin/open-gh-failure-issue --project="🚉 Platform"'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
cleanup {
|
||||
sh 'rm -rf libraries/logger/reports'
|
||||
sh 'make clean_jenkins -j10'
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
# Autogenerated by build scripts. Do not edit.
|
||||
.eslint*
|
||||
.prettier*
|
||||
libraries/metrics/**
|
||||
package-lock.json
|
||||
package.json
|
||||
patches/**
|
||||
Vendored
-118
@@ -1,118 +0,0 @@
|
||||
// Autogenerated by build scripts. Do not edit.
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
node {
|
||||
label 'jenkins-agent-web'
|
||||
customWorkspace '/workspace'
|
||||
}
|
||||
}
|
||||
options {
|
||||
timestamps()
|
||||
timeout(time: 15, unit: 'MINUTES')
|
||||
}
|
||||
environment {
|
||||
BRANCH_NAME = "${env.CHANGE_BRANCH ? env.CHANGE_BRANCH : env.BRANCH_NAME}"
|
||||
JENKINS_BUILD_NUMBER = "${BUILD_NUMBER}"
|
||||
}
|
||||
stages {
|
||||
stage('Set Build Variables') {
|
||||
steps {
|
||||
script {
|
||||
def relevantCommitHash
|
||||
if (env.CHANGE_BRANCH) {
|
||||
def commitExistsOnRemote = sh(script: "git branch --remotes --contains ${GIT_COMMIT}", returnStdout: true).trim()
|
||||
if (commitExistsOnRemote) {
|
||||
echo "PR build detected, but commit exists on remote. Using ${GIT_COMMIT}"
|
||||
relevantCommitHash = "${GIT_COMMIT}"
|
||||
} else {
|
||||
def parentCommits = sh(script: 'git rev-parse HEAD^@', returnStdout: true).trim().split('\n')
|
||||
if (parentCommits.size() >= 2) {
|
||||
echo "PR build detected. Jenkins checked out a merge commit: ${GIT_COMMIT} (parents: ${parentCommits.join(', ')})"
|
||||
relevantCommitHash = parentCommits[0]
|
||||
echo "Using first parent (branch commit): ${relevantCommitHash}"
|
||||
} else {
|
||||
echo "WARN: PR build detected, but ${GIT_COMMIT} is neither a merge commit, nor does it exist on the remote."
|
||||
relevantCommitHash = "${GIT_COMMIT}"
|
||||
}
|
||||
}
|
||||
} else {
|
||||
echo "Branch build detected. Using commit: ${GIT_COMMIT}"
|
||||
relevantCommitHash = "${GIT_COMMIT}"
|
||||
}
|
||||
env.COMMIT_SHA = relevantCommitHash
|
||||
env.SHORT_SHA = relevantCommitHash.take(7)
|
||||
env.BUILD_NUMBER = "${env.SHORT_SHA}_${env.JENKINS_BUILD_NUMBER}"
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Stage 1') {
|
||||
parallel {
|
||||
stage('Install monorepo') {
|
||||
steps {
|
||||
retry(count: 3) {
|
||||
sh 'make monorepo_setup'
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Create reports folder') {
|
||||
steps {
|
||||
sh 'mkdir libraries/metrics/reports'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Stage 2') {
|
||||
parallel {
|
||||
stage('Lint') {
|
||||
steps {
|
||||
sh 'bin/run -w /overleaf/libraries/metrics monorepo npm run lint -- --format json --output-file reports/eslint.json'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh """
|
||||
sed -i 's_"filePath":"/overleaf_"filePath":"/workspace_g' libraries/metrics/reports/eslint.json
|
||||
"""
|
||||
recordIssues checksAnnotationScope: 'ALL', enabledForFailure: true, failOnError: true, id: 'metrics-eslint', name: 'metrics eslint', qualityGates: [[integerThreshold: 1, threshold: 1.0, type: 'TOTAL']], sourceCodeRetention: 'LAST_BUILD', tools: [esLint(pattern: 'libraries/metrics/reports/eslint.json')]
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Format') {
|
||||
steps {
|
||||
sh 'bin/run -w /overleaf/libraries/metrics monorepo npm run format'
|
||||
}
|
||||
}
|
||||
stage('Typecheck') {
|
||||
steps {
|
||||
sh 'bin/run -w /overleaf/libraries/metrics monorepo npm run types:check'
|
||||
}
|
||||
}
|
||||
stage('Test') {
|
||||
steps {
|
||||
retry(count: 3) {
|
||||
sh 'bin/run -w /overleaf/libraries/metrics monorepo npm run test:ci'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
junit checksName: 'metrics test results', testResults: 'libraries/metrics/reports/junit-*.xml'
|
||||
}
|
||||
failure {
|
||||
script {
|
||||
if (env.BRANCH_NAME == 'main') {
|
||||
node('built-in') {
|
||||
sh '/usr/local/bin/open-gh-failure-issue --project="🚉 Platform"'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
cleanup {
|
||||
sh 'rm -rf libraries/metrics/reports'
|
||||
sh 'make clean_jenkins -j10'
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
# Autogenerated by build scripts. Do not edit.
|
||||
.eslint*
|
||||
.prettier*
|
||||
libraries/mongo-utils/**
|
||||
package-lock.json
|
||||
package.json
|
||||
patches/**
|
||||
Vendored
-108
@@ -1,108 +0,0 @@
|
||||
// Autogenerated by build scripts. Do not edit.
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
node {
|
||||
label 'jenkins-agent-web'
|
||||
customWorkspace '/workspace'
|
||||
}
|
||||
}
|
||||
options {
|
||||
timestamps()
|
||||
timeout(time: 15, unit: 'MINUTES')
|
||||
}
|
||||
environment {
|
||||
BRANCH_NAME = "${env.CHANGE_BRANCH ? env.CHANGE_BRANCH : env.BRANCH_NAME}"
|
||||
JENKINS_BUILD_NUMBER = "${BUILD_NUMBER}"
|
||||
}
|
||||
stages {
|
||||
stage('Set Build Variables') {
|
||||
steps {
|
||||
script {
|
||||
def relevantCommitHash
|
||||
if (env.CHANGE_BRANCH) {
|
||||
def commitExistsOnRemote = sh(script: "git branch --remotes --contains ${GIT_COMMIT}", returnStdout: true).trim()
|
||||
if (commitExistsOnRemote) {
|
||||
echo "PR build detected, but commit exists on remote. Using ${GIT_COMMIT}"
|
||||
relevantCommitHash = "${GIT_COMMIT}"
|
||||
} else {
|
||||
def parentCommits = sh(script: 'git rev-parse HEAD^@', returnStdout: true).trim().split('\n')
|
||||
if (parentCommits.size() >= 2) {
|
||||
echo "PR build detected. Jenkins checked out a merge commit: ${GIT_COMMIT} (parents: ${parentCommits.join(', ')})"
|
||||
relevantCommitHash = parentCommits[0]
|
||||
echo "Using first parent (branch commit): ${relevantCommitHash}"
|
||||
} else {
|
||||
echo "WARN: PR build detected, but ${GIT_COMMIT} is neither a merge commit, nor does it exist on the remote."
|
||||
relevantCommitHash = "${GIT_COMMIT}"
|
||||
}
|
||||
}
|
||||
} else {
|
||||
echo "Branch build detected. Using commit: ${GIT_COMMIT}"
|
||||
relevantCommitHash = "${GIT_COMMIT}"
|
||||
}
|
||||
env.COMMIT_SHA = relevantCommitHash
|
||||
env.SHORT_SHA = relevantCommitHash.take(7)
|
||||
env.BUILD_NUMBER = "${env.SHORT_SHA}_${env.JENKINS_BUILD_NUMBER}"
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Stage 1') {
|
||||
parallel {
|
||||
stage('Install monorepo') {
|
||||
steps {
|
||||
retry(count: 3) {
|
||||
sh 'make monorepo_setup'
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Create reports folder') {
|
||||
steps {
|
||||
sh 'mkdir libraries/mongo-utils/reports'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Stage 2') {
|
||||
parallel {
|
||||
stage('Lint') {
|
||||
steps {
|
||||
sh 'bin/run -w /overleaf/libraries/mongo-utils monorepo npm run lint -- --format json --output-file reports/eslint.json'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh """
|
||||
sed -i 's_"filePath":"/overleaf_"filePath":"/workspace_g' libraries/mongo-utils/reports/eslint.json
|
||||
"""
|
||||
recordIssues checksAnnotationScope: 'ALL', enabledForFailure: true, failOnError: true, id: 'mongo-utils-eslint', name: 'mongo-utils eslint', qualityGates: [[integerThreshold: 1, threshold: 1.0, type: 'TOTAL']], sourceCodeRetention: 'LAST_BUILD', tools: [esLint(pattern: 'libraries/mongo-utils/reports/eslint.json')]
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Format') {
|
||||
steps {
|
||||
sh 'bin/run -w /overleaf/libraries/mongo-utils monorepo npm run format'
|
||||
}
|
||||
}
|
||||
stage('Typecheck') {
|
||||
steps {
|
||||
sh 'bin/run -w /overleaf/libraries/mongo-utils monorepo npm run types:check'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
failure {
|
||||
script {
|
||||
if (env.BRANCH_NAME == 'main') {
|
||||
node('built-in') {
|
||||
sh '/usr/local/bin/open-gh-failure-issue --project="🚉 Platform"'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
cleanup {
|
||||
sh 'rm -rf libraries/mongo-utils/reports'
|
||||
sh 'make clean_jenkins -j10'
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
# Autogenerated by build scripts. Do not edit.
|
||||
.eslint*
|
||||
.prettier*
|
||||
libraries/o-error/**
|
||||
package-lock.json
|
||||
package.json
|
||||
patches/**
|
||||
Vendored
-118
@@ -1,118 +0,0 @@
|
||||
// Autogenerated by build scripts. Do not edit.
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
node {
|
||||
label 'jenkins-agent-web'
|
||||
customWorkspace '/workspace'
|
||||
}
|
||||
}
|
||||
options {
|
||||
timestamps()
|
||||
timeout(time: 15, unit: 'MINUTES')
|
||||
}
|
||||
environment {
|
||||
BRANCH_NAME = "${env.CHANGE_BRANCH ? env.CHANGE_BRANCH : env.BRANCH_NAME}"
|
||||
JENKINS_BUILD_NUMBER = "${BUILD_NUMBER}"
|
||||
}
|
||||
stages {
|
||||
stage('Set Build Variables') {
|
||||
steps {
|
||||
script {
|
||||
def relevantCommitHash
|
||||
if (env.CHANGE_BRANCH) {
|
||||
def commitExistsOnRemote = sh(script: "git branch --remotes --contains ${GIT_COMMIT}", returnStdout: true).trim()
|
||||
if (commitExistsOnRemote) {
|
||||
echo "PR build detected, but commit exists on remote. Using ${GIT_COMMIT}"
|
||||
relevantCommitHash = "${GIT_COMMIT}"
|
||||
} else {
|
||||
def parentCommits = sh(script: 'git rev-parse HEAD^@', returnStdout: true).trim().split('\n')
|
||||
if (parentCommits.size() >= 2) {
|
||||
echo "PR build detected. Jenkins checked out a merge commit: ${GIT_COMMIT} (parents: ${parentCommits.join(', ')})"
|
||||
relevantCommitHash = parentCommits[0]
|
||||
echo "Using first parent (branch commit): ${relevantCommitHash}"
|
||||
} else {
|
||||
echo "WARN: PR build detected, but ${GIT_COMMIT} is neither a merge commit, nor does it exist on the remote."
|
||||
relevantCommitHash = "${GIT_COMMIT}"
|
||||
}
|
||||
}
|
||||
} else {
|
||||
echo "Branch build detected. Using commit: ${GIT_COMMIT}"
|
||||
relevantCommitHash = "${GIT_COMMIT}"
|
||||
}
|
||||
env.COMMIT_SHA = relevantCommitHash
|
||||
env.SHORT_SHA = relevantCommitHash.take(7)
|
||||
env.BUILD_NUMBER = "${env.SHORT_SHA}_${env.JENKINS_BUILD_NUMBER}"
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Stage 1') {
|
||||
parallel {
|
||||
stage('Install monorepo') {
|
||||
steps {
|
||||
retry(count: 3) {
|
||||
sh 'make monorepo_setup'
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Create reports folder') {
|
||||
steps {
|
||||
sh 'mkdir libraries/o-error/reports'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Stage 2') {
|
||||
parallel {
|
||||
stage('Lint') {
|
||||
steps {
|
||||
sh 'bin/run -w /overleaf/libraries/o-error monorepo npm run lint -- --format json --output-file reports/eslint.json'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh """
|
||||
sed -i 's_"filePath":"/overleaf_"filePath":"/workspace_g' libraries/o-error/reports/eslint.json
|
||||
"""
|
||||
recordIssues checksAnnotationScope: 'ALL', enabledForFailure: true, failOnError: true, id: 'o-error-eslint', name: 'o-error eslint', qualityGates: [[integerThreshold: 1, threshold: 1.0, type: 'TOTAL']], sourceCodeRetention: 'LAST_BUILD', tools: [esLint(pattern: 'libraries/o-error/reports/eslint.json')]
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Format') {
|
||||
steps {
|
||||
sh 'bin/run -w /overleaf/libraries/o-error monorepo npm run format'
|
||||
}
|
||||
}
|
||||
stage('Typecheck') {
|
||||
steps {
|
||||
sh 'bin/run -w /overleaf/libraries/o-error monorepo npm run types:check'
|
||||
}
|
||||
}
|
||||
stage('Test') {
|
||||
steps {
|
||||
retry(count: 3) {
|
||||
sh 'bin/run -w /overleaf/libraries/o-error monorepo npm run test:ci'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
junit checksName: 'o-error test results', testResults: 'libraries/o-error/reports/junit-*.xml'
|
||||
}
|
||||
failure {
|
||||
script {
|
||||
if (env.BRANCH_NAME == 'main') {
|
||||
node('built-in') {
|
||||
sh '/usr/local/bin/open-gh-failure-issue --project="🚉 Platform"'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
cleanup {
|
||||
sh 'rm -rf libraries/o-error/reports'
|
||||
sh 'make clean_jenkins -j10'
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
# Autogenerated by build scripts. Do not edit.
|
||||
.eslint*
|
||||
.prettier*
|
||||
libraries/fetch-utils/**
|
||||
libraries/logger/**
|
||||
libraries/metrics/**
|
||||
libraries/o-error/**
|
||||
libraries/object-persistor/**
|
||||
libraries/stream-utils/**
|
||||
package-lock.json
|
||||
package.json
|
||||
patches/**
|
||||
-118
@@ -1,118 +0,0 @@
|
||||
// Autogenerated by build scripts. Do not edit.
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
node {
|
||||
label 'jenkins-agent-web'
|
||||
customWorkspace '/workspace'
|
||||
}
|
||||
}
|
||||
options {
|
||||
timestamps()
|
||||
timeout(time: 15, unit: 'MINUTES')
|
||||
}
|
||||
environment {
|
||||
BRANCH_NAME = "${env.CHANGE_BRANCH ? env.CHANGE_BRANCH : env.BRANCH_NAME}"
|
||||
JENKINS_BUILD_NUMBER = "${BUILD_NUMBER}"
|
||||
}
|
||||
stages {
|
||||
stage('Set Build Variables') {
|
||||
steps {
|
||||
script {
|
||||
def relevantCommitHash
|
||||
if (env.CHANGE_BRANCH) {
|
||||
def commitExistsOnRemote = sh(script: "git branch --remotes --contains ${GIT_COMMIT}", returnStdout: true).trim()
|
||||
if (commitExistsOnRemote) {
|
||||
echo "PR build detected, but commit exists on remote. Using ${GIT_COMMIT}"
|
||||
relevantCommitHash = "${GIT_COMMIT}"
|
||||
} else {
|
||||
def parentCommits = sh(script: 'git rev-parse HEAD^@', returnStdout: true).trim().split('\n')
|
||||
if (parentCommits.size() >= 2) {
|
||||
echo "PR build detected. Jenkins checked out a merge commit: ${GIT_COMMIT} (parents: ${parentCommits.join(', ')})"
|
||||
relevantCommitHash = parentCommits[0]
|
||||
echo "Using first parent (branch commit): ${relevantCommitHash}"
|
||||
} else {
|
||||
echo "WARN: PR build detected, but ${GIT_COMMIT} is neither a merge commit, nor does it exist on the remote."
|
||||
relevantCommitHash = "${GIT_COMMIT}"
|
||||
}
|
||||
}
|
||||
} else {
|
||||
echo "Branch build detected. Using commit: ${GIT_COMMIT}"
|
||||
relevantCommitHash = "${GIT_COMMIT}"
|
||||
}
|
||||
env.COMMIT_SHA = relevantCommitHash
|
||||
env.SHORT_SHA = relevantCommitHash.take(7)
|
||||
env.BUILD_NUMBER = "${env.SHORT_SHA}_${env.JENKINS_BUILD_NUMBER}"
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Stage 1') {
|
||||
parallel {
|
||||
stage('Install monorepo') {
|
||||
steps {
|
||||
retry(count: 3) {
|
||||
sh 'make monorepo_setup'
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Create reports folder') {
|
||||
steps {
|
||||
sh 'mkdir libraries/object-persistor/reports'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Stage 2') {
|
||||
parallel {
|
||||
stage('Lint') {
|
||||
steps {
|
||||
sh 'bin/run -w /overleaf/libraries/object-persistor monorepo npm run lint -- --format json --output-file reports/eslint.json'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh """
|
||||
sed -i 's_"filePath":"/overleaf_"filePath":"/workspace_g' libraries/object-persistor/reports/eslint.json
|
||||
"""
|
||||
recordIssues checksAnnotationScope: 'ALL', enabledForFailure: true, failOnError: true, id: 'object-persistor-eslint', name: 'object-persistor eslint', qualityGates: [[integerThreshold: 1, threshold: 1.0, type: 'TOTAL']], sourceCodeRetention: 'LAST_BUILD', tools: [esLint(pattern: 'libraries/object-persistor/reports/eslint.json')]
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Format') {
|
||||
steps {
|
||||
sh 'bin/run -w /overleaf/libraries/object-persistor monorepo npm run format'
|
||||
}
|
||||
}
|
||||
stage('Typecheck') {
|
||||
steps {
|
||||
sh 'bin/run -w /overleaf/libraries/object-persistor monorepo npm run types:check'
|
||||
}
|
||||
}
|
||||
stage('Test') {
|
||||
steps {
|
||||
retry(count: 3) {
|
||||
sh 'bin/run -w /overleaf/libraries/object-persistor monorepo npm run test:ci'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
junit checksName: 'object-persistor test results', testResults: 'libraries/object-persistor/reports/junit-*.xml'
|
||||
}
|
||||
failure {
|
||||
script {
|
||||
if (env.BRANCH_NAME == 'main') {
|
||||
node('built-in') {
|
||||
sh '/usr/local/bin/open-gh-failure-issue --project="🚉 Platform"'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
cleanup {
|
||||
sh 'rm -rf libraries/object-persistor/reports'
|
||||
sh 'make clean_jenkins -j10'
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
# Autogenerated by build scripts. Do not edit.
|
||||
.eslint*
|
||||
.prettier*
|
||||
libraries/o-error/**
|
||||
libraries/overleaf-editor-core/**
|
||||
package-lock.json
|
||||
package.json
|
||||
patches/**
|
||||
-118
@@ -1,118 +0,0 @@
|
||||
// Autogenerated by build scripts. Do not edit.
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
node {
|
||||
label 'jenkins-agent-web'
|
||||
customWorkspace '/workspace'
|
||||
}
|
||||
}
|
||||
options {
|
||||
timestamps()
|
||||
timeout(time: 15, unit: 'MINUTES')
|
||||
}
|
||||
environment {
|
||||
BRANCH_NAME = "${env.CHANGE_BRANCH ? env.CHANGE_BRANCH : env.BRANCH_NAME}"
|
||||
JENKINS_BUILD_NUMBER = "${BUILD_NUMBER}"
|
||||
}
|
||||
stages {
|
||||
stage('Set Build Variables') {
|
||||
steps {
|
||||
script {
|
||||
def relevantCommitHash
|
||||
if (env.CHANGE_BRANCH) {
|
||||
def commitExistsOnRemote = sh(script: "git branch --remotes --contains ${GIT_COMMIT}", returnStdout: true).trim()
|
||||
if (commitExistsOnRemote) {
|
||||
echo "PR build detected, but commit exists on remote. Using ${GIT_COMMIT}"
|
||||
relevantCommitHash = "${GIT_COMMIT}"
|
||||
} else {
|
||||
def parentCommits = sh(script: 'git rev-parse HEAD^@', returnStdout: true).trim().split('\n')
|
||||
if (parentCommits.size() >= 2) {
|
||||
echo "PR build detected. Jenkins checked out a merge commit: ${GIT_COMMIT} (parents: ${parentCommits.join(', ')})"
|
||||
relevantCommitHash = parentCommits[0]
|
||||
echo "Using first parent (branch commit): ${relevantCommitHash}"
|
||||
} else {
|
||||
echo "WARN: PR build detected, but ${GIT_COMMIT} is neither a merge commit, nor does it exist on the remote."
|
||||
relevantCommitHash = "${GIT_COMMIT}"
|
||||
}
|
||||
}
|
||||
} else {
|
||||
echo "Branch build detected. Using commit: ${GIT_COMMIT}"
|
||||
relevantCommitHash = "${GIT_COMMIT}"
|
||||
}
|
||||
env.COMMIT_SHA = relevantCommitHash
|
||||
env.SHORT_SHA = relevantCommitHash.take(7)
|
||||
env.BUILD_NUMBER = "${env.SHORT_SHA}_${env.JENKINS_BUILD_NUMBER}"
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Stage 1') {
|
||||
parallel {
|
||||
stage('Install monorepo') {
|
||||
steps {
|
||||
retry(count: 3) {
|
||||
sh 'make monorepo_setup'
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Create reports folder') {
|
||||
steps {
|
||||
sh 'mkdir libraries/overleaf-editor-core/reports'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Stage 2') {
|
||||
parallel {
|
||||
stage('Lint') {
|
||||
steps {
|
||||
sh 'bin/run -w /overleaf/libraries/overleaf-editor-core monorepo npm run lint -- --format json --output-file reports/eslint.json'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh """
|
||||
sed -i 's_"filePath":"/overleaf_"filePath":"/workspace_g' libraries/overleaf-editor-core/reports/eslint.json
|
||||
"""
|
||||
recordIssues checksAnnotationScope: 'ALL', enabledForFailure: true, failOnError: true, id: 'overleaf-editor-core-eslint', name: 'overleaf-editor-core eslint', qualityGates: [[integerThreshold: 1, threshold: 1.0, type: 'TOTAL']], sourceCodeRetention: 'LAST_BUILD', tools: [esLint(pattern: 'libraries/overleaf-editor-core/reports/eslint.json')]
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Format') {
|
||||
steps {
|
||||
sh 'bin/run -w /overleaf/libraries/overleaf-editor-core monorepo npm run format'
|
||||
}
|
||||
}
|
||||
stage('Typecheck') {
|
||||
steps {
|
||||
sh 'bin/run -w /overleaf/libraries/overleaf-editor-core monorepo npm run types:check'
|
||||
}
|
||||
}
|
||||
stage('Test') {
|
||||
steps {
|
||||
retry(count: 3) {
|
||||
sh 'bin/run -w /overleaf/libraries/overleaf-editor-core monorepo npm run test:ci'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
junit checksName: 'overleaf-editor-core test results', testResults: 'libraries/overleaf-editor-core/reports/junit-*.xml'
|
||||
}
|
||||
failure {
|
||||
script {
|
||||
if (env.BRANCH_NAME == 'main') {
|
||||
node('built-in') {
|
||||
sh '/usr/local/bin/open-gh-failure-issue --project="🥑 Core"'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
cleanup {
|
||||
sh 'rm -rf libraries/overleaf-editor-core/reports'
|
||||
sh 'make clean_jenkins -j10'
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
# Autogenerated by build scripts. Do not edit.
|
||||
.eslint*
|
||||
.prettier*
|
||||
libraries/promise-utils/**
|
||||
package-lock.json
|
||||
package.json
|
||||
patches/**
|
||||
Vendored
-118
@@ -1,118 +0,0 @@
|
||||
// Autogenerated by build scripts. Do not edit.
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
node {
|
||||
label 'jenkins-agent-web'
|
||||
customWorkspace '/workspace'
|
||||
}
|
||||
}
|
||||
options {
|
||||
timestamps()
|
||||
timeout(time: 15, unit: 'MINUTES')
|
||||
}
|
||||
environment {
|
||||
BRANCH_NAME = "${env.CHANGE_BRANCH ? env.CHANGE_BRANCH : env.BRANCH_NAME}"
|
||||
JENKINS_BUILD_NUMBER = "${BUILD_NUMBER}"
|
||||
}
|
||||
stages {
|
||||
stage('Set Build Variables') {
|
||||
steps {
|
||||
script {
|
||||
def relevantCommitHash
|
||||
if (env.CHANGE_BRANCH) {
|
||||
def commitExistsOnRemote = sh(script: "git branch --remotes --contains ${GIT_COMMIT}", returnStdout: true).trim()
|
||||
if (commitExistsOnRemote) {
|
||||
echo "PR build detected, but commit exists on remote. Using ${GIT_COMMIT}"
|
||||
relevantCommitHash = "${GIT_COMMIT}"
|
||||
} else {
|
||||
def parentCommits = sh(script: 'git rev-parse HEAD^@', returnStdout: true).trim().split('\n')
|
||||
if (parentCommits.size() >= 2) {
|
||||
echo "PR build detected. Jenkins checked out a merge commit: ${GIT_COMMIT} (parents: ${parentCommits.join(', ')})"
|
||||
relevantCommitHash = parentCommits[0]
|
||||
echo "Using first parent (branch commit): ${relevantCommitHash}"
|
||||
} else {
|
||||
echo "WARN: PR build detected, but ${GIT_COMMIT} is neither a merge commit, nor does it exist on the remote."
|
||||
relevantCommitHash = "${GIT_COMMIT}"
|
||||
}
|
||||
}
|
||||
} else {
|
||||
echo "Branch build detected. Using commit: ${GIT_COMMIT}"
|
||||
relevantCommitHash = "${GIT_COMMIT}"
|
||||
}
|
||||
env.COMMIT_SHA = relevantCommitHash
|
||||
env.SHORT_SHA = relevantCommitHash.take(7)
|
||||
env.BUILD_NUMBER = "${env.SHORT_SHA}_${env.JENKINS_BUILD_NUMBER}"
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Stage 1') {
|
||||
parallel {
|
||||
stage('Install monorepo') {
|
||||
steps {
|
||||
retry(count: 3) {
|
||||
sh 'make monorepo_setup'
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Create reports folder') {
|
||||
steps {
|
||||
sh 'mkdir libraries/promise-utils/reports'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Stage 2') {
|
||||
parallel {
|
||||
stage('Lint') {
|
||||
steps {
|
||||
sh 'bin/run -w /overleaf/libraries/promise-utils monorepo npm run lint -- --format json --output-file reports/eslint.json'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh """
|
||||
sed -i 's_"filePath":"/overleaf_"filePath":"/workspace_g' libraries/promise-utils/reports/eslint.json
|
||||
"""
|
||||
recordIssues checksAnnotationScope: 'ALL', enabledForFailure: true, failOnError: true, id: 'promise-utils-eslint', name: 'promise-utils eslint', qualityGates: [[integerThreshold: 1, threshold: 1.0, type: 'TOTAL']], sourceCodeRetention: 'LAST_BUILD', tools: [esLint(pattern: 'libraries/promise-utils/reports/eslint.json')]
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Format') {
|
||||
steps {
|
||||
sh 'bin/run -w /overleaf/libraries/promise-utils monorepo npm run format'
|
||||
}
|
||||
}
|
||||
stage('Typecheck') {
|
||||
steps {
|
||||
sh 'bin/run -w /overleaf/libraries/promise-utils monorepo npm run types:check'
|
||||
}
|
||||
}
|
||||
stage('Test') {
|
||||
steps {
|
||||
retry(count: 3) {
|
||||
sh 'bin/run -w /overleaf/libraries/promise-utils monorepo npm run test:ci'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
junit checksName: 'promise-utils test results', testResults: 'libraries/promise-utils/reports/junit-*.xml'
|
||||
}
|
||||
failure {
|
||||
script {
|
||||
if (env.BRANCH_NAME == 'main') {
|
||||
node('built-in') {
|
||||
sh '/usr/local/bin/open-gh-failure-issue --project="🚉 Platform"'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
cleanup {
|
||||
sh 'rm -rf libraries/promise-utils/reports'
|
||||
sh 'make clean_jenkins -j10'
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
# Autogenerated by build scripts. Do not edit.
|
||||
.eslint*
|
||||
.prettier*
|
||||
libraries/ranges-tracker/**
|
||||
package-lock.json
|
||||
package.json
|
||||
patches/**
|
||||
Vendored
-118
@@ -1,118 +0,0 @@
|
||||
// Autogenerated by build scripts. Do not edit.
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
node {
|
||||
label 'jenkins-agent-web'
|
||||
customWorkspace '/workspace'
|
||||
}
|
||||
}
|
||||
options {
|
||||
timestamps()
|
||||
timeout(time: 15, unit: 'MINUTES')
|
||||
}
|
||||
environment {
|
||||
BRANCH_NAME = "${env.CHANGE_BRANCH ? env.CHANGE_BRANCH : env.BRANCH_NAME}"
|
||||
JENKINS_BUILD_NUMBER = "${BUILD_NUMBER}"
|
||||
}
|
||||
stages {
|
||||
stage('Set Build Variables') {
|
||||
steps {
|
||||
script {
|
||||
def relevantCommitHash
|
||||
if (env.CHANGE_BRANCH) {
|
||||
def commitExistsOnRemote = sh(script: "git branch --remotes --contains ${GIT_COMMIT}", returnStdout: true).trim()
|
||||
if (commitExistsOnRemote) {
|
||||
echo "PR build detected, but commit exists on remote. Using ${GIT_COMMIT}"
|
||||
relevantCommitHash = "${GIT_COMMIT}"
|
||||
} else {
|
||||
def parentCommits = sh(script: 'git rev-parse HEAD^@', returnStdout: true).trim().split('\n')
|
||||
if (parentCommits.size() >= 2) {
|
||||
echo "PR build detected. Jenkins checked out a merge commit: ${GIT_COMMIT} (parents: ${parentCommits.join(', ')})"
|
||||
relevantCommitHash = parentCommits[0]
|
||||
echo "Using first parent (branch commit): ${relevantCommitHash}"
|
||||
} else {
|
||||
echo "WARN: PR build detected, but ${GIT_COMMIT} is neither a merge commit, nor does it exist on the remote."
|
||||
relevantCommitHash = "${GIT_COMMIT}"
|
||||
}
|
||||
}
|
||||
} else {
|
||||
echo "Branch build detected. Using commit: ${GIT_COMMIT}"
|
||||
relevantCommitHash = "${GIT_COMMIT}"
|
||||
}
|
||||
env.COMMIT_SHA = relevantCommitHash
|
||||
env.SHORT_SHA = relevantCommitHash.take(7)
|
||||
env.BUILD_NUMBER = "${env.SHORT_SHA}_${env.JENKINS_BUILD_NUMBER}"
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Stage 1') {
|
||||
parallel {
|
||||
stage('Install monorepo') {
|
||||
steps {
|
||||
retry(count: 3) {
|
||||
sh 'make monorepo_setup'
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Create reports folder') {
|
||||
steps {
|
||||
sh 'mkdir libraries/ranges-tracker/reports'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Stage 2') {
|
||||
parallel {
|
||||
stage('Lint') {
|
||||
steps {
|
||||
sh 'bin/run -w /overleaf/libraries/ranges-tracker monorepo npm run lint -- --format json --output-file reports/eslint.json'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh """
|
||||
sed -i 's_"filePath":"/overleaf_"filePath":"/workspace_g' libraries/ranges-tracker/reports/eslint.json
|
||||
"""
|
||||
recordIssues checksAnnotationScope: 'ALL', enabledForFailure: true, failOnError: true, id: 'ranges-tracker-eslint', name: 'ranges-tracker eslint', qualityGates: [[integerThreshold: 1, threshold: 1.0, type: 'TOTAL']], sourceCodeRetention: 'LAST_BUILD', tools: [esLint(pattern: 'libraries/ranges-tracker/reports/eslint.json')]
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Format') {
|
||||
steps {
|
||||
sh 'bin/run -w /overleaf/libraries/ranges-tracker monorepo npm run format'
|
||||
}
|
||||
}
|
||||
stage('Typecheck') {
|
||||
steps {
|
||||
sh 'bin/run -w /overleaf/libraries/ranges-tracker monorepo npm run types:check'
|
||||
}
|
||||
}
|
||||
stage('Test') {
|
||||
steps {
|
||||
retry(count: 3) {
|
||||
sh 'bin/run -w /overleaf/libraries/ranges-tracker monorepo npm run test:ci'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
junit checksName: 'ranges-tracker test results', testResults: 'libraries/ranges-tracker/reports/junit-*.xml'
|
||||
}
|
||||
failure {
|
||||
script {
|
||||
if (env.BRANCH_NAME == 'main') {
|
||||
node('built-in') {
|
||||
sh '/usr/local/bin/open-gh-failure-issue --project="🥑 Core"'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
cleanup {
|
||||
sh 'rm -rf libraries/ranges-tracker/reports'
|
||||
sh 'make clean_jenkins -j10'
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
# Autogenerated by build scripts. Do not edit.
|
||||
.eslint*
|
||||
.prettier*
|
||||
libraries/fetch-utils/**
|
||||
libraries/logger/**
|
||||
libraries/o-error/**
|
||||
libraries/redis-wrapper/**
|
||||
package-lock.json
|
||||
package.json
|
||||
patches/**
|
||||
Vendored
-118
@@ -1,118 +0,0 @@
|
||||
// Autogenerated by build scripts. Do not edit.
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
node {
|
||||
label 'jenkins-agent-web'
|
||||
customWorkspace '/workspace'
|
||||
}
|
||||
}
|
||||
options {
|
||||
timestamps()
|
||||
timeout(time: 15, unit: 'MINUTES')
|
||||
}
|
||||
environment {
|
||||
BRANCH_NAME = "${env.CHANGE_BRANCH ? env.CHANGE_BRANCH : env.BRANCH_NAME}"
|
||||
JENKINS_BUILD_NUMBER = "${BUILD_NUMBER}"
|
||||
}
|
||||
stages {
|
||||
stage('Set Build Variables') {
|
||||
steps {
|
||||
script {
|
||||
def relevantCommitHash
|
||||
if (env.CHANGE_BRANCH) {
|
||||
def commitExistsOnRemote = sh(script: "git branch --remotes --contains ${GIT_COMMIT}", returnStdout: true).trim()
|
||||
if (commitExistsOnRemote) {
|
||||
echo "PR build detected, but commit exists on remote. Using ${GIT_COMMIT}"
|
||||
relevantCommitHash = "${GIT_COMMIT}"
|
||||
} else {
|
||||
def parentCommits = sh(script: 'git rev-parse HEAD^@', returnStdout: true).trim().split('\n')
|
||||
if (parentCommits.size() >= 2) {
|
||||
echo "PR build detected. Jenkins checked out a merge commit: ${GIT_COMMIT} (parents: ${parentCommits.join(', ')})"
|
||||
relevantCommitHash = parentCommits[0]
|
||||
echo "Using first parent (branch commit): ${relevantCommitHash}"
|
||||
} else {
|
||||
echo "WARN: PR build detected, but ${GIT_COMMIT} is neither a merge commit, nor does it exist on the remote."
|
||||
relevantCommitHash = "${GIT_COMMIT}"
|
||||
}
|
||||
}
|
||||
} else {
|
||||
echo "Branch build detected. Using commit: ${GIT_COMMIT}"
|
||||
relevantCommitHash = "${GIT_COMMIT}"
|
||||
}
|
||||
env.COMMIT_SHA = relevantCommitHash
|
||||
env.SHORT_SHA = relevantCommitHash.take(7)
|
||||
env.BUILD_NUMBER = "${env.SHORT_SHA}_${env.JENKINS_BUILD_NUMBER}"
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Stage 1') {
|
||||
parallel {
|
||||
stage('Install monorepo') {
|
||||
steps {
|
||||
retry(count: 3) {
|
||||
sh 'make monorepo_setup'
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Create reports folder') {
|
||||
steps {
|
||||
sh 'mkdir libraries/redis-wrapper/reports'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Stage 2') {
|
||||
parallel {
|
||||
stage('Lint') {
|
||||
steps {
|
||||
sh 'bin/run -w /overleaf/libraries/redis-wrapper monorepo npm run lint -- --format json --output-file reports/eslint.json'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh """
|
||||
sed -i 's_"filePath":"/overleaf_"filePath":"/workspace_g' libraries/redis-wrapper/reports/eslint.json
|
||||
"""
|
||||
recordIssues checksAnnotationScope: 'ALL', enabledForFailure: true, failOnError: true, id: 'redis-wrapper-eslint', name: 'redis-wrapper eslint', qualityGates: [[integerThreshold: 1, threshold: 1.0, type: 'TOTAL']], sourceCodeRetention: 'LAST_BUILD', tools: [esLint(pattern: 'libraries/redis-wrapper/reports/eslint.json')]
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Format') {
|
||||
steps {
|
||||
sh 'bin/run -w /overleaf/libraries/redis-wrapper monorepo npm run format'
|
||||
}
|
||||
}
|
||||
stage('Typecheck') {
|
||||
steps {
|
||||
sh 'bin/run -w /overleaf/libraries/redis-wrapper monorepo npm run types:check'
|
||||
}
|
||||
}
|
||||
stage('Test') {
|
||||
steps {
|
||||
retry(count: 3) {
|
||||
sh 'bin/run -w /overleaf/libraries/redis-wrapper monorepo npm run test:ci'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
junit checksName: 'redis-wrapper test results', testResults: 'libraries/redis-wrapper/reports/junit-*.xml'
|
||||
}
|
||||
failure {
|
||||
script {
|
||||
if (env.BRANCH_NAME == 'main') {
|
||||
node('built-in') {
|
||||
sh '/usr/local/bin/open-gh-failure-issue --project="🚉 Platform"'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
cleanup {
|
||||
sh 'rm -rf libraries/redis-wrapper/reports'
|
||||
sh 'make clean_jenkins -j10'
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
# Autogenerated by build scripts. Do not edit.
|
||||
.eslint*
|
||||
.prettier*
|
||||
libraries/settings/**
|
||||
package-lock.json
|
||||
package.json
|
||||
patches/**
|
||||
Vendored
-108
@@ -1,108 +0,0 @@
|
||||
// Autogenerated by build scripts. Do not edit.
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
node {
|
||||
label 'jenkins-agent-web'
|
||||
customWorkspace '/workspace'
|
||||
}
|
||||
}
|
||||
options {
|
||||
timestamps()
|
||||
timeout(time: 15, unit: 'MINUTES')
|
||||
}
|
||||
environment {
|
||||
BRANCH_NAME = "${env.CHANGE_BRANCH ? env.CHANGE_BRANCH : env.BRANCH_NAME}"
|
||||
JENKINS_BUILD_NUMBER = "${BUILD_NUMBER}"
|
||||
}
|
||||
stages {
|
||||
stage('Set Build Variables') {
|
||||
steps {
|
||||
script {
|
||||
def relevantCommitHash
|
||||
if (env.CHANGE_BRANCH) {
|
||||
def commitExistsOnRemote = sh(script: "git branch --remotes --contains ${GIT_COMMIT}", returnStdout: true).trim()
|
||||
if (commitExistsOnRemote) {
|
||||
echo "PR build detected, but commit exists on remote. Using ${GIT_COMMIT}"
|
||||
relevantCommitHash = "${GIT_COMMIT}"
|
||||
} else {
|
||||
def parentCommits = sh(script: 'git rev-parse HEAD^@', returnStdout: true).trim().split('\n')
|
||||
if (parentCommits.size() >= 2) {
|
||||
echo "PR build detected. Jenkins checked out a merge commit: ${GIT_COMMIT} (parents: ${parentCommits.join(', ')})"
|
||||
relevantCommitHash = parentCommits[0]
|
||||
echo "Using first parent (branch commit): ${relevantCommitHash}"
|
||||
} else {
|
||||
echo "WARN: PR build detected, but ${GIT_COMMIT} is neither a merge commit, nor does it exist on the remote."
|
||||
relevantCommitHash = "${GIT_COMMIT}"
|
||||
}
|
||||
}
|
||||
} else {
|
||||
echo "Branch build detected. Using commit: ${GIT_COMMIT}"
|
||||
relevantCommitHash = "${GIT_COMMIT}"
|
||||
}
|
||||
env.COMMIT_SHA = relevantCommitHash
|
||||
env.SHORT_SHA = relevantCommitHash.take(7)
|
||||
env.BUILD_NUMBER = "${env.SHORT_SHA}_${env.JENKINS_BUILD_NUMBER}"
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Stage 1') {
|
||||
parallel {
|
||||
stage('Install monorepo') {
|
||||
steps {
|
||||
retry(count: 3) {
|
||||
sh 'make monorepo_setup'
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Create reports folder') {
|
||||
steps {
|
||||
sh 'mkdir libraries/settings/reports'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Stage 2') {
|
||||
parallel {
|
||||
stage('Lint') {
|
||||
steps {
|
||||
sh 'bin/run -w /overleaf/libraries/settings monorepo npm run lint -- --format json --output-file reports/eslint.json'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh """
|
||||
sed -i 's_"filePath":"/overleaf_"filePath":"/workspace_g' libraries/settings/reports/eslint.json
|
||||
"""
|
||||
recordIssues checksAnnotationScope: 'ALL', enabledForFailure: true, failOnError: true, id: 'settings-eslint', name: 'settings eslint', qualityGates: [[integerThreshold: 1, threshold: 1.0, type: 'TOTAL']], sourceCodeRetention: 'LAST_BUILD', tools: [esLint(pattern: 'libraries/settings/reports/eslint.json')]
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Format') {
|
||||
steps {
|
||||
sh 'bin/run -w /overleaf/libraries/settings monorepo npm run format'
|
||||
}
|
||||
}
|
||||
stage('Typecheck') {
|
||||
steps {
|
||||
sh 'bin/run -w /overleaf/libraries/settings monorepo npm run types:check'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
failure {
|
||||
script {
|
||||
if (env.BRANCH_NAME == 'main') {
|
||||
node('built-in') {
|
||||
sh '/usr/local/bin/open-gh-failure-issue --project="🚉 Platform"'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
cleanup {
|
||||
sh 'rm -rf libraries/settings/reports'
|
||||
sh 'make clean_jenkins -j10'
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
# Autogenerated by build scripts. Do not edit.
|
||||
.eslint*
|
||||
.prettier*
|
||||
libraries/stream-utils/**
|
||||
package-lock.json
|
||||
package.json
|
||||
patches/**
|
||||
Vendored
-118
@@ -1,118 +0,0 @@
|
||||
// Autogenerated by build scripts. Do not edit.
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
node {
|
||||
label 'jenkins-agent-web'
|
||||
customWorkspace '/workspace'
|
||||
}
|
||||
}
|
||||
options {
|
||||
timestamps()
|
||||
timeout(time: 15, unit: 'MINUTES')
|
||||
}
|
||||
environment {
|
||||
BRANCH_NAME = "${env.CHANGE_BRANCH ? env.CHANGE_BRANCH : env.BRANCH_NAME}"
|
||||
JENKINS_BUILD_NUMBER = "${BUILD_NUMBER}"
|
||||
}
|
||||
stages {
|
||||
stage('Set Build Variables') {
|
||||
steps {
|
||||
script {
|
||||
def relevantCommitHash
|
||||
if (env.CHANGE_BRANCH) {
|
||||
def commitExistsOnRemote = sh(script: "git branch --remotes --contains ${GIT_COMMIT}", returnStdout: true).trim()
|
||||
if (commitExistsOnRemote) {
|
||||
echo "PR build detected, but commit exists on remote. Using ${GIT_COMMIT}"
|
||||
relevantCommitHash = "${GIT_COMMIT}"
|
||||
} else {
|
||||
def parentCommits = sh(script: 'git rev-parse HEAD^@', returnStdout: true).trim().split('\n')
|
||||
if (parentCommits.size() >= 2) {
|
||||
echo "PR build detected. Jenkins checked out a merge commit: ${GIT_COMMIT} (parents: ${parentCommits.join(', ')})"
|
||||
relevantCommitHash = parentCommits[0]
|
||||
echo "Using first parent (branch commit): ${relevantCommitHash}"
|
||||
} else {
|
||||
echo "WARN: PR build detected, but ${GIT_COMMIT} is neither a merge commit, nor does it exist on the remote."
|
||||
relevantCommitHash = "${GIT_COMMIT}"
|
||||
}
|
||||
}
|
||||
} else {
|
||||
echo "Branch build detected. Using commit: ${GIT_COMMIT}"
|
||||
relevantCommitHash = "${GIT_COMMIT}"
|
||||
}
|
||||
env.COMMIT_SHA = relevantCommitHash
|
||||
env.SHORT_SHA = relevantCommitHash.take(7)
|
||||
env.BUILD_NUMBER = "${env.SHORT_SHA}_${env.JENKINS_BUILD_NUMBER}"
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Stage 1') {
|
||||
parallel {
|
||||
stage('Install monorepo') {
|
||||
steps {
|
||||
retry(count: 3) {
|
||||
sh 'make monorepo_setup'
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Create reports folder') {
|
||||
steps {
|
||||
sh 'mkdir libraries/stream-utils/reports'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Stage 2') {
|
||||
parallel {
|
||||
stage('Lint') {
|
||||
steps {
|
||||
sh 'bin/run -w /overleaf/libraries/stream-utils monorepo npm run lint -- --format json --output-file reports/eslint.json'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh """
|
||||
sed -i 's_"filePath":"/overleaf_"filePath":"/workspace_g' libraries/stream-utils/reports/eslint.json
|
||||
"""
|
||||
recordIssues checksAnnotationScope: 'ALL', enabledForFailure: true, failOnError: true, id: 'stream-utils-eslint', name: 'stream-utils eslint', qualityGates: [[integerThreshold: 1, threshold: 1.0, type: 'TOTAL']], sourceCodeRetention: 'LAST_BUILD', tools: [esLint(pattern: 'libraries/stream-utils/reports/eslint.json')]
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Format') {
|
||||
steps {
|
||||
sh 'bin/run -w /overleaf/libraries/stream-utils monorepo npm run format'
|
||||
}
|
||||
}
|
||||
stage('Typecheck') {
|
||||
steps {
|
||||
sh 'bin/run -w /overleaf/libraries/stream-utils monorepo npm run types:check'
|
||||
}
|
||||
}
|
||||
stage('Test') {
|
||||
steps {
|
||||
retry(count: 3) {
|
||||
sh 'bin/run -w /overleaf/libraries/stream-utils monorepo npm run test:ci'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
junit checksName: 'stream-utils test results', testResults: 'libraries/stream-utils/reports/junit-*.xml'
|
||||
}
|
||||
failure {
|
||||
script {
|
||||
if (env.BRANCH_NAME == 'main') {
|
||||
node('built-in') {
|
||||
sh '/usr/local/bin/open-gh-failure-issue --project="🚉 Platform"'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
cleanup {
|
||||
sh 'rm -rf libraries/stream-utils/reports'
|
||||
sh 'make clean_jenkins -j10'
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
# Autogenerated by build scripts. Do not edit.
|
||||
.eslint*
|
||||
.prettier*
|
||||
libraries/o-error/**
|
||||
libraries/validation-tools/**
|
||||
package-lock.json
|
||||
package.json
|
||||
patches/**
|
||||
-109
@@ -1,109 +0,0 @@
|
||||
// Autogenerated by build scripts. Do not edit.
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
node {
|
||||
label 'jenkins-agent-web'
|
||||
customWorkspace '/workspace'
|
||||
}
|
||||
}
|
||||
options {
|
||||
timestamps()
|
||||
timeout(time: 15, unit: 'MINUTES')
|
||||
}
|
||||
environment {
|
||||
BRANCH_NAME = "${env.CHANGE_BRANCH ? env.CHANGE_BRANCH : env.BRANCH_NAME}"
|
||||
JENKINS_BUILD_NUMBER = "${BUILD_NUMBER}"
|
||||
}
|
||||
stages {
|
||||
stage('Set Build Variables') {
|
||||
steps {
|
||||
script {
|
||||
def relevantCommitHash
|
||||
if (env.CHANGE_BRANCH) {
|
||||
def commitExistsOnRemote = sh(script: "git branch --remotes --contains ${GIT_COMMIT}", returnStdout: true).trim()
|
||||
if (commitExistsOnRemote) {
|
||||
echo "PR build detected, but commit exists on remote. Using ${GIT_COMMIT}"
|
||||
relevantCommitHash = "${GIT_COMMIT}"
|
||||
} else {
|
||||
def parentCommits = sh(script: 'git rev-parse HEAD^@', returnStdout: true).trim().split('\n')
|
||||
if (parentCommits.size() >= 2) {
|
||||
echo "PR build detected. Jenkins checked out a merge commit: ${GIT_COMMIT} (parents: ${parentCommits.join(', ')})"
|
||||
relevantCommitHash = parentCommits[0]
|
||||
echo "Using first parent (branch commit): ${relevantCommitHash}"
|
||||
} else {
|
||||
echo "WARN: PR build detected, but ${GIT_COMMIT} is neither a merge commit, nor does it exist on the remote."
|
||||
relevantCommitHash = "${GIT_COMMIT}"
|
||||
}
|
||||
}
|
||||
} else {
|
||||
echo "Branch build detected. Using commit: ${GIT_COMMIT}"
|
||||
relevantCommitHash = "${GIT_COMMIT}"
|
||||
}
|
||||
env.COMMIT_SHA = relevantCommitHash
|
||||
env.SHORT_SHA = relevantCommitHash.take(7)
|
||||
env.BUILD_NUMBER = "${env.SHORT_SHA}_${env.JENKINS_BUILD_NUMBER}"
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Stage 1') {
|
||||
parallel {
|
||||
stage('Install monorepo') {
|
||||
steps {
|
||||
retry(count: 3) {
|
||||
sh 'make monorepo_setup'
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Create reports folder') {
|
||||
steps {
|
||||
sh 'mkdir libraries/validation-tools/reports'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Stage 2') {
|
||||
parallel {
|
||||
stage('Lint') {
|
||||
steps {
|
||||
sh 'bin/run -w /overleaf/libraries/validation-tools monorepo npm run lint -- --format json --output-file reports/eslint.json'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh """
|
||||
sed -i 's_"filePath":"/overleaf_"filePath":"/workspace_g' libraries/validation-tools/reports/eslint.json
|
||||
"""
|
||||
recordIssues checksAnnotationScope: 'ALL', enabledForFailure: true, failOnError: true, id: 'validation-tools-eslint', name: 'validation-tools eslint', qualityGates: [[integerThreshold: 1, threshold: 1.0, type: 'TOTAL']], sourceCodeRetention: 'LAST_BUILD', tools: [esLint(pattern: 'libraries/validation-tools/reports/eslint.json')]
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Format') {
|
||||
steps {
|
||||
sh 'bin/run -w /overleaf/libraries/validation-tools monorepo npm run format'
|
||||
}
|
||||
}
|
||||
stage('Typecheck') {
|
||||
steps {
|
||||
sh 'bin/run -w /overleaf/libraries/validation-tools monorepo npm run types:check'
|
||||
}
|
||||
}
|
||||
stage('Test') {
|
||||
steps {
|
||||
retry(count: 3) {
|
||||
sh 'bin/run -w /overleaf/libraries/validation-tools monorepo npm run test:ci'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
junit checksName: 'validation-tools test results', testResults: 'libraries/validation-tools/reports/junit-*.xml'
|
||||
}
|
||||
cleanup {
|
||||
sh 'rm -rf libraries/validation-tools/reports'
|
||||
sh 'make clean_jenkins -j10'
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user