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

testing mirror in runner #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
82 changes: 82 additions & 0 deletions .github/workflows/stitch-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: Run helm tests

env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: 'us-east-1'
LEIN_USERNAME: ${{ secrets.AWS_ACCESS_KEY_ID }}
LEIN_PASSPHRASE: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
HELM_GIT_PATH: "stitch-observability-service"
CONFLUENT_PUBLIC_HELM_URL: "https://confluentinc.github.io/cp-helm-charts/"
BITNAMI_PUBLIC_HELM_URL: "https://charts.bitnami.com/bitnami"
ARTIFACTORY_HELM_URL: "https://artifactory.datapwn.com/artifactory/tlnd-helm-dev"

on:
workflow_dispatch:
push:


jobs:
helm_test:
runs-on: [self-hosted]
steps:
- name: Log to Artifactory
uses: docker/login-action@v2
with:
registry: https://artifactory.datapwn.com
username: sgandon
password: ${{ secrets.ARTIFACTORY_API_KEY }}

- name: Helm tool installer
uses: Azure/[email protected]

- name: Install kubectl
uses: azure/setup-kubectl@v3

# - name: install k3s
# uses: rohan397/actions-k3s@fix/update-set-output

# - name: Install helm repos
# run: |
# helm repo add confluentinc ${{ env.CONFLUENT_PUBLIC_HELM_URL}}
# helm repo add bitnami ${{env.BITNAMI_PUBLIC_HELM_URL}}
# helm repo add talend ${{ env.ARTIFACTORY_HELM_URL}} --username github-actions-stitch --password ${{ secrets.ARTIFACTORY_API_KEY }}

# - name: Fetch helm chart
# run: |
# helm fetch --untar talend/stitch-observability-service

# - name: Echo chart definition
# run: |
# chart_def=$(helm show chart ${{ env.HELM_GIT_PATH}})
# echo "will install stitch-observability-service: \n
# $chart_def"

# - name: Create secret
# run: |
# kubectl create namespace github-action-stitch # not sure why we need this but creating the secret fails without it
# kubectl create secret docker-registry talend-registry \
# --docker-server=artifactory.datapwn.com \
# --docker-username=github-actions-stitch \
# --docker-password=${{ secrets.ARTIFACTORY_API_KEY }}

# - name: Create stack with candidate images
# run: |
# helm install stitch-observability-service ${{ env.HELM_GIT_PATH}} \
# -f ${{ env.HELM_GIT_PATH}}/values-ci.yaml \
# --wait --timeout 10m0s \
# --set additionalEnvVars.normal.STITCH_OBSERVABILITY_DB_USER=avize \
# --set additionalEnvVars.normal.STITCH_OBSERVABILITY_DB_PASSWORD=avize

# - name: Test image
# run: |
# helm test stitch-observability-service

# - name: Show test logs
# if: ${{ failure() }}
# run: |
# kubectl logs stitch-observability-service-partitions-test
# kubectl logs stitch-observability-service-lein-test
- name: test wait
run: sleep 2040
32 changes: 32 additions & 0 deletions .github/workflows/test-docker-mirror.Xyml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Run helm tests


on:
workflow_dispatch:
push:



jobs:
test-talend-mirror:
runs-on: [self-hosted]
steps:
- name: test mirror
run: docker pull alpine/helm:3.9.3
- name: Log into Artifactory
uses: docker/login-action@v2
with:
registry: https://artifactory.datapwn.com
username: sgandon
password: ${{ secrets.ARTIFACTORY_API_KEY }}
- name: test mirror2
run: docker pull alpine/helm:3.9.4
- name: test wait
run: sleep 60







62 changes: 62 additions & 0 deletions runnner.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
apiVersion: actions.summerwind.dev/v1alpha1
kind: RunnerDeployment
metadata:
name: example-runnerdeploy
spec:
replicas: 1
template:
spec:
repository: sgandon/self-hosted-runner-test
image: artifactory.datapwn.com/docker-io-remote/summerwind/actions-runner-dind:v2.299.1-ubuntu-20.04-aa6dab5
imagePullSecrets:
- name: talend-registry
dockerEnabled: false
dockerRegistryMirror: https://docker-io-remote.cd.datapwn.com
dockerdWithinRunnerContainer: true
securityContext:
fsGroup: 1000
hostAliases:
- ip: "127.0.0.1"
hostnames:
- "index.docker.io"
- "registry-1.docker.io"
- "docker.io"
volumeMounts:
- name: cache-runner
mountPath: /runner/_work
- name: cache-docker
mountPath: /home/runner/.docker
- name: cache-tools
mountPath: /opt/hostedtoolcache
- name: docker-conf-rw
mountPath: /home/runner/.docker/


initContainers:
- name: copy-docker-config
image: artifactory.datapwn.com/docker-io-remote/busybox:1.34.1
command:
- "sh"
- "-c"
- >
set -x;
cp /docker-conf-ro/config.json /docker-conf-rw/config.json;

volumeMounts:
- name: docker-conf-rw
mountPath: /docker-conf-rw
- name: github-actions-runner-registry
mountPath: /docker-conf-ro/config.json
subPath: .dockerconfigjson
volumes:
- name: cache-runner
emptyDir: {}
- name: cache-docker
emptyDir: {}
- name: cache-tools
emptyDir: {}
- name: docker-conf-rw
emptyDir: {}
- name: github-actions-runner-registry
secret:
secretName: mirror-registry