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

Add facility to deploy nightly build to eclipse nexus instance. #885

Merged
merged 1 commit into from
Sep 3, 2020

Conversation

sbernard31
Copy link
Contributor

@sbernard31 sbernard31 commented Sep 3, 2020

The idea is to be able to create jenkins jobs executed 1 time a day (or on demand) which will deploy a SNAPSHOT release of master and 1.x in https://repo.eclipse.org/content/repositories/leshan-snapshots/.

First try :

SNAPSHOT should be available using :

   <repositories>
        <repository>
            <id>eclipse-repo</id>
            <name>Eclipse Repository</name>
            <url>https://repo.eclipse.org/content/repositories/leshan-snapshots/</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
    </repositories>
	<dependencies>
		<dependency>
			<groupId>org.eclipse.leshan</groupId>
			<artifactId>leshan-???-???f</artifactId>
			<version>2.0.0-SNAPSHOT</version>
		</dependency>
	</dependencies>

Using SNAPSHOT is pretty different than using RELEASE version.

  • SNAPSHOT could change from one build to another.
  • It is possible to depend on a specific version using something like snapshotVersion(e.g. 2.0.0-20200903.093116-2) instead of 2.0.0-SNAPSHOT but this version will not be available for ever.
  • When you play with SNAPSHOT you should be interested by in mvn dependency:purge-local-repository or mvn clean install --update-snapshots or repository updatePolicy.

@sbernard31
Copy link
Contributor Author

@zakharenkodmytro does the current snapshot works for you ?
By the way are you using leshan for server, bsserver or client ?
Regarding issue with snapshot version I suppose you will need a real Milestone release soon ?

@zakharenkodmytro
Copy link
Contributor

zakharenkodmytro commented Sep 3, 2020

@zakharenkodmytro does the current snapshot works for you ?

I was able to download snapshot in server project BUT now I experience some import errors(import classes cannot be found):
import org.eclipse.leshan.server.LwM2mServer; import org.eclipse.leshan.server.californium.CaliforniumRegistrationStore; import org.eclipse.leshan.server.californium.impl.InMemoryRegistrationStore;
I suppose this errors are because <leshan.version>1.0.0-M11</leshan.version> if far behind current master branch?

By the way are you using leshan for server, bsserver or client ?

I'm using leshan for server, config-server(we just provision security materials through it) and demo client.

Regarding issue with snapshot version I suppose you will need a real Milestone release soon ?

Yes, it will be great idea, so we need milestone. Because what I'm thinking now is - I can build Leshan with some internal release version and put it to ours artifactory. Release Milestone will be obviously better.

@sbernard31
Copy link
Contributor Author

sbernard31 commented Sep 3, 2020

I suppose this errors are because <leshan.version>1.0.0-M11</leshan.version> if far behind current master branch?

I don't get it, are you mixing different version of leshan ?

@sbernard31
Copy link
Contributor Author

sbernard31 commented Sep 3, 2020

oh maybe, you mean that you find API break ?
If the last version you was using was 1.0.0-M11 you will probably face some API break. This is "normal" 😬

@zakharenkodmytro
Copy link
Contributor

zakharenkodmytro commented Sep 3, 2020

I suppose this errors are because <leshan.version>1.0.0-M11</leshan.version> if far behind current master branch?

I don't get it you are mixing different version of leshan ?

I use next dependencies.
<!-- Leshan Server --> <dependency> <artifactId>leshan-server-cf</artifactId> </dependency> <dependency> <artifactId>leshan-server-cluster</artifactId> </dependency>

BTW do you have still leshan-server-cluster or it is gone in latest code? If yes, what dependency I should use instead of leshan-server-cluster now?

@zakharenkodmytro
Copy link
Contributor

oh maybe, you mean that you find API break ?
If the last version you was using was 1.0.0-M1 you will probably face some API break. This is "normal" 😬

I think API broken , yes.

@sbernard31
Copy link
Contributor Author

Unfortenately, if you begin to use the branch 2.0.0 you should keep in mind that you will face API break regularly.
We are at the beginning of the development phase of this version and by adding new feature or supporting new part of the specification we will break the API often 😕.

1.x has stable API but you will not have new features.

@sbernard31
Copy link
Contributor Author

sbernard31 commented Sep 3, 2020

BTW do you have still leshan-server-cluster or it is gone in latest code? If yes, what dependency I should use instead of leshan-server-cluster now?

I hope you are not using the northbound API but just the redis store. If this is the case you just need to use leshan-server-redis instead.

See #679.

@zakharenkodmytro
Copy link
Contributor

Unfortenately, if you begin to use the branch 2.0.0 you should keep in mind that you will face API break regularly.
We are at the beginning of the development phase of this version and by adding new feature or supporting new part of the specification we will break the API often 😕.

1.x has stable API but you will not have new features.

Gotcha, Now I need try to fix API, that's fine unless it took forever for me). I
want to thank you for your help with putting snapshot to nexus eclipse.

@sbernard31
Copy link
Contributor Author

I want to thank you for your help with putting snapshot to nexus eclipse.

No problem 😉 and I totally forget to thank you for the contribution !

@zakharenkodmytro
Copy link
Contributor

zakharenkodmytro commented Sep 3, 2020

I hope you are not using the northbound API but just the redis store. It this is the case you just need to use leshan-server-redis instead.

See #679.

I will take a look, what is northbound API? Checked, we just use redis store so I think we will easily switch to 'leshan-server-redis`

@sbernard31
Copy link
Contributor Author

what is northbound API?

An API based on redis pubsub to send message to all leshan instances in a cluster.

@sbernard31 sbernard31 changed the base branch from read_resource_instance to master September 3, 2020 16:12
@sbernard31 sbernard31 merged commit 1c05733 into master Sep 3, 2020
@sbernard31
Copy link
Contributor Author

I added job for branch 1.x : https://ci.eclipse.org/leshan/job/leshan-1.x-nightly/
This job will be executed once a day if changes are detected in corresponding branch.
So this night should create a new SNAPSHOT release for master (as I integrated more modifications in master)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants