Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify build workflows and argument specification #2224

Merged
merged 1 commit into from
Apr 19, 2023
Merged
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
48 changes: 0 additions & 48 deletions .github/workflows/external-pr.yml

This file was deleted.

11 changes: 8 additions & 3 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@ on:
push:
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- '**.md'

jobs:
build:
if: github.event_name != 'pull_request' || github.event.pull_request.base.repo.clone_url != github.event.pull_request.head.repo.clone_url
strategy:
matrix:
os: ['ubuntu-latest', 'macos-latest' ] # 'windows-latest' too flaky
Expand All @@ -33,10 +37,11 @@ jobs:
- name: Build and test
uses: coactions/setup-xvfb@v1
with:
run: mvn clean verify --show-version -PuseJenkinsSnapshots -Dsurefire.rerunFailingTestsCount=3
run: mvn clean verify -PuseJenkinsSnapshots
working-directory: org.eclipse.xtext.full.releng

build-maven-artifacts:
if: github.event_name != 'pull_request' || github.event.pull_request.base.repo.clone_url != github.event.pull_request.head.repo.clone_url
runs-on: ubuntu-latest

steps:
Expand All @@ -57,5 +62,5 @@ jobs:
restore-keys: ${{ runner.os }}-maven

- name: Build Maven artifacts
run: mvn clean verify --show-version -PuseJenkinsSnapshots
working-directory: org.eclipse.xtext.maven.releng
run: mvn clean verify -PuseJenkinsSnapshots
working-directory: org.eclipse.xtext.maven.releng
3 changes: 3 additions & 0 deletions .mvn/maven.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
--show-version
--update-snapshots
-Dsurefire.rerunFailingTestsCount=3
13 changes: 0 additions & 13 deletions full-build.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
#!/usr/bin/env bash
if [ -z "$JENKINS_URL" ]; then
# if not set in environment use default
JENKINS_URL=https://ci.eclipse.org/xtext/
fi
if [ -z "$WORKSPACE" ]; then
# if not set in environment use default
WORKSPACE=$(pwd)
fi


MVN_ARGS=(\
--update-snapshots \
-DJENKINS_URL=$JENKINS_URL \
-DWORKSPACE=$WORKSPACE \
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
-Dit-archetype-tests-skip=true \
)
Expand Down Expand Up @@ -55,7 +43,6 @@ while [ "$1" != "" ]; do
done

MVN_ARGS+=(-PuseJenkinsSnapshots)
MVN_ARGS+=(-Dsurefire.rerunFailingTestsCount=3)

echo mvn -B -f org.eclipse.xtext.full.releng ${MVN_ARGS[@]} $@

Expand Down
12 changes: 0 additions & 12 deletions full-deploy.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
#!/usr/bin/env bash
if [ -z "$JENKINS_URL" ]; then
# if not set in environment use default
JENKINS_URL=https://ci.eclipse.org/xtext/
fi
if [ -z "$WORKSPACE" ]; then
# if not set in environment use default
WORKSPACE=$(pwd)
fi


MVN_ARGS=(\
--update-snapshots \
-DJENKINS_URL=$JENKINS_URL \
-DWORKSPACE=$WORKSPACE \
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
-Dit-archetype-tests-skip=true \
)
Expand Down
12 changes: 0 additions & 12 deletions maven-build.sh
Original file line number Diff line number Diff line change
@@ -1,21 +1,9 @@
#!/usr/bin/env bash
if [ -z "$JENKINS_URL" ]; then
# if not set in environment use default
JENKINS_URL=https://ci.eclipse.org/xtext/
fi
if [ -z "$WORKSPACE" ]; then
# if not set in environment use default
WORKSPACE=$(pwd)
fi


MVN_ARGS=(\
--update-snapshots \
--fae \
-Dmaven.test.failure.ignore=true \
-Declipse.p2.mirrors=false \
-DJENKINS_URL=$JENKINS_URL \
-DWORKSPACE=$WORKSPACE \
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
-Dit-archetype-tests-skip=true \
)
Expand Down
6 changes: 2 additions & 4 deletions org.eclipse.xtend.maven.parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@
<maven.compiler.target>11</maven.compiler.target>
<maven.javadoc.failOnError>false</maven.javadoc.failOnError>
<maven.javadoc.opts></maven.javadoc.opts>

<JENKINS_URL>https://ci.eclipse.org/xtext</JENKINS_URL>
</properties>

<dependencyManagement>
Expand All @@ -46,7 +44,7 @@
</dependency>
</dependencies>
</dependencyManagement>

<build>
<extensions>
<!-- See https://jira.codehaus.org/browse/MINSTALL-102 -->
Expand Down Expand Up @@ -159,7 +157,7 @@
<artifactId>maven-source-plugin</artifactId>
<version>3.2.1</version>
</plugin>
<!--This plugin's configuration is used to store Eclipse m2e settings
<!--This plugin's configuration is used to store Eclipse m2e settings
only. It has no influence on the Maven build itself. -->
<plugin>
<groupId>org.eclipse.m2e</groupId>
Expand Down
3 changes: 1 addition & 2 deletions org.eclipse.xtext.maven.parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
<project.reporting.outputEncoding>ISO-8859-1</project.reporting.outputEncoding>
<maven.javadoc.failOnError>false</maven.javadoc.failOnError>
<maven.javadoc.opts></maven.javadoc.opts>
<JENKINS_URL>https://ci.eclipse.org/xtext</JENKINS_URL>
</properties>

