Skip to content

Commit

Permalink
Set up CI (#2)
Browse files Browse the repository at this point in the history
* Download the saker.build.ide.eclipse build artifact

* Add build status badge

* Add feature.xml for update site
  • Loading branch information
Sipkab committed Apr 5, 2020
1 parent 6030682 commit 9a984c1
Show file tree
Hide file tree
Showing 4 changed files with 1,238 additions and 206 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# saker.java.ide.eclipse

![Build status](https://img.shields.io/azure-devops/build/sakerbuild/90306d09-ea75-4eae-8a9e-b89c7e29ca4a/23/master)

An Eclipse IDE plugin for applying Java project configurations based on build results from the [saker.build system](https://saker.build). The plugin uses the extension point provided by the [saker.build.ide.eclipse](https://github.com/sakerbuild/saker.build.ide.eclipse) to automatically configure Java project and pass the JRE runtime configurations to the build.

You can install the plugin from the same update-site as the [saker.build.ide.eclipse](https://saker.build/saker.build/doc/eclipseplugin.html) plugin.
Expand Down
62 changes: 62 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
trigger:
branches:
include:
- master
tags:
include:
- v*

pool:
vmImage: 'ubuntu-latest'

steps:
- script: |
set -e
echo "##vso[task.setvariable variable=BUILD_VERSION_NUMBER]$(echo $BUILD_SOURCEBRANCHNAME | sed -r 's/v(.*)/\1/')"
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/v')
displayName: 'Set BUILD_VERSION_NUMBER'
- script: |
set -e
echo "##vso[task.setvariable variable=BUILD_VERSION_NUMBER]$(cat META-INF/MANIFEST.MF | grep Bundle-Version: | sed -r 's/Bundle-Version: (.*)\.qualifier/\1/')"
condition: not(startsWith(variables['Build.SourceBranch'], 'refs/tags/v'))
displayName: 'Set BUILD_VERSION_NUMBER'
- task: DownloadPipelineArtifact@2
inputs:
source: 'specific'
project: 'saker.build.ide.eclipse'
pipeline: 22
runVersion: 'latestFromBranch'
runBranch: 'refs/heads/master'
artifactName: 'saker.build.ide.eclipse'
path: 'lib/saker.build.ide.eclipse/'
- script: |
set -e
curl http://ftp.halifax.rwth-aachen.de/eclipse//technology/epp/downloads/release/2020-03/R/eclipse-rcp-2020-03-R-linux-gtk-x86_64.tar.gz -o eclipse.tar.gz
tar -xzf "eclipse.tar.gz"
displayName: 'Download Eclipse'
- script: |
set -e
eclipse/eclipse -nosplash -application org.eclipse.ant.core.antRunner -data .. -verbose -buildfile build.xml -DbuildTempFolder=build/temp -DbuildDirectory=build -Dbuild.result.folder=build/res -Dplugin.destination=build/plugin -DbuildVersionNumber=$BUILD_VERSION_NUMBER build.update.jar
displayName: 'Build update JAR'

- script: |
set -e
mkdir gh-release
cp build/plugin/saker.java.ide.eclipse.jar gh-release/
cp build/plugin/saker.java.ide.eclipse.ver gh-release/
cp update-site/features/feature.xml gh-release/
displayName: 'Setup GitHub Release'

- task: PublishBuildArtifacts@1
displayName: 'Publish artifacts'
inputs:
pathtoPublish: gh-release/
artifactName: saker.java.ide.eclipse

- task: GithubRelease@0
displayName: 'Create GitHub Release'
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/v')
inputs:
gitHubConnection: saker.java.ide.eclipse-ci-release-push
repositoryName: sakerbuild/saker.java.ide.eclipse
assets: gh-release/
Loading

0 comments on commit 9a984c1

Please sign in to comment.