Skip to content

Jdk8 ubuntu #5

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

Open
wants to merge 38 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
efc7098
combine deploy into one line
wildone Jul 26, 2019
cf3dd55
update test check
wildone Jul 26, 2019
fc69077
update test echo
wildone Jul 26, 2019
3e2e1ec
update echo
wildone Jul 26, 2019
590b659
update url test
wildone Jul 26, 2019
45180fd
update evaluate of string command
wildone Jul 26, 2019
82a07bd
add else for test output
wildone Jul 26, 2019
35c47e5
update test check
wildone Jul 27, 2019
073004a
use travis_terminate 1 to stop pipeline
wildone Jul 27, 2019
d4e514d
update yml format
wildone Jul 27, 2019
9c270ba
combine all steps into script
wildone Jul 27, 2019
415a669
update to match master
wildone Oct 2, 2019
b5a33f7
update to self increment tags on release
wildone Oct 2, 2019
a07769d
update to match master
wildone Oct 3, 2019
bf4258a
Merge remote-tracking branch 'remotes/origin/master' into jdk8
wildone Oct 3, 2019
9743357
use centos 7
wildone Oct 3, 2019
735df40
update jdk8
wildone Mar 29, 2021
df16237
split into steps
wildone Mar 29, 2021
a389d68
update checksum url
wildone Mar 29, 2021
055134d
update url
wildone Mar 29, 2021
f6e61f6
update url
wildone Mar 29, 2021
e8ef82c
update url
wildone Mar 29, 2021
78bb3e6
update url
wildone Mar 29, 2021
c2cb2c8
update url
wildone Mar 29, 2021
fd34767
update url
wildone Mar 29, 2021
ec9d4e4
update gitattibutes [skip ci]
wildone May 15, 2021
3124cc1
move to debian.
wildone Feb 5, 2022
3de8263
build amd64.
wildone Feb 5, 2022
49103ee
fix image source.
wildone Feb 5, 2022
d95981e
update tests.
wildone Feb 6, 2022
c7bbcad
Update Dockerfile
wildone Feb 23, 2022
f1c8741
update to use gdrive container to download files from gdrive.
wildone Feb 23, 2022
6575fd7
update test.
wildone Feb 23, 2022
d57ccf6
add docker image analysis and cleanup.
wildone Feb 25, 2022
d16bc73
add docker analysis to pipeline.
wildone Feb 25, 2022
ea9c089
add missing file and chars.
wildone Feb 25, 2022
3df9592
add missing file.
wildone Feb 25, 2022
7e0aed7
update pipelines.
wildone Feb 25, 2022
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
13 changes: 13 additions & 0 deletions .dive-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
rules:
# If the efficiency is measured below X%, mark as failed.
# Expressed as a ratio between 0-1.
lowestEfficiency: 0.95

# If the amount of wasted space is at least X or larger than X, mark as failed.
# Expressed in B, KB, MB, and GB.
highestWastedBytes: 20MB

# If the amount of wasted space makes up for X% or more of the image, mark as failed.
# Note: the base image layer is NOT included in the total image size.
# Expressed as a ratio between 0-1; fails if the threshold is met or crossed.
highestUserWastedPercent: 0.20
31 changes: 31 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
* text eol=crlf
* text eol=lf

*.zip filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.tar.gz filter=lfs diff=lfs merge=lfs -text
*.jpg filter=lfs diff=lfs merge=lfs -text
*.jpeg filter=lfs diff=lfs merge=lfs -text
*.tiff filter=lfs diff=lfs merge=lfs -text
*.ico filter=lfs diff=lfs merge=lfs -text
*.gif filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
original filter=lfs diff=lfs merge=lfs -text
file filter=lfs diff=lfs merge=lfs -text
folderThumbnail filter=lfs diff=lfs merge=lfs -text
*.woff filter=lfs diff=lfs merge=lfs -text
*.woff2 filter=lfs diff=lfs merge=lfs -text
*.eot filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.mp4 filter=lfs diff=lfs merge=lfs -text
*.flv filter=lfs diff=lfs merge=lfs -text
*.m4v filter=lfs diff=lfs merge=lfs -text
*.avi filter=lfs diff=lfs merge=lfs -text
*.psd filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.3gp filter=lfs diff=lfs merge=lfs -text
*.ogv filter=lfs diff=lfs merge=lfs -text
*.webm filter=lfs diff=lfs merge=lfs -text
*.wdmg filter=lfs diff=lfs merge=lfs -text
*.svg filter=lfs diff=lfs merge=lfs -text
*.sftmp filter=lfs diff=lfs merge=lfs -text
57 changes: 57 additions & 0 deletions .github/workflows/anchore.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

