Skip to content

Commit

Permalink
Build and publish the Apache HTTPD E2E image
Browse files Browse the repository at this point in the history
Signed-off-by: Israel Blancas <[email protected]>
  • Loading branch information
iblancasa committed Sep 5, 2023
1 parent 8d3000e commit e62ea05
Show file tree
Hide file tree
Showing 4 changed files with 628 additions and 0 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/publish-autoinstrumentation-e2e-images.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: "Publish instrumentation E2E images"

on:
push:
paths:
- 'tests/instrumentation-e2e-apps/**'
- '.github/workflows/publish-autoinstrumentation-e2e-images.yaml'
branches:
- main
pull_request:
paths:
- 'tests/instrumentation-e2e-apps/**'
- '.github/workflows/publish-autoinstrumentation-e2e-images.yaml'
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
apachehttpd:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v3

- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/open-telemetry/opentelemetry-operator/apachehttpd-test:e2e
tags: |
type=match,pattern=v(.*),group=1,value=v${{ env.VERSION }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

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

- name: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Login to GitHub Package Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v4
with:
context: tests/instrumentation-e2e-apps/apache-httpd
platforms: linux/amd64
push: ${{ github.event_name == 'push' }}
build-args: version=${{ env.VERSION }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
4 changes: 4 additions & 0 deletions tests/instrumentation-e2e-apps/apache-httpd/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

FROM httpd:2.4-alpine
COPY ./apache2/ /usr/local/apache2/
RUN chmod 777 -R /usr/local/apache2/
Loading

0 comments on commit e62ea05

Please sign in to comment.