Skip to content
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Maven
target/
.polyglot.META-INF
build.log
210 changes: 154 additions & 56 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
pipeline {
options {
timeout(time: 2, unit: 'HOURS')
buildDiscarder(logRotator(numToKeepStr:'10'))
disableConcurrentBuilds(abortPrevious: true)
}
options {
timeout(time: 2, unit: 'HOURS')
buildDiscarder(logRotator(numToKeepStr:'10'))
disableConcurrentBuilds(abortPrevious: true)
}

agent {
kubernetes {
inheritFrom 'wildwebdeveloper-buildtest-pod'
Expand Down Expand Up @@ -49,55 +50,152 @@ spec:
"""
}
}
environment {
NPM_CONFIG_USERCONFIG = "$WORKSPACE/.npmrc"
MAVEN_OPTS="-Xmx1024m"
GITHUB_API_CREDENTIALS_ID = 'github-bot-token'
}
stages {
stage('Prepare-environment') {
steps {
container('container') {
sh 'java -version'
sh 'mvn --version'
sh 'node --version'
sh 'npm --version'
sh 'npm config set cache="$WORKSPACE/npm-cache"'
}
}
}
stage('Build') {
steps {
container('container') {
withCredentials([file(credentialsId: 'secret-subkeys.asc', variable: 'KEYRING'), string(credentialsId: 'gpg-passphrase', variable: 'MAVEN_GPG_PASSPHRASE')]) {
withCredentials([string(credentialsId: "${GITHUB_API_CREDENTIALS_ID}", variable: 'GITHUB_API_TOKEN')]) {
wrap([$class: 'Xvnc', useXauthority: true]) {
sh '''mvn clean verify -B -fae -Ddownload.cache.skip=true -Dmaven.test.error.ignore=true -Dmaven.test.failure.ignore=true -Psign -Dmaven.repo.local=$WORKSPACE/.m2/repository -Dgithub.api.token="${GITHUB_API_TOKEN}" -Dtycho.pgp.signer.bc.secretKeys="${KEYRING}" '''
}
}
}
}
}
post {
always {
junit '*/target/surefire-reports/TEST-*.xml'
archiveArtifacts artifacts: 'repository/target/repository/**,*/target/work/configuration/*.log,*/target/work/data/.metadata/.log,*/target/work/data/languageServers-log/**,org.eclipse.wildwebdeveloper/target/chrome-debug-adapter/chromeDebugAdapter.zip'
}
}
}
stage('Deploy') {
when {
branch 'master'
}
steps {
sshagent ( ['projects-storage.eclipse.org-bot-ssh']) {
sh '''
ssh genie.wildwebdeveloper@projects-storage.eclipse.org rm -rf /home/data/httpd/download.eclipse.org/wildwebdeveloper/snapshots
ssh genie.wildwebdeveloper@projects-storage.eclipse.org mkdir -p /home/data/httpd/download.eclipse.org/wildwebdeveloper/snapshots
scp -r repository/target/repository/* genie.wildwebdeveloper@projects-storage.eclipse.org:/home/data/httpd/download.eclipse.org/wildwebdeveloper/snapshots
'''
}
}
}
}

environment {
NPM_CONFIG_USERCONFIG = "$WORKSPACE/.npmrc"
MAVEN_OPTS="-Xmx1024m"
GITHUB_API_CREDENTIALS_ID = 'github-bot-token'
MAIN_BRANCH = 'pr-p2.manager'
GENIE = 'genie.orbit'
TARGET_LOCATION = 'tools/orbit/archive/wildwebdeveloper'
BUILD_TIMESTAMP = sh(returnStdout: true, script: 'date +%Y%m%d-%H%M').trim()
}

parameters {
choice(
name: 'BUILD_TYPE',
choices: ['nightly', 'milestone', 'release'],
description: '''
Choose the type of build.
Note that a release build will not promote the build, but rather will promote the most recent milestone build.
'''
)

booleanParam(
name: 'PROMOTE',
defaultValue: true,
description: 'Whether to promote the build to the download server.'
)
}

stages {
stage('Display Parameters') {
steps {
script {
env.BUILD_TYPE = params.BUILD_TYPE
if (env.BRANCH_NAME == env.MAIN_BRANCH) {
env.WITH_CREDENTIALS = true
env.MAVEN_PROFILES = "-Psign"
} else {
env.WITH_CREDENTIALS = false
env.MAVEN_PROFILES = ""
}

def description = """
BRANCH_NAME=${env.BRANCH_NAME}
BUILD_TIMESTAMP=${env.BUILD_TIMESTAMP}
BUILD_TYPE=${env.BUILD_TYPE}
MAVEN_PROFILES=${env.MAVEN_PROFILES}
WITH_CREDENTIALS=${env.WITH_CREDENTIALS}
""".trim()
echo description
currentBuild.description = description.replace("\n", "<br/>")
}
}
}

stage('Prepare-environment') {
steps {
container('container') {
sh 'java -version'
sh 'mvn --version'
sh 'node --version'
sh 'npm --version'
sh 'npm config set cache="$WORKSPACE/npm-cache"'
}
}
}
stage('Build') {
steps {
container('container') {
script {
if (env.WITH_CREDENTIALS == 'true') {
withCredentials([file(credentialsId: 'secret-subkeys.asc', variable: 'KEYRING'), string(credentialsId: 'gpg-passphrase', variable: 'MAVEN_GPG_PASSPHRASE')]) {
withCredentials([string(credentialsId: "${GITHUB_API_CREDENTIALS_ID}", variable: 'GITHUB_API_TOKEN')]) {
mvn()
}
}
stash includes: '.mvn/**,pom.xml,**/pom.xml,repository/target/repository/**,org.eclipse.wildwebdeveloper.xml/**', name: 'container-stash'
} else {
mvn()
}
}
}
}
post {
always {
junit '*/target/surefire-reports/TEST-*.xml'
archiveArtifacts artifacts: 'repository/target/repository/**,*/target/work/configuration/*.log,*/target/work/data/.metadata/.log,*/target/work/data/languageServers-log/**,org.eclipse.wildwebdeveloper/target/chrome-debug-adapter/chromeDebugAdapter.zip'
}
}
}

stage('Deploy') {
when {
environment name: 'PROMOTE', value: 'true'
}
agent {
label 'ubuntu-latest'
}
tools {
maven 'apache-maven-latest'
jdk 'temurin-jdk21-latest'
}
options {
skipDefaultCheckout true
}
steps {
unstash 'container-stash'
sshagent (['projects-storage.eclipse.org-bot-ssh']) {
sh 'ls -sailR'
promote();
}
}
}
}
}

def void mvn() {
wrap([$class: 'Xvnc', useXauthority: true]) {
sh '''
mvn \
clean \
verify \
-B \
-fae \
-Dgpg-keyname=C1F58CF8 \
$MAVEN_PROFILES \
-Ddownload.cache.skip=true \
-Dmaven.test.error.ignore=true \
-Dmaven.test.failure.ignore=true \
-Dmaven.repo.local=$WORKSPACE/.m2/repository \
-Dgithub.api.token="${GITHUB_API_TOKEN}" \
-Dtycho.pgp.signer.bc.secretKeys="${KEYRING}" \
'''
}
}

def void promote() {
sh '''
mvn \
verify \
-B \
-pl :promote \
-Ppromote \
-Dbuild.type=$BUILD_TYPE \
-Dgit.commit=$GIT_COMMIT \
-Dorg.eclipse.storage.user=$GENIE \
-Dorg.eclipse.justj.p2.manager.build.url=$JOB_URL \
-Dorg.eclipse.justj.p2.manager.target=$TARGET_LOCATION \
'''
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name=Node.js embedder from Wild Web Developer
name=WWD Node.js Embedder
description=Includes node.js and some code to manage and consume it from other bundles
copyright=Copyright (c) 2020 Red Hat Inc. and others.\
This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0 which is available at https://www.eclipse.org/legal/epl-2.0/
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
id="org.eclipse.wildwebdeveloper.embedder.node.feature"
label="%name"
version="1.2.6.qualifier"
provider-name="Eclipse Wild Web Developer project"
provider-name="Eclipse Wild Web Developer"
license-feature="org.eclipse.license"
license-feature-version="0.0.0">

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Node.js for Linux AArch64
Bundle-Name: WWD Node.js for Linux AArch64
Bundle-SymbolicName: org.eclipse.wildwebdeveloper.embedder.node.linux.aarch64
Bundle-Version: 1.1.9.qualifier
Bundle-License: EPL-2.0;link="http://www.eclipse.org/legal/epl-2.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Node.js for Linux x64
Bundle-Name: WWD Node.js for Linux x64
Bundle-SymbolicName: org.eclipse.wildwebdeveloper.embedder.node.linux.x86_64
Bundle-Version: 1.1.9.qualifier
Bundle-License: EPL-2.0;link="http://www.eclipse.org/legal/epl-2.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Node.js for MacOS AArch64
Bundle-Name: WWD Node.js for MacOS AArch64
Bundle-SymbolicName: org.eclipse.wildwebdeveloper.embedder.node.macos.aarch64
Bundle-Version: 1.1.9.qualifier
Bundle-License: EPL-2.0;link="http://www.eclipse.org/legal/epl-2.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Node.js for MacOS x64
Bundle-Name: WWD Node.js for MacOS x64
Bundle-SymbolicName: org.eclipse.wildwebdeveloper.embedder.node.macos.x86_64
Bundle-Version: 1.1.9.qualifier
Bundle-License: EPL-2.0;link="http://www.eclipse.org/legal/epl-2.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Node.js for Windows AArch64
Bundle-Name: WWD Node.js for Windows AArch64
Bundle-SymbolicName: org.eclipse.wildwebdeveloper.embedder.node.win32.aarch64
Bundle-Version: 1.0.5.qualifier
Bundle-License: EPL-2.0;link="http://www.eclipse.org/legal/epl-2.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Node.js for Windows x86_64
Bundle-Name: WWD Node.js for Windows x64
Bundle-SymbolicName: org.eclipse.wildwebdeveloper.embedder.node.win32.x86_64
Bundle-Version: 1.1.9.qualifier
Bundle-License: EPL-2.0;link="http://www.eclipse.org/legal/epl-2.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Manager for embedded Node.js
Bundle-Name: WWD Manager for Embedded Node.js
Bundle-SymbolicName: org.eclipse.wildwebdeveloper.embedder.node
Bundle-Version: 1.0.9.qualifier
Bundle-License: EPL-2.0;link="http://www.eclipse.org/legal/epl-2.0"
Expand Down
2 changes: 1 addition & 1 deletion org.eclipse.wildwebdeveloper.feature/feature.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name=Wild Web Developer HTML, CSS, JSON, Yaml, JavaScript, TypeScript, Node tools
name=WWD Tools for HTML, CSS, JSON, YAML, JavaScript, TypeScript, and Node
description=Basic editor for Web and Node.js technologies in Eclipse IDE. Relies on Language Servers and TextMate grammars to provide development and debug support for HTML, JavaScript, TypeScript, CSS, Yaml, Angular, and more...
copyright=Copyright (c) 2017 Red Hat Inc. and others.\
This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0 which is available at https://www.eclipse.org/legal/epl-2.0/
2 changes: 1 addition & 1 deletion org.eclipse.wildwebdeveloper.feature/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
id="org.eclipse.wildwebdeveloper.feature"
label="%name"
version="1.4.1.qualifier"
provider-name="Eclipse Wild Web Developer project"
provider-name="Eclipse Wild Web Developer"
license-feature="org.eclipse.license"
license-feature-version="0.0.0">

Expand Down
2 changes: 1 addition & 1 deletion org.eclipse.wildwebdeveloper.tests/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Tests for WildWebDeveloper
Bundle-Name: WWD Tests
Bundle-SymbolicName: org.eclipse.wildwebdeveloper.tests;singleton:=true
Bundle-Version: 1.0.18.qualifier
Bundle-License: EPL-2.0;link="http://www.eclipse.org/legal/epl-2.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name=Wild Web Developer XML tools
name=WWD Tools for XML
description=XML editor in Eclipse IDE. Relies on Language Servers and TextMate grammars to provide development and debug support for XML, XSD, DTD and more...
copyright=Copyright (c) 2020 Red Hat Inc. and others.\
This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0 which is available at https://www.eclipse.org/legal/epl-2.0/
2 changes: 1 addition & 1 deletion org.eclipse.wildwebdeveloper.xml.feature/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
id="org.eclipse.wildwebdeveloper.xml.feature"
label="%name"
version="1.3.9.qualifier"
provider-name="Eclipse Wild Web Developer project"
provider-name="Eclipse Wild Web Developer"
license-feature="org.eclipse.license"
license-feature-version="0.0.0">

Expand Down
4 changes: 2 additions & 2 deletions org.eclipse.wildwebdeveloper.xml/plugin.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
# * Contributors:
# * Victor Rubezhny (Red Hat Inc.) - initial implementation
# *******************************************************************************/
pluginName=XML support using Language Server
providerName=Eclipse Wild Web Developer project
pluginName=WWD XML Support Using Language Server
providerName=Eclipse Wild Web Developer

XMLPreferencePage.name=XML (Wild Web Developer)
XMLCatalogPreferencePage.name=Catalogs
Expand Down
4 changes: 2 additions & 2 deletions org.eclipse.wildwebdeveloper/plugin.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
# * Contributors:
# * Angelo ZERR (Red Hat Inc.) - initial implementation
# *******************************************************************************/
pluginName=Wild Web Developer: web development in Eclipse IDE
providerName=Eclipse Wild Web Developer project
pluginName=WWD Tools for Web Development in Eclipse
providerName=Eclipse Wild Web Developer

# CSS, LESS, SCSS
CSSPreferencePage.name=CSS (Wild Web Developer)
Expand Down
9 changes: 9 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>3.5.0</version>
<configuration>
<force>true</force>
</configuration>
</plugin>
<plugin>
<groupId>io.github.download-maven-plugin</groupId>
Expand Down Expand Up @@ -232,6 +235,12 @@
<ui.test.vmargs>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts -Djava.awt.headless=false</ui.test.vmargs>
</properties>
</profile>
<profile>
<id>promote</id>
<modules>
<module>repository/promote</module>
</modules>
</profile>
</profiles>

<pluginRepositories>
Expand Down
2 changes: 2 additions & 0 deletions repository/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
target/
wildwebdeveloper/

Loading
Loading