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

Create new testing image #288

Merged
merged 1 commit into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
34 changes: 34 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,40 @@ jobs:
run: |
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
build-galasactl-ibm-testing-image-and-trigger-tekton-pipeline:
name: Build image containing galasactl, OpenJDK and Gradle for testing
runs-on: ubuntu-latest
needs: build-cli

steps:
- name: Checkout CLI
uses: actions/checkout@v4

- name: Login to Github Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata for galasactl-ibm-testing image
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ env.NAMESPACE }}/galasactl-ibm-x86_64-testing

- name: Build galasactl-ibm-testing image
id: build
uses: docker/build-push-action@v5
with:
context: .
file: dockerfiles/dockerfile.galasactl-ibm-testing
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
branch=${{ env.BRANCH }}
- name: Attempt to trigger test-cli-ecosystem-commands Tekton pipeline
run: |
echo "The Tekton pipeline test-cli-ecosystem-commands should be triggered in the next 2-minutes - check the Tekton dashboard"
29 changes: 2 additions & 27 deletions dockerfiles/dockerfile.galasactl
Original file line number Diff line number Diff line change
@@ -1,32 +1,7 @@
FROM harbor.galasa.dev/docker_proxy_cache/library/ubuntu:20.04

# Install Java and Gradle as they are pre-reqs for galasactl
ENV GRADLE_VERSION=8.9
ENV GRADLE_HOME=/opt/gradle

RUN apt-get update && \
apt-get install -y \
ca-certificates \
openjdk-17-jdk \
wget \
unzip \
tar && \
# Install Gradle
wget https://services.gradle.org/distributions/gradle-${GRADLE_VERSION}-bin.zip -O /tmp/gradle.zip && \
mkdir -p ${GRADLE_HOME} && \
unzip /tmp/gradle.zip -d ${GRADLE_HOME} && \
rm /tmp/gradle.zip && \
ln -s ${GRADLE_HOME}/gradle-${GRADLE_VERSION} ${GRADLE_HOME}/latest && \
ln -s ${GRADLE_HOME}/latest/bin/gradle /usr/local/bin/gradle && \
# Clean up
apt-get clean && \
rm -rf /var/lib/apt/lists/*

ENV JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64
ENV PATH="$JAVA_HOME/bin:$PATH"

RUN java -version && \
gradle --version
RUN apt-get update \
&& apt-get install -y ca-certificates

ARG platform

Expand Down
10 changes: 10 additions & 0 deletions dockerfiles/dockerfile.galasactl-ibm-testing
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM ghcr.io/galasa-dev/openjdk17-ibm-gradle:main

ARG branch

RUN wget https://development.galasa.dev/${branch}/binary/cli/galasactl-linux-x86_64 -O /usr/local/bin/galasactl && \
chmod +x /usr/local/bin/galasactl

RUN galasactl --version

ENV PATH="/usr/local/bin:$PATH"