Skip to content
This repository has been archived by the owner on Aug 30, 2023. It is now read-only.

Commit

Permalink
Mapped CI release
Browse files Browse the repository at this point in the history
Signed-off-by: Oleksandr Porunov <alexandr.porunov@gmail.com>
  • Loading branch information
porunov committed Jul 17, 2023
1 parent f40ad5b commit 3870b99
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 68 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/ci-mapped.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Copyright 2021 JanusGraph Authors
#
# Licensed 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.

name: Publish package to GitHub Packages
on:
release:
types: [created]
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '8.0.372+7'
java-package: jdk

- name: Setup unique version
run: mvn versions:set -DnewVersion=$(date +%s) -DgenerateBackupPoms=false

- name: Compile and prepare release
run: mvn clean install -Pjanusgraph-release -Dgpg.skip=true -DskipTests=true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Deploy release
run: mvn deploy -Pjanusgraph-release -Dgpg.skip=true -DskipTests=true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
64 changes: 0 additions & 64 deletions janusgraph-dist/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@

<packname.standard>janusgraph-${project.version}</packname.standard>
<packname.full>janusgraph-full-${project.version}</packname.full>
<docker.baseimage>eclipse-temurin:11-jre</docker.baseimage>
<docker.tag-suffix></docker.tag-suffix>

<!-- Variables for integration testing on release-candidate archive files -->
<test.expect.dir>${project.build.directory}/test-classes</test.expect.dir>
Expand Down Expand Up @@ -322,8 +320,6 @@
<properties>
<packname.standard>janusgraph-java-11-${project.version}</packname.standard>
<packname.full>janusgraph-java-11-full-${project.version}</packname.full>
<docker.baseimage>eclipse-temurin:11-jre</docker.baseimage>
<docker.tag-suffix>-java-11</docker.tag-suffix>
</properties>
</profile>
<profile>
Expand Down Expand Up @@ -587,66 +583,6 @@
</executions>
</plugin>

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>docker-build</id>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>./docker/build-and-push-image.sh</executable>
<workingDirectory>${project.basedir}</workingDirectory>
<arguments>
<argument>${project.version}</argument>
<argument>${docker.baseimage}</argument>
<argument>${packname.standard}</argument>
<argument>no-push</argument>
<argument>${docker.tag-suffix}</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>docker-test</id>
<phase>integration-test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<skip>${skipTests}</skip>
<executable>./docker/test-image.sh</executable>
<workingDirectory>${project.basedir}</workingDirectory>
<arguments>
<argument>docker.io/janusgraph/janusgraph:${project.version}${docker.tag-suffix}</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>docker-deploy</id>
<phase>deploy</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>./docker/build-and-push-image.sh</executable>
<workingDirectory>${project.basedir}</workingDirectory>
<arguments>
<argument>${project.version}</argument>
<argument>${docker.baseimage}</argument>
<argument>${packname.standard}</argument>
<argument>push</argument>
<argument>${docker.tag-suffix}</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>


<!-- gpg must follow assembly.
Both plugins run in the package phase, so only <plugin> ordering
ensures that signing happens after assembly file generation.
Expand Down
10 changes: 6 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,14 @@
</scm>
<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<id>github</id>
<name>GitHub Packages</name>
<url>https://maven.pkg.github.com/mapped/janusgraph</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
<id>github</id>
<name>GitHub Packages</name>
<url>https://maven.pkg.github.com/mapped/janusgraph</url>
</repository>
</distributionManagement>
<properties>
Expand Down

0 comments on commit 3870b99

Please sign in to comment.