forked from openstack-k8s-operators/ci-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9a4a904
commit a80191d
Showing
3 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Build and Push Image | ||
on: [ push ] | ||
env: | ||
IMAGE_NAME: cifmw-client | ||
IMAGE_TAGS: ${{ github.sha }} latest | ||
IMAGE_REGISTRY: quay.rdoproject.org/ci-framework | ||
REGISTRY_USER: ${{ secrets.QUAY_USERNAME }} | ||
REGISTRY_PASSWORD: ${{ secrets.QUAY_PASSWORD }} | ||
|
||
jobs: | ||
build: | ||
name: Build and push image | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Build Image | ||
id: build-image | ||
uses: redhat-actions/buildah-build@v2 | ||
with: | ||
image: ${{ env.IMAGE_NAME }} | ||
tags: ${{ env.IMAGE_TAGS }} | ||
containerfiles: | | ||
containerfiles/Containerfile.client | ||
- name: Push To quay.rdoproject.org | ||
id: push-to-quay | ||
uses: redhat-actions/push-to-registry@v2 | ||
with: | ||
image: ${{ steps.build-image.outputs.image }} | ||
tags: ${{ steps.build-image.outputs.tags }} | ||
registry: ${{ env.IMAGE_REGISTRY }} | ||
username: ${{ env.REGISTRY_USER }} | ||
password: ${{ env.REGISTRY_PASSWORD }} | ||
|
||
- name: Print image url | ||
run: echo "Image pushed to ${{ steps.push-to-quay.outputs.registry-paths }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
FROM quay.io/centos/centos:stream9 | ||
LABEL summary="CI-Framework client image" maintainer="CI Framework" | ||
|
||
USER root | ||
RUN dnf update -y && dnf install -y git python3-pip python3-netaddr make gcc sudo rsync && dnf clean all | ||
|
||
RUN adduser cifmw | ||
RUN echo "cifmw ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/cifmw | ||
|
||
USER cifmw | ||
COPY . /home/cifmw/ci-framework | ||
WORKDIR /home/cifmw/ci-framework | ||
RUN /usr/bin/make -C /home/cifmw/ci-framework setup_molecule USE_VENV=yes | ||
|
||
CMD /usr/bin/make help |