Skip to content

Commit

Permalink
Merge branch 'moia-deployment' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
nkuehnel authored Jun 7, 2024
2 parents d3742de + 0ab3a61 commit 261cf9e
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# https://help.github.com/articles/about-codeowners/
#
# These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence,
# mentioned account names will be requested for
# review when someone opens a pull request.
* @mfrawley-moia @nkuehnel @fzwick @TomE168
33 changes: 33 additions & 0 deletions .github/workflows/moia-deploy-on-pr-merge.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: deploy-on-pr-merge

on:
push: # snapshot deployment
branches:
- moia-deployment

jobs:
deploy-snapshot:
name: deploy MOIA
# for PR-labelled deployment -- only if closed by merging
if: github.event_name == 'push' || github.event.pull_request.merged == true

runs-on: ubuntu-latest

environment: prd
steps:
- uses: actions/checkout@v3
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: 21
distribution: 'zulu'
- name: Set version
run: mvn versions:set -DnewVersion=moia-latest-SNAPSHOT
- name: Deploy with Maven
env:
USERNAME: ${{github.actor}}
PASSWORD: ${{ secrets.GITHUB_TOKEN }}
run: mvn -pl org.matsim.contrib:sbb-extensions,org.matsim.contrib:drt,org.matsim.contrib:drt-extensions,org.matsim.contrib:discrete_mode_choice,org.matsim.contrib:simulatedannealing deploy -am --settings settings.xml -DskipTests=true -DaltSnapshotDeploymentRepository=github::default::https://maven.pkg.github.com/moia-oss/matsim-libs -DaltDeploymentRepository=github::default::https://maven.pkg.github.com/moia-oss/matsim-libs
- name: Trigger external development build
run: |
curl -XPOST -u "${{ secrets.PAT_USERNAME}}:${{secrets.PAT_TOKEN}}" -H "Accept: application/vnd.github.everest-preview+json" -H "Content-Type: application/json" https://api.github.com/repos/moia-dev/matsim-external-development/dispatches --data '{"event_type": "build_application"}'
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ public DrtOptimizationConstraintsSet() {
@PositiveOrZero // used only for stopbased DRT scheme
public double maxWalkDistance = Double.MAX_VALUE;// [m];


@Parameter
@Comment(
"Time before reaching a planned dropoff from which it is not allowed to insert new detours for new requests. I.e.," +
Expand All @@ -97,6 +98,7 @@ public DrtOptimizationConstraintsSet() {
@PositiveOrZero
public double lateDiversionthreshold = 0; // [s];


@Override
protected void checkConsistency(Config config) {
super.checkConsistency(config);
Expand Down
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,7 @@
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
<version>1.14.17</version>
<version>1.14.16</version>
<scope>test</scope>
</dependency>

Expand Down
36 changes: 36 additions & 0 deletions settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">

<activeProfiles>
<activeProfile>github</activeProfile>
</activeProfiles>

<profiles>
<profile>
<id>github</id>
<repositories>
<repository>
<id>central</id>
<url>https://repo1.maven.org/maven2</url>
</repository>
<repository>
<id>github</id>
<url>https://maven.pkg.github.com/moia-oss/matsim-libs</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</profile>
</profiles>

<servers>
<server>
<id>github</id>
<username>${env.USERNAME}</username>
<password>${env.PASSWORD}</password>
</server>
</servers>
</settings>

0 comments on commit 261cf9e

Please sign in to comment.