Skip to content

Commit 9aeabfa

Browse files
authored
Remove ubi8 workflows, add job to build udi9 (#192)
Signed-off-by: David Kwon <[email protected]>
1 parent 170d300 commit 9aeabfa

6 files changed

+79
-242
lines changed

.devfile.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ attributes:
77
components:
88
- name: devtools
99
container:
10-
image: quay.io/devfile/universal-developer-image:ubi8-latest
10+
image: quay.io/devfile/universal-developer-image:ubi9-latest
1111
memoryLimit: 2Gi
1212
memoryRequest: 256Mi

.github/workflows/empty-worksapce-smoke-test-on-minikube-ubi8.yaml

-116
This file was deleted.

.github/workflows/ubi8-build.yaml

-111
This file was deleted.

.github/workflows/ubi9-build.yaml

+65-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,19 @@ on:
55
push:
66
branches: [ main ]
77

8+
workflow_call:
9+
# Map the workflow outputs to job outputs
10+
secrets:
11+
QUAY_USERNAME:
12+
required: true
13+
QUAY_PASSWORD:
14+
required: true
15+
outputs:
16+
uniq_tag:
17+
description: "The first output string"
18+
value: ${{ jobs.build_universal_ubi9_image.outputs.output1 }}
19+
20+
821
jobs:
922
build_base_ubi9_image:
1023
name: Build and publish base ubi9 image to Quay.io
@@ -44,6 +57,57 @@ jobs:
4457
context: base/ubi9
4558
platforms: linux/amd64, linux/arm64
4659
tags: |
47-
quay.io/devfile/base-developer-image:ubi9-latest
60+
quay.io/devfile/base-developer-image:latest
4861
${{ steps.meta.outputs.tags }}
4962
63+
build_universal_ubi9_image:
64+
name: Build and publish universal ubi9 image to Quay.io
65+
runs-on: ubuntu-22.04
66+
needs: build_base_ubi9_image
67+
# job output for passing to mapping value (the workflow_call section)
68+
outputs:
69+
output1: ${{ steps.setTagName.outputs.uniq_tag }}
70+
steps:
71+
- name: Checkout
72+
uses: actions/checkout@v4
73+
- name: Free runner space
74+
run: |
75+
sudo rm -rf /usr/local/lib/android
76+
- name: Docker meta
77+
id: meta
78+
uses: docker/metadata-action@v5
79+
with:
80+
images: |
81+
quay.io/devfile/universal-developer-image
82+
flavor: |
83+
latest=true
84+
prefix=ubi9-,onlatest=true
85+
tags: |
86+
type=sha,prefix=ubi9-,format=short
87+
- name: Set up QEMU
88+
uses: docker/setup-qemu-action@v3
89+
- name: Set up Docker Buildx
90+
uses: docker/setup-buildx-action@v2
91+
- name: Login to Quay.io
92+
uses: docker/login-action@v3
93+
with:
94+
registry: quay.io
95+
username: ${{ secrets.QUAY_USERNAME }}
96+
password: ${{ secrets.QUAY_PASSWORD }}
97+
- name: Docker Build & Push Universal
98+
uses: docker/build-push-action@v6
99+
with:
100+
push: ${{ github.event_name != 'pull_request' }}
101+
provenance: false
102+
context: universal/ubi9
103+
tags: |
104+
quay.io/devfile/universal-developer-image:latest
105+
${{ steps.meta.outputs.tags }}
106+
- name: Get tag with uniq prefix
107+
id: setTagName
108+
# set the image with uniq tag prefix (for example: quay.io/..../base-developer-image:ubi9-7ad6cab) to env. var
109+
# and define it for output. This output with tag image will be used in caller job
110+
run: |
111+
UNIQ_TAG_IMAGE=$(echo $DOCKER_METADATA_OUTPUT_JSON | jq .tags[0])
112+
echo "...................$UNIQ_TAG_IMAGE"
113+
echo "uniq_tag=$UNIQ_TAG_IMAGE" >> $GITHUB_OUTPUT

CONTRIBUTING.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,22 @@ Contribute to Developer Images
33

44
## Developer Base Image
55

6-
### 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/))
6+
### 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/))
77

88
Build with Docker buildkit:
99

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

1515
## Developer Universal Image
1616

17-
### 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/))
17+
### 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/))
1818

1919
Build with Docker buildkit:
2020

2121
```bash
22-
$ cd universal/ubi8
23-
$ DOCKER_BUILDKIT=1 docker image build --progress=plain -t quay.io/devfile/universal-developer-image:ubi8-latest .
22+
$ cd universal/ubi9
23+
$ DOCKER_BUILDKIT=1 docker image build --progress=plain -t quay.io/devfile/universal-developer-image:ubi9-latest .
2424
```

README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
# Developer Images
22

3-
[![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)
3+
[![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)
44

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

77
## Developer Base Image
88

9-
### 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))
9+
### 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))
1010

1111
Run the following command to test it with Docker:
1212

1313
```bash
1414
$ docker run -ti --rm \
15-
quay.io/devfile/base-developer-image:ubi8-latest \
15+
quay.io/devfile/base-developer-image:ubi9-latest \
1616
bash
1717
```
1818
### Included Development Tools
@@ -81,17 +81,17 @@ podman stop
8181
podman start
8282
```
8383

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

8686
## Developer Universal Image
8787

88-
### 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))
88+
### 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))
8989

9090
Run the following command to test it with Docker:
9191

9292
```bash
9393
docker run -ti --rm \
94-
quay.io/devfile/universal-developer-image:ubi8-latest \
94+
quay.io/devfile/universal-developer-image:ubi9-latest \
9595
bash
9696
```
9797
### Included Development Tools
@@ -171,7 +171,7 @@ JAVA_HOME_8, JAVA_HOME_11, JAVA_HOME_17, JAVA_HOME_21
171171
# Builds
172172

173173
This repo contains [actions](https://github.com/eclipse-che/che-operator/actions), including:
174-
* [![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)
174+
* [![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)
175175

176176
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.
177177

0 commit comments

Comments
 (0)