From e917954e6a5c90fffc6976983e609bab4c2b861e Mon Sep 17 00:00:00 2001 From: jrmartin Date: Wed, 24 Mar 2021 10:29:03 -0700 Subject: [PATCH 1/8] #906 Replace travis with github actions --- .github/workflows/main.yml | 63 ++++++++++++++++++++++++++++++++++++++ .travis.yml | 36 ---------------------- 2 files changed, 63 insertions(+), 36 deletions(-) create mode 100644 .github/workflows/main.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 000000000..bf9535de8 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,63 @@ +name: org.geppetto.frontend workflow + +on: + push: + pull_request: + workflow_dispatch: + +jobs: + maven-install: + runs-on: ubuntu-latest + steps: + - uses : actions/checkout@v2.3.4 + - name: Set global bariable with current branch name + shell: bash + run: echo "::set-output name=branch::${GITHUB_REF#refs/heads/}" + id: git_branch + + - name : Checkout org.geppetto.model + uses : actions/checkout@v2.3.4 + with : + repository: openworm/org.geppetto.model.git + path : ./org.geppetto.model + ref: development + - name : Build org.geppetto.model + run : | + cd ./org.geppetto.model + # Checkout current branch that activated the git actions workflow, if fails checkout development + git checkout ${{ steps.git_branch.outputs.branch }} || git checkout development + mvn -e clean install + cd .. + + - name : Checkout org.geppetto.core + uses : actions/checkout@v2.3.4 + with : + repository: openworm/org.geppetto.core.git + path : ./org.geppetto.core + ref: development + - name : Build org.geppetto.core + run : | + cd ./org.geppetto.core + # Checkout current branch that activated the git actions workflow, if fails checkout development + git checkout ${{ steps.git_branch.outputs.branch }} || git checkout development + mvn -e clean install + cd .. + + - name : Checkout org.geppetto.simulation + uses : actions/checkout@v2.3.4 + with : + repository: openworm/org.geppetto.simulation.git + path : ./org.geppetto.simulation + ref: development + - name : Build org.geppetto.simulation + run : | + cd ./org.geppetto.simulation + # Checkout current branch that activated the git actions workflow, if fails checkout development + git checkout ${{ steps.git_branch.outputs.branch }} || git checkout development + mvn -e clean install + cd .. + + - name : Build org.geppetto.frontend + run : | + mvn -e clean install + cd .. \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 0d2e4c2d5..000000000 --- a/.travis.yml +++ /dev/null @@ -1,36 +0,0 @@ -language: java -env: - global: - secure: pIH0KE7Ps4z3I8WxfQM27cbncwWq7i5hyMea/w8hanStUulnsw0NDCVC/7molPtdM9l7sDkyJFSGRRLIt+Dt3uTFfVbJCxVXyF1G22yQhqp3y5BBMqFbz/9y9DRJly/DJWxtk0QvzG7kxtouq04UTU9TDVInut4HO9+LHvFkDUI= -install: -- git clone https://github.com/openworm/org.geppetto.model.git -- cd org.geppetto.model -- if [[ `git branch -a | egrep "remotes/origin/${TRAVIS_BRANCH}"` ]]; then git checkout $TRAVIS_BRANCH ; else echo "Branch $TRAVIS_BRANCH does not exist for the dependent bundle, checking out development ..." && git checkout development; fi -- git status -- mvn install -- cd .. -- git clone https://github.com/openworm/org.geppetto.core.git -- cd org.geppetto.core -- if [[ `git branch -a | egrep "remotes/origin/${TRAVIS_BRANCH}"` ]]; then git checkout $TRAVIS_BRANCH ; else echo "Branch $TRAVIS_BRANCH does not exist for the dependent bundle, checking out development ..." && git checkout development; fi -- git status -- mvn install -- cd .. -- git clone https://github.com/openworm/org.geppetto.simulation.git -- cd org.geppetto.simulation -- if [[ `git branch -a | egrep "remotes/origin/${TRAVIS_BRANCH}"` ]]; then git checkout $TRAVIS_BRANCH ; else echo "Branch $TRAVIS_BRANCH does not exist for the dependent bundle, checking out development ..." && git checkout development; fi -- git status -- mvn install -- cd .. - -script: - - echo "Current time :$(date +"%T")" - - cd $TRAVIS_BUILD_DIR/src/main - - echo "$TRAVIS_BRANCH" - - git clone https://github.com/openworm/geppetto-application.git webapp - - cd webapp - - git clone https://github.com/openworm/geppetto-client.git - - if [[ `git branch -a | egrep "remotes/origin/${TRAVIS_BRANCH}"` ]]; then git checkout $TRAVIS_BRANCH ; else echo "Branch $TRAVIS_BRANCH does not exist for the dependent bundle, checking out development ..." && git checkout development; fi - - cd geppetto-client - - if [[ `git branch -a | egrep "remotes/origin/${TRAVIS_BRANCH}"` ]]; then git checkout $TRAVIS_BRANCH ; else echo "Branch $TRAVIS_BRANCH does not exist for the dependent bundle, checking out development ..." && git checkout development; fi - - cd ../../../.. - - mvn install From 3820e4f497802ae86ba36f89f8c3d4da08294862 Mon Sep 17 00:00:00 2001 From: jrmartin Date: Wed, 24 Mar 2021 11:00:49 -0700 Subject: [PATCH 2/8] #906 Checkout geppetto-application --- .github/workflows/main.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bf9535de8..f6a3f7fe8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -56,6 +56,22 @@ jobs: git checkout ${{ steps.git_branch.outputs.branch }} || git checkout development mvn -e clean install cd .. + + - name : Checkout geppetto-application + uses : actions/checkout@v2.3.4 + with : + repository: openworm/geppetto-application.git + path : ./webapp + ref: development + - name : Build geppetto-application + run : | + cd ./webapp + # Checkout current branch that activated the git actions workflow, if fails checkout development + git checkout ${{ steps.git_branch.outputs.branch }} || git checkout development + git clone https://github.com/openworm/geppetto-client.git + cd geppetto-client + git checkout ${{ steps.git_branch.outputs.branch }} || git checkout development + cd ../.. - name : Build org.geppetto.frontend run : | From 05a46e05f1d5c1cdd42d8824f638f2d8933e835f Mon Sep 17 00:00:00 2001 From: jrmartin Date: Wed, 24 Mar 2021 12:04:31 -0700 Subject: [PATCH 3/8] #906 change path of webapp folder --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f6a3f7fe8..8304db45a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -61,11 +61,11 @@ jobs: uses : actions/checkout@v2.3.4 with : repository: openworm/geppetto-application.git - path : ./webapp + path : webapp ref: development - name : Build geppetto-application run : | - cd ./webapp + cd webapp # Checkout current branch that activated the git actions workflow, if fails checkout development git checkout ${{ steps.git_branch.outputs.branch }} || git checkout development git clone https://github.com/openworm/geppetto-client.git From 9683c1ef5569ecd594fff400a7a2fc78b5c65a49 Mon Sep 17 00:00:00 2001 From: jrmartin Date: Wed, 24 Mar 2021 12:19:02 -0700 Subject: [PATCH 4/8] #906 Test action --- .github/workflows/main.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8304db45a..01c5bd2d0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -75,5 +75,8 @@ jobs: - name : Build org.geppetto.frontend run : | + cd .. + ls + pwd mvn -e clean install cd .. \ No newline at end of file From 810f95c0951eec49be8393ae69bc4d7a2a148d6f Mon Sep 17 00:00:00 2001 From: jrmartin Date: Wed, 24 Mar 2021 12:40:40 -0700 Subject: [PATCH 5/8] #906 test action --- .github/workflows/main.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 01c5bd2d0..1cef6a91e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -61,22 +61,21 @@ jobs: uses : actions/checkout@v2.3.4 with : repository: openworm/geppetto-application.git - path : webapp + path : ./webapp ref: development - name : Build geppetto-application run : | - cd webapp + cd ./webapp + ls # Checkout current branch that activated the git actions workflow, if fails checkout development git checkout ${{ steps.git_branch.outputs.branch }} || git checkout development git clone https://github.com/openworm/geppetto-client.git cd geppetto-client git checkout ${{ steps.git_branch.outputs.branch }} || git checkout development - cd ../.. + cd ../../.. - name : Build org.geppetto.frontend run : | - cd .. ls - pwd mvn -e clean install cd .. \ No newline at end of file From 0a0028e54acac141cc0480526ad9407eb9b9ea02 Mon Sep 17 00:00:00 2001 From: jrmartin Date: Fri, 26 Mar 2021 08:52:34 -0700 Subject: [PATCH 6/8] #906 test action flow --- .github/workflows/main.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1cef6a91e..f2b463d51 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -67,6 +67,7 @@ jobs: run : | cd ./webapp ls + pwd # Checkout current branch that activated the git actions workflow, if fails checkout development git checkout ${{ steps.git_branch.outputs.branch }} || git checkout development git clone https://github.com/openworm/geppetto-client.git @@ -77,5 +78,9 @@ jobs: - name : Build org.geppetto.frontend run : | ls + pwd + cd webapp + ls + pwd mvn -e clean install cd .. \ No newline at end of file From 5f0b8744e5caa915eec278b7ce99e8052d50604b Mon Sep 17 00:00:00 2001 From: jrmartin Date: Fri, 26 Mar 2021 09:12:01 -0700 Subject: [PATCH 7/8] #906 test action --- .github/workflows/main.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f2b463d51..7bdb7efd7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -61,11 +61,11 @@ jobs: uses : actions/checkout@v2.3.4 with : repository: openworm/geppetto-application.git - path : ./webapp + path : ./src/main/webapp ref: development - name : Build geppetto-application run : | - cd ./webapp + cd ./src/main/webapp ls pwd # Checkout current branch that activated the git actions workflow, if fails checkout development @@ -73,13 +73,10 @@ jobs: git clone https://github.com/openworm/geppetto-client.git cd geppetto-client git checkout ${{ steps.git_branch.outputs.branch }} || git checkout development - cd ../../.. + cd ../../../../.. - name : Build org.geppetto.frontend run : | - ls - pwd - cd webapp ls pwd mvn -e clean install From a21856ec5e2cfa8adfac669dc3cd99831b0a9cb5 Mon Sep 17 00:00:00 2001 From: jrmartin Date: Fri, 26 Mar 2021 09:36:52 -0700 Subject: [PATCH 8/8] #906 clean workflow now that it builds sucessfully --- .github/workflows/main.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7bdb7efd7..a086f8ed8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -66,8 +66,6 @@ jobs: - name : Build geppetto-application run : | cd ./src/main/webapp - ls - pwd # Checkout current branch that activated the git actions workflow, if fails checkout development git checkout ${{ steps.git_branch.outputs.branch }} || git checkout development git clone https://github.com/openworm/geppetto-client.git @@ -77,7 +75,5 @@ jobs: - name : Build org.geppetto.frontend run : | - ls - pwd mvn -e clean install cd .. \ No newline at end of file