From 11c8cfb3fbc52703cbe420c5caa069a7133d1d98 Mon Sep 17 00:00:00 2001 From: nkuehnel Date: Thu, 2 May 2024 14:06:15 +0200 Subject: [PATCH] add moia deployment files --- .github/CODEOWNERS | 7 ++++ .../workflows/moia-deploy-on-pr-merge.yaml | 33 +++++++++++++++++ settings.xml | 36 +++++++++++++++++++ 3 files changed, 76 insertions(+) create mode 100644 .github/CODEOWNERS create mode 100644 .github/workflows/moia-deploy-on-pr-merge.yaml create mode 100644 settings.xml diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 00000000000..c4f3e2a0c02 --- /dev/null +++ b/.github/CODEOWNERS @@ -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 diff --git a/.github/workflows/moia-deploy-on-pr-merge.yaml b/.github/workflows/moia-deploy-on-pr-merge.yaml new file mode 100644 index 00000000000..a6578d3889e --- /dev/null +++ b/.github/workflows/moia-deploy-on-pr-merge.yaml @@ -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 17 + uses: actions/setup-java@v3 + with: + java-version: 17 + 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"}' diff --git a/settings.xml b/settings.xml new file mode 100644 index 00000000000..eb0362753e8 --- /dev/null +++ b/settings.xml @@ -0,0 +1,36 @@ + + + + github + + + + + github + + + central + https://repo1.maven.org/maven2 + + + github + https://maven.pkg.github.com/moia-oss/matsim-libs + + true + + + + + + + + + github + ${env.USERNAME} + ${env.PASSWORD} + + +