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

Migrate workflow "systemtest-base-el8" to Github Actions - MERGEOK #4170

Closed
wants to merge 2 commits into from
Closed
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
60 changes: 60 additions & 0 deletions .github/workflows/build-container-images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Build Container Images

on:
push:
branches:
- master
paths:
- ".github/workflows/build-container-images.yml"
- "docker/**"

pull_request:
branches:
- master
paths:
- ".github/workflows/build-container-images.yml"
- "docker/**"

schedule:
- cron: "0 4 * * 1"

jobs:
systemtest-base-el8:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
if: ${{ github.event_name != 'pull_request' }}
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: docker.io/vespaengine/vespa-systemtest-base-el8:latest
tags: |
type=ref,event=branch
# set "latest" tag for default branch
type=raw,value=latest,enable={{is_default_branch}}

- name: Build and push
uses: docker/build-push-action@v6
with:
context: docker/
file: docker/Dockerfile.base
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
cache-to: type=gha,mode=max
7 changes: 3 additions & 4 deletions docker/Dockerfile.almalinux8
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright Vespa.ai. All rights reserved.

ARG BASE_IMAGE=docker.io/almalinux:8
ARG BASE_IMAGE=almalinux:8
ARG VESPA_BASE_IMAGE=vespa

# Vespa install
Expand All @@ -22,7 +22,7 @@ RUN dnf install -y gcc-c++ python3-devel && \

FROM $VESPA_BASE_IMAGE AS systemtest

ENV LANG en_US.UTF-8
ENV LANG=en_US.UTF-8

USER root

Expand Down Expand Up @@ -60,7 +60,7 @@ RUN dnf install -y dnf-plugins-core && \
(source /opt/rh/gcc-toolset/enable && gem install ffi libxml-ruby) && \
pip3 install --no-cache-dir --upgrade pip && \
pip3 install --no-cache-dir awscli && \
(source /opt/rh/gcc-toolset/enable && pip3 install --no-cache-dir xgboost scikit-learn) && \
(source /opt/rh/gcc-toolset/enable && pip3 install --no-cache-dir numpy xgboost scikit-learn) && \
echo ": \${JAVA_HOME:=$(dirname $(dirname $(readlink -f /usr/bin/java)))}" > /etc/mavenrc

RUN --mount=type=bind,target=/context-root,source=.,ro \
Expand Down Expand Up @@ -111,4 +111,3 @@ RUN --mount=type=bind,target=/context-root,source=./,ro \
rm -f $VESPA_HOME/.m2/settings.xml

ENTRYPOINT ["bash", "-lc", "source /opt/rh/gcc-toolset/enable && /opt/vespa-systemtests/lib/node_server.rb $NODE_SERVER_OPTS"]

32 changes: 0 additions & 32 deletions screwdriver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,35 +27,3 @@ jobs:
cd ${RUBYLIB}
ruby test/testrunner.rb
exit $?

systemtest-base-el8:
requires: [~pr, ~commit]
sourcePaths: ["docker/"]
annotations:
screwdriver.cd/cpu: HIGH
screwdriver.cd/ram: HIGH
screwdriver.cd/timeout: 30
screwdriver.cd/buildPeriodically: H 4 * * 1
screwdriver.cd/dockerEnabled: true
screwdriver.cd/dockerCpu: TURBO
screwdriver.cd/dockerRam: TURBO
secrets:
- DOCKER_HUB_DEPLOY_KEY
steps:
- install-docker-cli: |
dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
dnf -y install docker-ce docker-ce-cli containerd.io
docker system info
- build: |
cd docker
docker build --file Dockerfile.base \
--build-arg BASE_IMAGE=docker.io/almalinux:8 \
--tag docker.io/vespaengine/vespa-systemtest-base-el8:latest .
- publish: |
if [[ -z "$SD_PULL_REQUEST" ]]; then
OPT_STATE="$(set +o)"
set +x
docker login --username aressem --password "$DOCKER_HUB_DEPLOY_KEY"
eval "$OPT_STATE"
docker push docker.io/vespaengine/vespa-systemtest-base-el8:latest
fi
Loading