78 lines
2.5 KiB
YAML
78 lines
2.5 KiB
YAML
#
|
|
# Copyright (c) 2020 Red Hat, Inc.
|
|
# This program and the accompanying materials are made
|
|
# available under the terms of the Eclipse Public License 2.0
|
|
# which is available at https://www.eclipse.org/legal/epl-2.0/
|
|
#
|
|
# SPDX-License-Identifier: EPL-2.0
|
|
#
|
|
|
|
name: build-nightly
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: "0 0 * * *"
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Cache local Maven repository
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: ~/.m2/repository
|
|
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-maven-
|
|
- name: Set up JDK 11
|
|
uses: actions/setup-java@v2
|
|
with:
|
|
distribution: 'adopt'
|
|
java-version: '11.0.11+9'
|
|
- name: Login to docker.io
|
|
uses: docker/login-action@v1
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
|
registry: docker.io
|
|
- name: Login to quay.io
|
|
uses: docker/login-action@v1
|
|
with:
|
|
username: ${{ secrets.QUAY_USERNAME }}
|
|
password: ${{ secrets.QUAY_PASSWORD }}
|
|
registry: quay.io
|
|
- name: Build with Maven
|
|
run: mvn -B clean install -U -Pintegration
|
|
- name: Build docker images
|
|
run:
|
|
./dockerfiles/build.sh
|
|
- name: Push docker images
|
|
run: |
|
|
docker push quay.io/eclipse/che-endpoint-watcher:nightly
|
|
docker push quay.io/eclipse/che-keycloak:nightly
|
|
docker push quay.io/eclipse/che-postgres:nightly
|
|
docker push quay.io/eclipse/che-dev:nightly
|
|
docker push quay.io/eclipse/che-server:nightly
|
|
docker push quay.io/eclipse/che-e2e:nightly
|
|
- name: Build ubi8 Che Server image
|
|
run:
|
|
./dockerfiles/che/build.sh --dockerfile:"rhel.Dockerfile" --tag:"rhel-nightly"
|
|
- name: Push ubi8 Che Server image
|
|
run:
|
|
docker push quay.io/eclipse/che-server:rhel-nightly
|
|
- name: Create failure MM message
|
|
if: ${{ failure() }}
|
|
run: |
|
|
echo "{\"text\":\":no_entry_sign: Nightly Che Server build has failed: https://github.com/eclipse/che/actions/workflows/nightly-build.yml\"}" > mattermost.json
|
|
- name: Send MM message
|
|
if: ${{ failure() }}
|
|
uses: mattermost/action-mattermost-notify@1.0.2
|
|
env:
|
|
MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
|
|
MATTERMOST_CHANNEL: eclipse-che-ci
|
|
MATTERMOST_USERNAME: che-bot
|