# This workflow checks out code, builds an image, performs a container image
# vulnerability scan with Anchore's Grype tool, and integrates the results with GitHub Advanced Security
# code scanning feature. For more information on the Anchore scan action usage
# and parameters, see https://github.com/anchore/scan-action. For more
# information on Anchore's container image scanning tool Grype, see
# https://github.com/anchore/grype
name: Anchore Container Scan

on:
push:
branches: [ master ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
schedule:
- cron: '40 17 * * 4'

permissions:
contents: read

jobs:
Anchore-Build-Scan:
permissions:
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
runs-on: ubuntu-latest
env:
SERVICE_ACCOUNT_JSON: ${{ secrets.GOOGLE_SERVICE_ACCOUNT }}
JDK_DRIVEID: ${{ secrets.JDK11_DRIVEID }}
steps:
- name: Checkout the code
uses: actions/checkout@v2

- name: Download Files from Google Drive
uses: docker://gvfn/gdrive
with:
entrypoint: "/bin/sh"
args: |
-c "\
gdrive --config /gdrive --service-account-evar SERVICE_ACCOUNT_JSON download --path /github/workspace/packages/ ${JDK_DRIVEID}

- name: Build the Docker image
run: docker build . --file Dockerfile --tag localbuild/testimage:latest
- name: Run the Anchore scan action itself with GitHub Advanced Security code scanning integration enabled
uses: anchore/scan-action@b08527d5ae7f7dc76f9621edb6e49eaf47933ccd
with:
image: "localbuild/testimage:latest"
acs-report-enable: true
- name: Upload Anchore Scan Report
uses: github/codeql-action/upload-sarif@v1
with:
sarif_file: results.sarif
107 changes: 107 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
name: build

on:
push:
branches:
- '*'

jobs:
build:
if: "!contains(github.event.head_commit.message, 'skip ci')"
runs-on: ubuntu-latest
env:
DOCKER_REGISTRY: docker.io
ORGANISATION_NAME: aemdesign
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
SERVICE_ACCOUNT_JSON: ${{ secrets.GOOGLE_SERVICE_ACCOUNT }}
JDK_DRIVEID: ${{ secrets.JDK_DRIVEID }}


steps:

- uses: actions/checkout@v2
- name: set envirnment variables
id: config
run: |
source <(curl -sL https://github.com/aem-design/aemdesign-docker/releases/latest/download/github_get_config.sh)
source <(curl -sL https://github.com/aem-design/aemdesign-docker/releases/latest/download/github_get_version.sh)

- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ env.DOCKER_USERNAME }}
password: ${{ env.DOCKER_PASSWORD }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Download Files from Google Drive
uses: docker://gvfn/gdrive
with:
entrypoint: "/bin/sh"
args: |
-c "\
gdrive --config /gdrive --service-account-evar SERVICE_ACCOUNT_JSON download --path /github/workspace/packages/ ${JDK_DRIVEID}

- name: Build and export to Docker
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64
load: true
build-args: |
"FILE_NAME=jdk-8u321-linux-x64.tar.gz"
tags: |
${{ env.IMAGE }}:${{ env.GIT_BRANCH }}
ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE }}:${{ env.GIT_BRANCH }}


- name: test docker image
run: |
cd test && bash ./run_tests.sh "ghcr.io/$GITHUB_REPOSITORY_OWNER/$IMAGE:$GIT_BRANCH"

- name: Run docker image analysis
uses: yuichielectric/[email protected]
with:
image: ${{ env.IMAGE }}:${{ env.GIT_BRANCH }}
config-file: ${{ env.GITHUB_WORKSPACE }}/.dive-ci.yml
github-token: ${{ secrets.GITHUB_TOKEN }}


- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64
push: true
build-args: |
"JDK_DRIVEID=${{ env.JDK_DRIVEID }}"
tags: |
${{ env.IMAGE }}:${{ env.GIT_BRANCH }}
ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE }}:${{ env.GIT_BRANCH }}