<build>
Expand Down Expand Up @@ -131,7 +130,7 @@
<artifactId>maven-source-plugin</artifactId>
<version>3.2.1</version>
</plugin>
<!--This plugin's configuration is used to store Eclipse m2e settings
<!--This plugin's configuration is used to store Eclipse m2e settings
only. It has no influence on the Maven build itself. -->
<plugin>
<groupId>org.eclipse.m2e</groupId>
Expand Down
7 changes: 3 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
</scm>

<properties>
<project.build.sourceEncoding>ISO-8859-1</project.build.sourceEncoding>
<project.build.sourceEncoding>ISO-8859-1</project.build.sourceEncoding>
<tycho-version>3.0.4</tycho-version>

<maven.compiler.source>11</maven.compiler.source>
Expand All @@ -151,7 +151,6 @@
<xtend-maven-plugin-version>2.31.0.M0</xtend-maven-plugin-version>

<root-dir>${basedir}/..</root-dir>
<JENKINS_URL>https://ci.eclipse.org/xtext</JENKINS_URL>

<target-platform-classifier>xtext-latest</target-platform-classifier>

Expand Down Expand Up @@ -280,7 +279,7 @@
<repositories>
<repository>
<id>lsp4j-from-jenkins</id>
<url>${JENKINS_URL}/job/lsp4j/lastStableBuild/artifact/build/maven-repository</url>
<url>https://ci.eclipse.org/xtext/job/lsp4j/lastStableBuild/artifact/build/maven-repository</url>
</repository>
<!-- Disable sonatype snapshots -->
<repository>
Expand Down Expand Up @@ -582,7 +581,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<!-- MJAVADOC-620 – Maven Javadoc Plugin fails to resolve the dependencies
<!-- MJAVADOC-620 – Maven Javadoc Plugin fails to resolve the dependencies
when used with Java 11 -->
<version>3.5.0</version>
<configuration>
Expand Down
13 changes: 6 additions & 7 deletions releng/jenkins/sign-and-deploy/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ pipeline {
./gradlew -info \
--warning-mode all \
--refresh-dependencies \
-PJENKINS_URL=$JENKINS_URL \
-Posspub.userMavenSettings=/home/jenkins/.m2/settings.xml \
-Posspub.mavenSecurityFile=/home/jenkins/.m2/settings-security.xml \
-Posspub.version=$XTEXT_VERSION \
Expand All @@ -117,7 +116,7 @@ pipeline {
} // END dir
}
}

stage('Deploy to Eclipse project storage') {
steps {
dir('publishing') {
Expand All @@ -134,18 +133,18 @@ pipeline {
S) ZIP_NAME=tmf-xtext-Update-$XTEXT_VERSION.zip ;;
R) ZIP_NAME=tmf-xtext-Update-$VERSION.zip ;;
esac

#
# STEP 2: Zip the repository
#
cd build-result/p2.repository
zip -r $WORKSPACE/publishing/build-result/downloads/$ZIP_NAME .
md5sum --binary $WORKSPACE/publishing/build-result/downloads/$ZIP_NAME > $WORKSPACE/publishing/build-result/downloads/$ZIP_NAME.md5
cd $WORKSPACE/publishing

'''
} // END dir

sshagent(['projects-storage.eclipse.org-bot-ssh']) {
dir('publishing') {
sh '''
Expand All @@ -163,15 +162,15 @@ pipeline {
S) ZIP_NAME=tmf-xtext-Update-$XTEXT_VERSION.zip ;;
R) ZIP_NAME=tmf-xtext-Update-$VERSION.zip ;;
esac

#
# STEP 3: Upload zip und .md5
#
TARGET_DROP_PATH=$DOWNLOAD_AREA/$VERSION/$BUILD_ID
# ensure target directory exists
ssh [email protected] "mkdir -p $TARGET_DROP_PATH"
scp $WORKSPACE/publishing/build-result/downloads/$ZIP_NAME $WORKSPACE/publishing/build-result/downloads/$ZIP_NAME.md5 [email protected]:$TARGET_DROP_PATH

#
# STEP 4: Unpack zip to p2 repository location
#
Expand Down
7 changes: 0 additions & 7 deletions tycho-sign.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
if [ -z "$JENKINS_URL" ]; then
# if not set in environment use default
JENKINS_URL=https://ci.eclipse.org/xtext/
fi

# THIS SIGNS, SKIPPING TESTS

mvn \
Expand All @@ -11,8 +6,6 @@ mvn \
-P useJenkinsSnapshots \
-P eclipse-sign \
--batch-mode \
--update-snapshots \
-Dmaven.repo.local=.m2/repository \
-DJENKINS_URL=$JENKINS_URL \
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
$@
6 changes: 0 additions & 6 deletions tycho-test.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
#!/usr/bin/env bash
if [ -z "$JENKINS_URL" ]; then
# if not set in environment use default
JENKINS_URL=https://ci.eclipse.org/xtext/
fi

# Use TARGET_PLATFORM from environment and 'r202203' as default.
# Overridable by 'tp' command-line arg
Expand All @@ -11,9 +7,7 @@ if [ -z "$TARGET_PLATFORM" ]; then
fi

MVN_ARGS=(\
--update-snapshots \
--fae \
-DJENKINS_URL=$JENKINS_URL \
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
)

Expand Down