Skip to content

Commit

Permalink
build: deploy to ASF snapshots from GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
lburgazzoli committed Sep 25, 2020
1 parent e91c528 commit 22df98b
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 32 deletions.
34 changes: 34 additions & 0 deletions .github/asf-deploy-settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<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">

<servers>
<server>
<id>apache.snapshots.https</id>
<username>${env.NEXUS_DEPLOY_USERNAME}</username>
<password>${env.NEXUS_DEPLOY_PASSWORD}</password>
</server>
</servers>

</settings>
48 changes: 16 additions & 32 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,39 +46,8 @@ jobs:
uses: AdoptOpenJDK/install-jdk@v1
with:
version: '11'
- name: Build camel (master)
if: contains( github.event.pull_request.labels.*.name, 'depends-on/camel/master')
run: |
git clone --depth 1 --branch master https://github.com/apache/camel.git \
&& cd camel \
&& echo "Current Camel commit:" $(git rev-parse HEAD) \
&& ./mvnw -V -B -ntp clean install \
-Dfastinstall
git clone --depth 1 --branch camel-master https://github.com/apache/camel-quarkus.git \
&& cd camel-quarkus \
&& echo "Current Camel Quarkus commit:" $(git rev-parse HEAD) \
&& ./mvnw -V -B -ntp clean install \
-Dformatter.skip \
-Dimpsort.skip \
-Denforce=false \
-Dcamel-quarkus.update-extension-doc-page.skip \
-DskipTests \
-DskipITs
- name: Build camel-quarkus (master)
if: contains( github.event.pull_request.labels.*.name, 'depends-on/quarkus/master')
run: |
git clone --depth 1 --branch master https://github.com/apache/camel-quarkus.git \
&& cd camel-quarkus \
&& echo "Current Camel Quarkus commit:" $(git rev-parse HEAD) \
&& ./mvnw -V -B -ntp clean install \
-Dformatter.skip \
-Dimpsort.skip \
-Denforce=false \
-Dcamel-quarkus.update-extension-doc-page.skip \
-DskipTests \
-DskipITs
- name: Build camel-k-runtime
run: ./mvnw -V -B -ntp clean install
run: ./mvnw -V -ntp clean install
- name: Tar Maven Repo
shell: bash
run: tar -czf maven-repo-${{ github.run_id }}-${{ github.run_number }}.tgz -C ~ .m2/repository
Expand Down Expand Up @@ -145,6 +114,21 @@ jobs:
-Dnative-image.xmx=6g \
-Ddocker \
-pl ${{ matrix.native-image-project }}
deploy:
runs-on: ubuntu-latest
needs: build-native
if: github.ref == 'refs/heads/master'
env:
NEXUS_DEPLOY_USERNAME: ${{ secrets.NEXUS_USER }}
NEXUS_DEPLOY_PASSWORD: ${{ secrets.NEXUS_PWD }}
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: AdoptOpenJDK/install-jdk@v1
with:
version: '11'
- name: Deploy to ASF Snapshots Repository
run: ./mvnw -V -ntp clean deploy -DskipTests -DskipITs --settings .github/asf-deploy-settings.xml

#
# JS build disabled as fails for OOM
Expand Down

0 comments on commit 22df98b

Please sign in to comment.