Comments (7)
I'm on my way to finish the Gitlab integration. I will test it a little bit here, in-house, and if everything operates smoothly, I'll open multiple PR one by one and try to split my changes to ease review.
from scala-steward.
👍
@tjheslin1 is working on BitBucket support. I expect that there is quite a bit of overlap in your efforts.
from scala-steward.
In fact, the changes in master...tjheslin1:bitbucket look very similar to mine. The naming is different but that's it. I think vcs
, as @tjheslin1 use is better than what I had, so I'll rebase on his work and see where it leads me.
from scala-steward.
Hi @daddykotex. Glad my branch is able to help you. I look forward to seeing a PR!
I have gotten a bit distracted in the last week or two regarding this contribution, I'm glad you're working on it too! When trying to test locally I ran into the issue documented in #48. I was waiting for this to be closed as I saw something was in progress on a fork for this.
For BitBucket the reading up on the BitBucket api is done, unless there's a chance that changes to authentication needs to be made, which I was trying to run scala-steward locally for.
from scala-steward.
This would be totally awesome, and we'd benefit greatly from having scala-steward work in self-hosted GL. I want to help, so @daddykotex feel free to let me know if you need some help (even if only in the review).
from scala-steward.
So there you go, with a little bit of pressure :)
https://github.com/daddykotex/scala-steward/tree/refactor/vcsapialg
This is a WIP for Gitlab support. I tried it on an internal repository but also on Gitlab public services. I don't think my tests covered the whole API so I suggest a few Gitlab users take an hour to try it on their own Gitlab instances (or their public repositories) to make sure it works fine.
Here is how to proceed:
- Create a user on your Gitlab installation.
- In this user's settings add a new Access Token with permissions to access the API.
- Write a bash program that print the password, like that:
#!/bin/bash
echo "ACCESS_KEY"
- Check out the code shared above
- In the scala-steward directory, generate the docker image:
sbt docker:publishLocal
- Make a temporary directory where scala-steward will work, here is what I did:
mkdir tmprunning
cd tmprunning
mkdir workspace
touch pass.sh # copy the pass.sh file
touch repos.md # see the current repos.md in scala-steward
tree .
.
├── pass.sh
├── repos.md
└── workspace [directory]
- Run the container and mount the
tmprunning
folder in it as a volume and pass all the parameters:
docker run -it \
--rm \
-v /tmp/scala-steward/tmprunning:/data scala-steward:0.1.0-SNAPSHOT \
--workspace "/data/workspace/" --repos-file "/data/repos.md" --git-author-name "Scala Steward @ daddykotex" --git-author-email "[email protected]" --vcs-type "gitlab" --vcs-api-host "https://gitlab.com/api/v4/" --vcs-login "daddykotex-scalasteward" --git-ask-pass "/data/pass.sh"
- Enjoy
Notes: since it runs in a container, there is nothing cached so the execution is long. To speed it up, I suggest you mount a few additional volumes where sbt will be able to place all of it's stuff. That way it does not have to do it everytime. Something like -v /tmp/scala-steward/tmprunning/sbt:/root/.sbt -v /tmp/scala-steward/tmprunning/ivy2:/root/.ivy2
You can also add -d
to see all the logs.
Here is the output of a successful run:
2019-05-20 06:25:07,009 INFO Add global sbt plugins
2019-05-20 06:25:07,135 INFO Clean workspace /data/workspace
2019-05-20 06:25:09,116 INFO Check dependencies of daddykotex/scala-steward-test
2019-05-20 06:25:11,154 INFO Refresh dependencies of daddykotex/scala-steward-test
2019-05-20 06:27:47,241 INFO Found 3 updates:
com.github.daddykotex:courier : 1.0.0-RC1 -> 1.0.0
org.typelevel:cats-core : 1.0.0 -> 1.0.1 -> 1.6.0
org.typelevel:cats-effect : 1.0.0 -> 1.3.0
Repo(daddykotex,scala-steward-test) List(Single(com.github.daddykotex,courier,1.0.0-RC1,NonEmptyList(1.0.0),None), Single(org.typelevel,cats-core,1.0.0,NonEmptyList(1.0.1, 1.6.0),None), Single(org.typelevel,cats-effect,1.0.0,NonEmptyList(1.3.0),None))
daddykotex/scala-steward-test
1
2019-05-20 06:27:47,462 INFO Nurture daddykotex/scala-steward-test
2019-05-20 06:27:47,462 INFO Clone and synchronize daddykotex/scala-steward-test
2019-05-20 06:27:51,498 INFO Find updates for daddykotex/scala-steward-test
2019-05-20 06:28:33,553 INFO Ignore org.scala-lang:scala-library:provided : 2.12.7 -> 2.12.8
2019-05-20 06:28:33,632 INFO Found 3 updates:
com.github.daddykotex:courier : 1.0.0-RC1 -> 1.0.0
org.typelevel:cats-core : 1.0.0 -> 1.0.1 -> 1.6.0
org.typelevel:cats-effect : 1.0.0 -> 1.3.0
2019-05-20 06:28:33,716 INFO Process update com.github.daddykotex:courier : 1.0.0-RC1 -> 1.0.0
2019-05-20 06:28:33,951 INFO Trying update strategy 'replaceAllInStrict'
2019-05-20 06:28:35,868 INFO Create branch update/courier-1.0.0
2019-05-20 06:28:38,443 INFO Create PR update/courier-1.0.0
2019-05-20 06:28:39,357 INFO Created PR https://gitlab.com/daddykotex/scala-steward-test/merge_requests/4
2019-05-20 06:28:39,650 INFO Process update org.typelevel:cats-core : 1.0.0 -> 1.0.1 -> 1.6.0
2019-05-20 06:28:39,898 INFO Found PR https://gitlab.com/daddykotex/scala-steward-test/merge_requests/3
2019-05-20 06:28:40,372 INFO PR is behind master
2019-05-20 06:28:40,376 INFO Reset and update update/cats-core-1.0.1
2019-05-20 06:28:40,580 INFO Trying update strategy 'replaceAllInStrict'
2019-05-20 06:28:44,127 INFO Process update org.typelevel:cats-effect : 1.0.0 -> 1.3.0
2019-05-20 06:28:44,347 INFO Found PR https://gitlab.com/daddykotex/scala-steward-test/merge_requests/2
2019-05-20 06:28:44,852 INFO PR is behind master
2019-05-20 06:28:44,852 INFO Reset and update update/cats-effect-1.3.0
2019-05-20 06:28:45,069 INFO Trying update strategy 'replaceAllInStrict'
2019-05-20 06:28:49,845 INFO ──────────── Total time: daddykotex/scala-steward-test: 1m 2s 375ms ────────────
2019-05-20 06:28:49,848 INFO ──────────── Total time: run: 3m 42s 895ms ────────────
2019-05-20 06:28:49,850 INFO Shutting down connection pool: curAllocated=1 idleQueues.size=1 waitQueue.size=0 maxWaitQueueLimit=256 closed=false
And the PR are there: https://gitlab.com/daddykotex/scala-steward-test/merge_requests
from scala-steward.
from scala-steward.
Related Issues (20)
- No able to create a pull request Bitbucket HOT 1
- sbt not found with scala-steward-action HOT 1
- no effect with .github/.scala-steward.conf override if PRs has been already created before HOT 2
- Scala Steward run within an org is incorrectly creating PR's against wrong repo HOT 3
- [Bug?] Cannot resolve -p with Mill 0.11.6 HOT 8
- Option to abort on scalafix migration failure HOT 1
- Using custom dependency rules for scalafix-migrations with 'type: "build"'
- Scala Steward runs as root when using the published Docker image (but it probably shouldn't)
- Unable to respect update frequency when version number is stored as a val
- Scala Steward attempting to raise PRs for group branches that already have PRs HOT 3
- Force-pushing over modified branches HOT 5
- Avoid pushing scala updates for non LTS versions HOT 6
- Automatic `buildRoots` detection
- Bitbucket repository name is malformatted in URL
- Clarification of "updatePullRequests" for grouped PRs HOT 4
- Feature to limit branch name length HOT 3
- Wrong targetRefName when create azure-repo PullRequestPayload
- Config option to update files only in defined paths
- Scalafmt cannot run when buildRoots is set
- `scala-cli` dependencies: "WARN Unable to bump version for update [...]"
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scala-steward.