Skip to content

Commit

Permalink
Merge pull request #9 from saagie/experimental
Browse files Browse the repository at this point in the history
Experimental java13
  • Loading branch information
PierreLeresteux authored Jan 6, 2020
2 parents 1fe783c + cce336e commit 043fbc6
Show file tree
Hide file tree
Showing 14 changed files with 195 additions and 15 deletions.
18 changes: 14 additions & 4 deletions .github/workflows/buildAllJobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,23 @@ jobs:
release_name: Release ${{ steps.extract_version.outputs.v }}
draft: false
prerelease: true
- name: Upload Release Asset
id: upload-release-asset
- name: Upload Release certified Asset
id: upload-release-asset-certified
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_SECRET }}
GITHUB_TOKEN: ${{ secrets.GITHUB_SECRET}}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./tmp-zip/certified.zip
asset_name: certified.zip
asset_content_type: application/zip
asset_content_type: application/zip
- name: Upload Release experimental Asset
id: upload-release-asset-experimental
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_SECRET}}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./tmp-zip/experimental.zip
asset_name: experimental.zip
asset_content_type: application/zip
14 changes: 12 additions & 2 deletions .github/workflows/buildOnlyModified.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,23 @@ jobs:
release_name: Release ${{ steps.extract_version.outputs.v }}
draft: false
prerelease: true
- name: Upload Release Asset
id: upload-release-asset
- name: Upload Release certified Asset
id: upload-release-asset-certified
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_SECRET}}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./tmp-zip/certified.zip
asset_name: certified.zip
asset_content_type: application/zip
- name: Upload Release experimental Asset
id: upload-release-asset-experimental
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_SECRET}}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./tmp-zip/experimental.zip
asset_name: experimental.zip
asset_content_type: application/zip
16 changes: 13 additions & 3 deletions .github/workflows/promote.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,26 @@ jobs:
release_name: Release ${{ steps.extract_version.outputs.v }}
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
- name: Upload Release certified Asset
id: upload-release-asset-certified
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_SECRET }}
GITHUB_TOKEN: ${{ secrets.GITHUB_SECRET}}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./tmp-zip/certified.zip
asset_name: certified.zip
asset_content_type: application/zip
- name: Upload Release experimental Asset
id: upload-release-asset-experimental
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_SECRET}}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./tmp-zip/experimental.zip
asset_name: experimental.zip
asset_content_type: application/zip
- name: Upgrade version
run: |
./gradlew incrementMinor
Expand Down
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ val buildDockerTaskName = "buildDockerImage"
plugins {
id("net.thauvin.erik.gradle.semver").version("1.0.4")
id("com.bmuschko.docker-remote-api") version "6.1.1"
id("org.kordamp.gradle.project") version "0.30.4"
id("org.kordamp.gradle.project") version "0.31.2"
}

buildscript {
repositories {
mavenLocal()
}
dependencies {
classpath("com.saagie:technologiesplugin:1.0.16")
classpath("com.saagie:technologiesplugin:1.0.17")
}
}
apply<SaagieTechnologiesPackageGradlePlugin>()
Expand Down
14 changes: 14 additions & 0 deletions experimental/job/java/13/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM openjdk:13.0-jdk-slim-buster

COPY entrypoint /entrypoint
RUN chmod 755 /entrypoint

ENV HADOOP_CONF_DIR=/etc/hadoop/conf

#UPDATE SECURITY PACKAGE BEGIN
RUN apt-get update && apt-get upgrade -y
#UPDATE SECURITY PACKAGE END

WORKDIR /sandbox

ENTRYPOINT ["bash","/entrypoint"]
22 changes: 22 additions & 0 deletions experimental/job/java/13/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* Copyright 2019 Pierre Leresteux.
*
* 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
*
* https://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.
*/
import com.bmuschko.gradle.docker.DockerRemoteApiPlugin
import com.saagie.technologies.SaagieTechnologiesGradlePlugin

apply<DockerRemoteApiPlugin>()
apply<SaagieTechnologiesGradlePlugin>()
9 changes: 9 additions & 0 deletions experimental/job/java/13/entrypoint
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

set -euo pipefail


if test -f main_script;
then sh ./main_script;
else exec "$@"
fi;
36 changes: 36 additions & 0 deletions experimental/job/java/13/image_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
schemaVersion: "2.0.0"

metadataTest:
env:
- key: LANG
value: "C.UTF-8"
- key: JAVA_HOME
value: "/usr/java/openjdk-13"
- key: "HADOOP_CONF_DIR"
value: "/etc/hadoop/conf"

fileExistenceTests:
- name: "entrypoint"
path: "/entrypoint"
shouldExist: true
permissions: "-rwxr-xr-x"

fileContentTests:
- name: "entrypoint"
path: "/entrypoint"
expectedContents: ["sh ./main_script"]

commandTests:
- name: "java installation"
command: "which"
args: ["java"]
expectedOutput: ["/usr/java/openjdk-13/bin/java"]

- name: "java version"
command: "java"
args: ["-version"]
expectedError: ['openjdk version "13.0']

- name: "Workdir"
command: "pwd"
expectedOutput: ["/sandbox"]
30 changes: 30 additions & 0 deletions experimental/job/java/13/metadata.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
version:
label: 13
isAvailable: true
defaultResources:
cpu: 0.3
memory: 512
disk: 512
features:
- field: COMMAND_LINE
label: Command line
isMandatory: true
comment: Linux shell command to launch the job.
defaultValue: java -jar {file} arg1 arg2
- field: ARTIFACT
label: Package
isMandatory: true
comment: "Compatible upload file : .jar"
- field: SCHEDULER
label: Scheduled
isMandatory: true

techno:
id: a8a76a2a-f6cc-4271-aeea-445d06aa3396
label: Java/Scala
available: true
icon: java-scala
recommendedVersion: 11
docker:
image: saagie/java-scala
version: 13-0.8.0_experimental
18 changes: 18 additions & 0 deletions experimental/job/java/13/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* Copyright 2019 Pierre Leresteux.
*
* 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
*
* https://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.
*/
rootProject.name = "java13"
20 changes: 20 additions & 0 deletions experimental/job/java/13/version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version:
label: 13
isAvailable: true
defaultResources:
cpu: 0.3
memory: 512
disk: 512
features:
- field: COMMAND_LINE
label: Command line
isMandatory: true
comment: Linux shell command to launch the job.
defaultValue: java -jar {file} arg1 arg2
- field: ARTIFACT
label: Package
isMandatory: true
comment: "Compatible upload file : .jar"
- field: SCHEDULER
label: Scheduled
isMandatory: true
1 change: 1 addition & 0 deletions experimental/job/java/techno.yml
4 changes: 2 additions & 2 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pluginManagement {
}
plugins {
id("com.gradle.enterprise") version "3.0"
id("org.kordamp.gradle.settings") version "0.30.4"
id("org.kordamp.gradle.settings") version "0.31.2"
}


Expand All @@ -33,7 +33,7 @@ gradleEnterprise {
termsOfServiceAgree = "yes"
}
}
rootProject.name = "test_actions"
rootProject.name = "technologies"
val allProjects = mutableListOf<String>()

listOf("certified", "experimental").forEach() {
Expand Down
4 changes: 2 additions & 2 deletions version.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version.buildmeta=
version.buildmeta=experimental
version.buildmeta.prefix=_
version.major=0
version.minor=8
version.patch=0
version.prerelease=
version.semver=0.8.0
version.semver=0.8.0_experimental

0 comments on commit 043fbc6

Please sign in to comment.