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

Remove ubi8 workflows, add job to build udi9 #192

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 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
2 changes: 1 addition & 1 deletion .devfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ attributes:
components:
- name: devtools
container:
image: quay.io/devfile/universal-developer-image:ubi8-latest
image: quay.io/devfile/universal-developer-image:ubi9-latest
memoryLimit: 2Gi
memoryRequest: 256Mi
116 changes: 0 additions & 116 deletions .github/workflows/empty-worksapce-smoke-test-on-minikube-ubi8.yaml

This file was deleted.

111 changes: 0 additions & 111 deletions .github/workflows/ubi8-build.yaml

This file was deleted.

64 changes: 64 additions & 0 deletions .github/workflows/ubi9-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@ on:
push:
branches: [ main ]

workflow_call:
# Map the workflow outputs to job outputs
secrets:
QUAY_USERNAME:
required: true
QUAY_PASSWORD:
required: true
outputs:
uniq_tag:
description: "The first output string"
value: ${{ jobs.build_universal_ubi8_image.outputs.output1 }}


jobs:
build_base_ubi9_image:
name: Build and publish base ubi9 image to Quay.io
Expand Down Expand Up @@ -47,3 +60,54 @@ jobs:
quay.io/devfile/base-developer-image:ubi9-latest
${{ steps.meta.outputs.tags }}

