-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
1,213 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0"?> | ||
<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"> | ||
<mirrors> | ||
<mirror> | ||
<id>artifactory-georchestra</id> | ||
<mirrorOf>*</mirrorOf> | ||
<url>https://artifactory.georchestra.org/artifactory/maven</url> | ||
</mirror> | ||
</mirrors> | ||
</settings> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
name: CI | ||
|
||
env: | ||
# Note: Only used to tag the docker image | ||
GEORCHESTRA_VERSION: gn4.2.x | ||
|
||
on: | ||
push: | ||
workflow_dispatch: | ||
branches: | ||
- georchestra-gn4.2.x-geo2france | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 35 | ||
steps: | ||
- name: "Checking out" | ||
uses: actions/[email protected] | ||
with: | ||
submodules: 'recursive' | ||
|
||
- name: "Checking out geOrchestra (needed for building testcontainers)" | ||
uses: actions/[email protected] | ||
with: | ||
repository: "georchestra/georchestra" | ||
path: "georchestra" | ||
ref: "master" | ||
|
||
- name: Saving start date | ||
run: | | ||
date +%s%3N > start | ||
- name: "Setting up Java" | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: '11' | ||
distribution: 'adopt' | ||
cache: 'maven' | ||
|
||
- name: "Configuring Maven" | ||
run: | | ||
mkdir -p $HOME/.m2 | ||
cp .github/resources/m2-settings.xml $HOME/.m2/settings.xml | ||
- name: "Installing the geOrchestra root pom" | ||
run: | | ||
mvn install --non-recursive -f georchestra/pom.xml | ||
- name: "Installing testcontainers georchestra module" | ||
run: | | ||
mvn clean install -f georchestra/testcontainers/pom.xml | ||
- name: "Installing georchestra commons module" | ||
run: | | ||
mvn clean install -f georchestra/commons/pom.xml | ||
- name: "Installing security-proxy-spring-integration georchestra module" | ||
run: | | ||
mvn clean install -f georchestra/security-proxy-spring-integration/pom.xml | ||
- name: "Installing GeoNetwork" | ||
run: mvn clean install -DskipTests | ||
|
||
- name: "Building docker image" | ||
working-directory: web/ | ||
run: mvn clean package docker:build -Pdocker,log4j-logstash,sentry-log4j -DdockerImageName=ghcr.io/camptocamp/georchestra-geo2france-configuration/geonetwork:${{ env.GEORCHESTRA_VERSION }}-${GITHUB_RUN_ID} -DskipTests | ||
|
||
- name: "Login onto ghcr.io" | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ghcr.io | ||
username: 'c2c-bot-gis-ci' | ||
password: '${{ secrets.GOPASS_CI_GITHUB_TOKEN }}' | ||
|
||
- name: "Pushing image to ghcr.io" | ||
run: | | ||
docker push ghcr.io/camptocamp/georchestra-geo2france-configuration/geonetwork:${{ env.GEORCHESTRA_VERSION }}-${GITHUB_RUN_ID} | ||
- name: "Slack notification" | ||
uses: slackapi/[email protected] | ||
with: | ||
channel-id: 'CFQMVL8BG' | ||
payload: | | ||
{ | ||
"text": "GitHub Action build result: ${{ job.status }}\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}", | ||
"blocks": [ | ||
{ | ||
"type": "section", | ||
"text": { | ||
"type": "mrkdwn", | ||
"text": "GitHub Action build result: ${{ job.status }}\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}" | ||
} | ||
} | ||
] | ||
} | ||
env: | ||
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} | ||
|
||
- name: "Publish a google-calendar event" | ||
if: success() | ||
uses: pmauduit/google-calendar-action@v1 | ||
with: | ||
OAUTH_CLIENT_ID: '${{ secrets.GOOGLE_OAUTH_CLIENT_ID }}' | ||
OAUTH_CLIENT_SECRET: '${{ secrets.GOOGLE_OAUTH_CLIENT_SECRET }}' | ||
OAUTH_ACCESS_TOKEN: '${{ secrets.GOOGLE_OAUTH_ACCESS_TOKEN }}' | ||
OAUTH_REFRESH_TOKEN: '${{ secrets.GOOGLE_OAUTH_REFRESH_TOKEN }}' | ||
GCAL_ID: 'camptocamp.com_mpbq7llrcthk5qmmc0mkq7mlo0@group.calendar.google.com' | ||
GCAL_EVENT_SUMMARY: 'Github actions - ${{ github.repository }}' | ||
GCAL_EVENT_DESCRIPTION: "Image ghcr.io/camptocamp/georchestra-geo2france-configuration/geonetwork:${{ env.GEORCHESTRA_VERSION }}-${{ github.run_id }} built" |
Oops, something went wrong.