Skip to content
This repository was archived by the owner on May 15, 2025. It is now read-only.

Commit 1ca684f

Browse files
authored
Merge pull request #288 from galasa-dev/new-testing-image
Create new testing image
2 parents 7c31fb3 + 7f2a674 commit 1ca684f

File tree

3 files changed

+46
-27
lines changed

3 files changed

+46
-27
lines changed

.github/workflows/build.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,40 @@ jobs:
184184
run: |
185185
docker run --env ARGOCD_AUTH_TOKEN=${{ env.ARGOCD_AUTH_TOKEN }} --rm -v ${{ github.workspace }}:/var/workspace ghcr.io/galasa-dev/argocdcli:main app wait ${{ env.BRANCH }}-cli --resource apps:Deployment:cli-${{ env.BRANCH }} --health --server argocd.galasa.dev
186186
187+
build-galasactl-ibm-testing-image-and-trigger-tekton-pipeline:
188+
name: Build image containing galasactl, OpenJDK and Gradle for testing
189+
runs-on: ubuntu-latest
190+
needs: build-cli
191+
192+
steps:
193+
- name: Checkout CLI
194+
uses: actions/checkout@v4
195+
196+
- name: Login to Github Container Registry
197+
uses: docker/login-action@v3
198+
with:
199+
registry: ${{ env.REGISTRY }}
200+
username: ${{ github.actor }}
201+
password: ${{ secrets.GITHUB_TOKEN }}
202+
203+
- name: Extract metadata for galasactl-ibm-testing image
204+
id: meta
205+
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
206+
with:
207+
images: ${{ env.REGISTRY }}/${{ env.NAMESPACE }}/galasactl-ibm-x86_64-testing
208+
209+
- name: Build galasactl-ibm-testing image
210+
id: build
211+
uses: docker/build-push-action@v5
212+
with:
213+
context: .
214+
file: dockerfiles/dockerfile.galasactl-ibm-testing
215+
push: true
216+
tags: ${{ steps.meta.outputs.tags }}
217+
labels: ${{ steps.meta.outputs.labels }}
218+
build-args: |
219+
branch=${{ env.BRANCH }}
220+
187221
- name: Attempt to trigger test-cli-ecosystem-commands Tekton pipeline
188222
run: |
189223
echo "The Tekton pipeline test-cli-ecosystem-commands should be triggered in the next 2-minutes - check the Tekton dashboard"

dockerfiles/dockerfile.galasactl

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,7 @@
11
FROM harbor.galasa.dev/docker_proxy_cache/library/ubuntu:20.04
22

3-
# Install Java and Gradle as they are pre-reqs for galasactl
4-
ENV GRADLE_VERSION=8.9
5-
ENV GRADLE_HOME=/opt/gradle
6-
7-
RUN apt-get update && \
8-
apt-get install -y \
9-
ca-certificates \
10-
openjdk-17-jdk \
11-
wget \
12-
unzip \
13-
tar && \
14-
# Install Gradle
15-
wget https://services.gradle.org/distributions/gradle-${GRADLE_VERSION}-bin.zip -O /tmp/gradle.zip && \
16-
mkdir -p ${GRADLE_HOME} && \
17-
unzip /tmp/gradle.zip -d ${GRADLE_HOME} && \
18-
rm /tmp/gradle.zip && \
19-
ln -s ${GRADLE_HOME}/gradle-${GRADLE_VERSION} ${GRADLE_HOME}/latest && \
20-
ln -s ${GRADLE_HOME}/latest/bin/gradle /usr/local/bin/gradle && \
21-
# Clean up
22-
apt-get clean && \
23-
rm -rf /var/lib/apt/lists/*
24-
25-
ENV JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64
26-
ENV PATH="$JAVA_HOME/bin:$PATH"
27-
28-
RUN java -version && \
29-
gradle --version
3+
RUN apt-get update \
4+
&& apt-get install -y ca-certificates
305

316
ARG platform
327

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
FROM ghcr.io/galasa-dev/openjdk17-ibm-gradle:main
2+
3+
ARG branch
4+
5+
RUN wget https://development.galasa.dev/${branch}/binary/cli/galasactl-linux-x86_64 -O /usr/local/bin/galasactl && \
6+
chmod +x /usr/local/bin/galasactl
7+
8+
RUN galasactl --version
9+
10+
ENV PATH="/usr/local/bin:$PATH"

0 commit comments

Comments
 (0)