build_universal_ubi9_image:
name: Build and publish universal ubi9 image to Quay.io
runs-on: ubuntu-22.04
needs: build_base_ubi9_image
# job output for passing to mapping value (the workflow_call section)
outputs:
output1: ${{ steps.setTagName.outputs.uniq_tag }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Free runner space
run: |
sudo rm -rf /usr/local/lib/android
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
quay.io/devfile/universal-developer-image
flavor: |
latest=true
prefix=ubi8-,onlatest=true
svor marked this conversation as resolved.
Show resolved Hide resolved
tags: |
type=sha,prefix=ubi8-,format=short
svor marked this conversation as resolved.
Show resolved Hide resolved
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Quay.io
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
- name: Docker Build & Push Universal
uses: docker/build-push-action@v6
with:
push: ${{ github.event_name != 'pull_request' }}
provenance: false
context: universal/ubi9
tags: |
quay.io/devfile/universal-developer-image:latest
${{ steps.meta.outputs.tags }}
- name: Get tag with uniq prefix
id: setTagName
# set the image with uniq tag prefix (for example: quay.io/..../base-developer-image:ubi9-7ad6cab) to env. var
# and define it for output. This output with tag image will be used in caller job
run: |
UNIQ_TAG_IMAGE=$(echo $DOCKER_METADATA_OUTPUT_JSON | jq .tags[0])
echo "...................$UNIQ_TAG_IMAGE"
echo "uniq_tag=$UNIQ_TAG_IMAGE" >> $GITHUB_OUTPUT
12 changes: 6 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@ Contribute to Developer Images

## Developer Base Image

### Red Hat Universal Base Image ([UBI](https://developers.redhat.com/articles/ubi-faq#)) based image ([quay.io/devfile/base-developer-image:ubi8-latest](https://quay.io/repository/devfile/base-developer-image/))
### Red Hat Universal Base Image ([UBI](https://developers.redhat.com/articles/ubi-faq#)) based image ([quay.io/devfile/base-developer-image:ubi9-latest](https://quay.io/repository/devfile/base-developer-image/))

Build with Docker buildkit:

```bash
$ cd base/ubi8
$ DOCKER_BUILDKIT=1 docker image build --progress=plain -t quay.io/devfile/base-developer-image:ubi8-latest .
$ cd base/ubi9
$ DOCKER_BUILDKIT=1 docker image build --progress=plain -t quay.io/devfile/base-developer-image:ubi9-latest .
```

## Developer Universal Image

### Red Hat Universal Base Image ([UBI](https://developers.redhat.com/articles/ubi-faq#)) based image ([quay.io/devfile/universal-developer-image:ubi8-latest](https://quay.io/repository/devfile/universal-developer-image/))
### Red Hat Universal Base Image ([UBI](https://developers.redhat.com/articles/ubi-faq#)) based image ([quay.io/devfile/universal-developer-image:ubi9-latest](https://quay.io/repository/devfile/universal-developer-image/))

Build with Docker buildkit:

```bash
$ cd universal/ubi8
$ DOCKER_BUILDKIT=1 docker image build --progress=plain -t quay.io/devfile/universal-developer-image:ubi8-latest .
$ cd universal/ubi9
$ DOCKER_BUILDKIT=1 docker image build --progress=plain -t quay.io/devfile/universal-developer-image:ubi9-latest .
```
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# Developer Images

[![Build of UBI 8 based Developer Images](https://github.com/devfile/developer-images/actions/workflows/ubi8-build.yaml/badge.svg)](https://github.com/devfile/developer-images/actions/workflows/ubi8-build.yaml)
[![Build of UBI 9 based Developer Images](https://github.com/devfile/developer-images/actions/workflows/ubi9-build.yaml/badge.svg)](https://github.com/devfile/developer-images/actions/workflows/ubi9-build.yaml)

Containers images with tools for developers 👨‍💻👩‍💻

## Developer Base Image

### Red Hat Universal Base Image ([UBI](https://developers.redhat.com/articles/ubi-faq#)) based image ([quay.io/devfile/base-developer-image:ubi8-latest](https://quay.io/repository/devfile/base-developer-image))
### Red Hat Universal Base Image ([UBI](https://developers.redhat.com/articles/ubi-faq#)) based image ([quay.io/devfile/base-developer-image:ubi9-latest](https://quay.io/repository/devfile/base-developer-image))

Run the following command to test it with Docker:

```bash
$ docker run -ti --rm \
quay.io/devfile/base-developer-image:ubi8-latest \
quay.io/devfile/base-developer-image:ubi9-latest \
bash
```
### Included Development Tools
Expand Down Expand Up @@ -81,17 +81,17 @@ podman stop
podman start
```

An example is available in the Universal Developer Image dockerfile [here](https://github.com/devfile/developer-images/blob/main/universal/ubi8/entrypoint.sh#L3).
An example is available in the Universal Developer Image dockerfile [here](https://github.com/devfile/developer-images/blob/main/universal/ubi9/entrypoint.sh#L3).

## Developer Universal Image

### Red Hat Universal Base Image ([UBI](https://developers.redhat.com/articles/ubi-faq#)) based image ([quay.io/devfile/universal-developer-image:ubi8-latest](https://quay.io/repository/devfile/universal-developer-image))
### Red Hat Universal Base Image ([UBI](https://developers.redhat.com/articles/ubi-faq#)) based image ([quay.io/devfile/universal-developer-image:ubi9-latest](https://quay.io/repository/devfile/universal-developer-image))

Run the following command to test it with Docker:

```bash
docker run -ti --rm \
quay.io/devfile/universal-developer-image:ubi8-latest \
quay.io/devfile/universal-developer-image:ubi9-latest \
bash
```
### Included Development Tools
Expand Down Expand Up @@ -171,7 +171,7 @@ JAVA_HOME_8, JAVA_HOME_11, JAVA_HOME_17, JAVA_HOME_21
# Builds

This repo contains [actions](https://github.com/eclipse-che/che-operator/actions), including:
* [![release latest stable](https://github.com/devfile/developer-images/actions/workflows/ubi8-build.yaml/badge.svg)](https://github.com/devfile/developer-images/actions/workflows/ubi8-build.yaml)
* [![release latest stable](https://github.com/devfile/developer-images/actions/workflows/ubi9-build.yaml/badge.svg)](https://github.com/devfile/developer-images/actions/workflows/ubi9-build.yaml)

Downstream builds can be found at the link below, which is _internal to Red Hat_. Stable builds can be found by replacing the 3.x with a specific version like 3.2.

Expand Down
Loading