mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 17:19:37 +02: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/stream-utils/**
|
||||
package-lock.json
|
||||
package.json
|
||||
patches/**
|
||||
118
libraries/stream-utils/Jenkinsfile
vendored
118
libraries/stream-utils/Jenkinsfile
vendored
@@ -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'
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user