Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: deploy to ASF snapshots from GitHub Actions #505

Merged
merged 1 commit into from
Sep 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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