All Projects → redhat-actions → s2i-build

redhat-actions / s2i-build

Licence: MIT license
Github Action to build an OCI-compatible container image from source code.

Programming Languages

typescript
32286 projects
shell
77523 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to s2i-build

buildah-build
GitHub Action to use 'buildah' to build a container image.
Stars: ✭ 75 (+188.46%)
Mutual labels:  openshift, redhat, action
openshift-cheatsheet
Red Hat OpenShift cheatsheet
Stars: ✭ 58 (+123.08%)
Mutual labels:  openshift, redhat
OpenShift-Azure-Terraform
⛑ Deploy OpenShift Origin on Azure using Terraform and Ansible
Stars: ✭ 21 (-19.23%)
Mutual labels:  openshift, redhat
Microservices Observability
This project is a demonstration on how to instrument, monitor and trace applications using java frameworks and open-source tools like prometheus, grafana and jaeger.
Stars: ✭ 23 (-11.54%)
Mutual labels:  openshift, redhat
kubernetes-lab
Kubernetes - Basics to Advanced
Stars: ✭ 44 (+69.23%)
Mutual labels:  openshift, redhat
Openshiftv3 Workshop
OpenShift v3 Workshops by the OpenShift Tiger Team
Stars: ✭ 179 (+588.46%)
Mutual labels:  openshift, redhat
Azure Openshift
RedHat Openshift Origin cluster on Azure
Stars: ✭ 17 (-34.62%)
Mutual labels:  openshift, redhat
Centos7 S2i Nodejs
DEPRECATED OpenShift S2I builder images for Node.js ✨
Stars: ✭ 34 (+30.77%)
Mutual labels:  openshift, redhat
Casl Ansible
Ansible automation for Managing OpenShift Container Platform clusters
Stars: ✭ 123 (+373.08%)
Mutual labels:  openshift, redhat
Openshiftv3 Ops Workshop
Workshop Materials for Operations
Stars: ✭ 60 (+130.77%)
Mutual labels:  openshift, redhat
s2i-ruby-container
Ruby container images based on Red Hat Software Collections and intended for OpenShift and general usage, that provide a platform for building and running Ruby applications. Users can choose between Red Hat Enterprise Linux, Fedora, and CentOS based images.
Stars: ✭ 55 (+111.54%)
Mutual labels:  openshift, source-to-image
Helloworld Msa
Main repository with documentation and support files
Stars: ✭ 218 (+738.46%)
Mutual labels:  openshift, redhat
commons.openshift.org
Repository for OpenShift Commons Community Site
Stars: ✭ 31 (+19.23%)
Mutual labels:  openshift, redhat
dart-package-publisher
Action to Publish Dart / Flutter Package To https://pub.dev When you need to publish a package, just bump the version in pubspec.yaml
Stars: ✭ 45 (+73.08%)
Mutual labels:  action
ansible-redhat satellite6
Ansible playbooks for Red Hat Satellite 6.
Stars: ✭ 19 (-26.92%)
Mutual labels:  redhat
onix
A reactive configuration manager designed to support Infrastructure as a Code provisioning, and bi-directional configuration management providing a single source of truth across multi-cloud environments.
Stars: ✭ 89 (+242.31%)
Mutual labels:  openshift
openshift-update-graph
Visualize the OpenShift Update Graph
Stars: ✭ 20 (-23.08%)
Mutual labels:  openshift
OpenShift
Azure Red Hat OpenShift
Stars: ✭ 92 (+253.85%)
Mutual labels:  openshift
performance
Collection of documents related tunings for performance of Java low-latency trading systems: from hardware up to application level
Stars: ✭ 65 (+150%)
Mutual labels:  redhat
deploy
Deploy Development Builds of Open Cluster Management (OCM) on RedHat Openshift Container Platform
Stars: ✭ 133 (+411.54%)
Mutual labels:  openshift

s2i-build

CI checks Verify Build Link checker

tag badge license badge size badge

s2i-build is a Github Action to build OCI-compatible container images from source code.

Source-to-Image (S2I) is a toolkit and workflow for building reproducible container images from source code. S2I produces images by injecting source code into a base S2I container image and letting the container prepare that source code for execution. The base S2I container images contain the language runtime and build tools needed for building and running the source code.

This Action will install the latest version of S2I.

To install any specific version of s2i use openshift-tools-installer.

NOTE: s2i-build only works on Linux platforms, because it relies on the Docker daemon.
If you are using GitHub's Ubuntu runners, the Docker daemon will already be available. Otherwise, you can use docker-setup-buildx to set up and start the Docker daemon.

Also see buildah-build for more configurable method of building images, from scratch or from a Dockerfile.

Once an image has been built, push-to-registry can be used to push it to an image registry.

Action Inputs

Input Name Description Default
builder_image The path of the S2I builder image. A curated list of builder images can be found here. Required
env_vars List of environment variable key-value pairs to pass to the S2I builder context. (eg. key=value, mysecret=${{ secrets.MY_SECRET }}). None
image Name to give to the output image. Required
tags The tags of the image to build. For multiple tags, separate by a space. For example, latest ${{ github.sha }} latest
log_level Log level when running S2I. Can be 0 (least verbose) to 5 (most verbose). 1
path_context The location of the path to run S2I from. This should be the path where your source code is stored. .
include_git Include all files during the S2I build including the .git folder. Set to true to enable. false

Action Outputs

image: The name of the built image.
For example, spring-image.

tags: A list of the tags that were created, separated by spaces.
For example, latest v1.

Builder Images

Please refer to this curated list of well maintained builder images.

Many more images can be found under sclorg.

Examples

Below is an example end to end workflow to build and push a Java application image using s2i-build.

# This workflow builds a container image of a java
# application using the source to image build strategy,
# and pushes the image to quay.io.

steps:
  env:
    IMAGE_NAME: my-java-app
    TAGS: v1 ${{ github.sha }}

  - name: Checkout
    uses: actions/checkout@v2

  # Setup S2i and Build container image
  - name: Setup and Build
    id: build_image
    uses: redhat-actions/s2i-build@v2
    with:
      path_context: '.'
      # Builder image for a java project
      builder_image: 'registry.access.redhat.com/openjdk/openjdk-11-rhel7'
      image: ${{ env.IMAGE_NAME }}
      tags: ${{ env.TAGS }}

  # Push Image to Quay registry
  - name: Push To Quay Action
    uses: redhat-actions/push-to-registry@v2
    with:
      image: ${{ steps.build_image.outputs.image }}
      tags: ${{ steps.build_image.outputs.tags }}
      registry: quay.io/${{ secrets.QUAY_USERNAME }}
      username: ${{ secrets.QUAY_USERNAME }}
      password: ${{ secrets.QUAY_PASSWORD }}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].