- name: Update Docker Hub Description
uses: peter-evans/dockerhub-description@v2
continue-on-error: true
with:
username: ${{ env.DOCKER_USERNAME }}
password: ${{ env.DOCKER_PASSWORD }}
repository: peterevans/dockerhub-description


- uses: meeDamian/[email protected]
if: github.ref == 'refs/heads/master'
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ env.GITHUB_TAG }}
name: ${{ env.GITHUB_TAG }}
body: ${{ env.GIT_RELEASE_NOTES }}
17 changes: 17 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

# Ignore IDE and Operating System artifacts
.idea
.classpath
.metadata
.project
.settings
maven-eclipse.xml
*.iml
*.ipr
*.iws
.DS_Store
*.rpm

target/
logs/
packages/
67 changes: 0 additions & 67 deletions .travis.yml

This file was deleted.

43 changes: 15 additions & 28 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,36 +1,23 @@
FROM aemdesign/centos-tini:latest
FROM aemdesign/tini:ubuntu-focal

MAINTAINER devops <[email protected]>

LABEL os="centos" \
LABEL os="ubuntu focal" \
container.description="oracle jdk" \
version="jdk11" \
version="jdk8" \
maintainer="devops <[email protected]>" \
imagename="oracle-jdk" \
test.command=" java -version 2>&1 | grep 'java version' | sed -e 's/.*java version "\(.*\)".*/\1/'" \
test.command.verify="11."
test.command.verify="1.8"

ARG FILE_NAME="jdk-8u321-linux-x64.tar.gz"

ARG JAVA_VERSION="11"
ARG JAVA_VERSION_TIMESTAMP="5066655"
ARG JAVA_DOWNLOAD_URL="http://www.oracle.com/technetwork/java/javase/downloads/jdk${JAVA_VERSION}-downloads-${JAVA_VERSION_TIMESTAMP}.html"
ARG ORACLE_PASSWORD="xxx"
ARG ORACLE_USERNAME="[email protected]"
ENV JAVA_HOME=/opt/jdk1.8.0_321/

COPY oracle-download.sh .
ADD packages/${FILE_NAME} /opt/

RUN chmod +x oracle-download.sh && \
echo JAVA_DOWNLOAD_URL=$JAVA_DOWNLOAD_URL && \
AUTO_JDKURLINFO=$(curl -LsN ${JAVA_DOWNLOAD_URL} | grep -m1 jdk\-${JAVA_VERSION}.*linux.*x64.*.rpm ) && \
AUTO_JDKURL=$(echo ${AUTO_JDKURLINFO} | sed -e 's/.*"filepath":"\(http.*.rpm\)".*/\1/g' ) && \
echo AUTO_JDKURL=$AUTO_JDKURL && \
AUTO_JDKSHA256=$(echo ${AUTO_JDKURLINFO} | sed -e 's/.*"SHA256":"\(.*\)".*/\1/g' ) && \
echo AUTO_JDKSHA256=$AUTO_JDKSHA256 && \
AUTO_JDKFILE=$(echo ${AUTO_JDKURL} | sed 's,^[^ ]*/,,' ) && \
echo AUTO_JDKFILE=$AUTO_JDKFILE && \
echo ./oracle-download.sh --cookie=accept-securebackup-cookie --output=${AUTO_JDKFILE} --password=${ORACLE_PASSWORD} --username=${ORACLE_USERNAME} ${AUTO_JDKURL} && \
echo $(./oracle-download.sh --cookie=accept-securebackup-cookie --output=${AUTO_JDKFILE} --password=${ORACLE_PASSWORD} --username=${ORACLE_USERNAME} ${AUTO_JDKURL}) && \
echo "${AUTO_JDKSHA256} ${AUTO_JDKFILE}" >> CHECKSUM && \
cat CHECKSUM && \
sha256sum -c CHECKSUM && \
rpm -Uvh $AUTO_JDKFILE && \
rm -f $AUTO_JDKFILE CHECKSUM
RUN \
echo "CONFIG JDK" && \
export JAVA_HOME=${JAVA_HOME} && \
update-alternatives --install /usr/bin/java java ${JAVA_HOME%*/}/bin/java 1 && \
update-alternatives --install /usr/bin/javac javac ${JAVA_HOME%*/}/bin/javac 1 && \
update-alternatives --config java && \
rm -rf /opt/${FILE_NAME}
Loading