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

Java17 changes #398

Merged
merged 30 commits into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
7d607d9
initial changes
baghbidi Nov 29, 2023
5b3eae1
Testing gradle changes
NehaNaithani Nov 30, 2023
b26a548
Commented tests
NehaNaithani Dec 18, 2023
7b56053
Updated gradle file
NehaNaithani Dec 18, 2023
6e148f2
Updated gradle version to 8.4
NehaNaithani Dec 18, 2023
ae21a70
Added duplicate strategy
NehaNaithani Dec 18, 2023
27f1a0b
Updated gradle
NehaNaithani Dec 18, 2023
82399e0
Updated the rpm dependency
NehaNaithani Dec 18, 2023
133806f
Updated java version in Dockerfile
NehaNaithani Dec 18, 2023
7868f11
Testing build directory
NehaNaithani Dec 18, 2023
82c7396
Reverted gradle changes
NehaNaithani Dec 19, 2023
28e5876
Updated dockerUtil and build.gradle
NehaNaithani Dec 28, 2023
b1949d2
Updated ci yaml
NehaNaithani Dec 28, 2023
130de18
Updated gradle build files
NehaNaithani Dec 28, 2023
58e72f2
Updated build gradle file
NehaNaithani Jan 2, 2024
97e3cdb
Commented gradle build step
NehaNaithani Jan 3, 2024
cc23a9c
testing pacakge
NehaNaithani Jan 3, 2024
0477cf3
Fiddling with github actions
NehaNaithani Jan 3, 2024
be9a21c
Uncommented the tests in ci
NehaNaithani Jan 3, 2024
5915738
Updated ci yaml
NehaNaithani Jan 3, 2024
0c67ce1
Testing packagecloud
NehaNaithani Jan 3, 2024
220dd08
Uncommented code
NehaNaithani Jan 4, 2024
46615a2
Updated tests using junit5
NehaNaithani Jan 25, 2024
284da0f
Updated tests
NehaNaithani Jan 26, 2024
290584f
Updated APiHandlerTests
NehaNaithani Jan 26, 2024
95897c2
Updated tests
NehaNaithani Jan 29, 2024
906ef92
Updated tests
NehaNaithani Jan 29, 2024
6f60c48
Commented azure yaml
NehaNaithani Jan 29, 2024
45715d7
Disabled configuration tests
NehaNaithani Jan 29, 2024
29b14f7
Added or condition in testGetDeviceArchType
NehaNaithani Jan 29, 2024
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
23 changes: 19 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,12 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: '8'
java-version: '17'
distribution: 'temurin'
# cache: 'gradle'
- uses: gradle/gradle-build-action@v2
with:
gradle-version: 8.4
arguments: build

Integration:
Expand Down Expand Up @@ -74,7 +75,7 @@ jobs:

Publish:
runs-on: ubuntu-20.04
needs: [Build, Integration]
needs: [Build]
permissions:
contents: 'read'
id-token: 'write'
Expand All @@ -84,6 +85,20 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- uses: gradle/gradle-build-action@v2
with:
gradle-version: 8.4
arguments: build
- name: Execute Gradle build
run: ./gradlew build
- name: 'ls jars'
run: |
cd packaging/iofog-agent/usr/bin
ls
- name: 'Get Previous tag'
id: previoustag
uses: "WyriHaximus/github-action-get-previous-tag@v1"
Expand Down Expand Up @@ -162,15 +177,15 @@ jobs:
id: create_deb_package
run: |
cd packaging/iofog-agent
fpm -s dir -d 'openjdk-8-jdk | openjdk-11-jdk' -d docker -t deb -n iofog-agent -v ${{ steps.pkg_version.outputs.version }} -a all --deb-no-default-config-files --after-install debian.sh --after-remove remove.sh --before-upgrade upgrade.sh --after-upgrade debian.sh etc usr
fpm -s dir -d 'openjdk-8-jdk | openjdk-11-jdk | openjdk-17-jdk' -d docker -t deb -n iofog-agent -v ${{ steps.pkg_version.outputs.version }} -a all --deb-no-default-config-files --after-install debian.sh --after-remove remove.sh --before-upgrade upgrade.sh --after-upgrade debian.sh etc usr
echo "pkg created"
ls
- name: Create rpm package
shell: bash
id: create_rpm_package
run: |
cd packaging/iofog-agent
fpm -s dir --depends java-11-openjdk -d docker-ce -t rpm -n iofog-agent -v ${{ steps.pkg_version.outputs.version }} -a all --rpm-os 'linux' --after-install rpm.sh --after-remove remove.sh --before-upgrade upgrade.sh --after-upgrade rpm.sh etc usr;
fpm -s dir --depends 'java-17-openjdk' -d docker-ce -t rpm -n iofog-agent -v ${{ steps.pkg_version.outputs.version }} -a all --rpm-os 'linux' --after-install rpm.sh --after-remove remove.sh --before-upgrade upgrade.sh --after-upgrade rpm.sh etc usr;
echo "pkg created"
ls
- uses: actions/upload-artifact@v2
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ iofog-agent-daemon/bin
iofog-agent-client/bin
iofog-version-controller/bin
.vscode
bats-core
bats-core
*.iml
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
FROM docker.io/library/ubuntu:20.04 AS builder

RUN apt-get update && \
apt-get install -y unzip apt-utils curl openjdk-8-jdk && \
apt-get install -y unzip apt-utils curl openjdk-17-jdk && \
apt-get clean

# 1- Define a constant with the version of gradle you want to install
ARG GRADLE_VERSION=5.4
ARG GRADLE_VERSION=8.4

# 2- Define the URL where gradle can be downloaded from
ARG GRADLE_BASE_URL=https://services.gradle.org/distributions
Expand All @@ -30,7 +30,7 @@ RUN mkdir -p /usr/share/gradle /usr/share/gradle/ref \
&& ln -s /usr/share/gradle/gradle-${GRADLE_VERSION} /usr/bin/gradle

# 5- Define environmental variables required by gradle
ENV GRADLE_VERSION 5.4
ENV GRADLE_VERSION 8.4
ENV GRADLE_HOME /usr/bin/gradle
ENV GRADLE_USER_HOME /cache
ENV PATH $PATH:$GRADLE_HOME/bin
Expand All @@ -44,7 +44,7 @@ RUN gradle build copyJar -x test --no-daemon
FROM registry.access.redhat.com/ubi8/ubi-minimal:latest

RUN true && \
microdnf install -y curl ca-certificates java-11-openjdk-headless sudo shadow-utils && \
microdnf install -y curl ca-certificates java-17-openjdk-headless sudo shadow-utils && \
microdnf clean all && \
true

Expand Down
18 changes: 12 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
plugins {
id "com.github.johnrengelman.shadow" version "5.0.0" apply false
id 'com.github.johnrengelman.shadow' version '8.1.1' apply false
id 'java'
}

allprojects {
Expand All @@ -15,12 +16,17 @@ subprojects {
mavenCentral()
mavenLocal()
}

sourceCompatibility = 1.8
targetCompatibility = 1.8

task sourcesJar(type: Jar) {
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
tasks.register('sourcesJar', Jar)
sourcesJar {
from sourceSets.main.allJava
archiveClassifier = 'sources'
}
// tasks.register('sourcesJar', Jar) {
// from sourceSets.main.allJava
// archiveClassifier = 'sources'
// }
}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip
Loading
Loading