Skip to content

Commit ef04219

Browse files
committed
fix: revert to old /hack/dev/kiind.install
Updated several environment variables in the `.github/workflows/e2e.yaml` file to reflect changes in how local development and testing environments are configured. This included adjusting domain URLs, Docker repository, KUBECONFIG path, and paths for running helper scripts. The changes aimed to ensure that the end-to-end tests correctly point to the intended services and configurations within the CI environment.
1 parent 9649816 commit ef04219

File tree

1 file changed

+28
-67
lines changed

1 file changed

+28
-67
lines changed

.github/workflows/e2e.yaml

Lines changed: 28 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ jobs:
5353
]
5454

5555
env:
56-
CONTROLLER_DOMAIN_URL: paac.paac-127-0-0-1.nip.io
56+
CONTROLLER_DOMAIN_URL: controller.paac-127-0-0-1.nip.io
5757
KOCACHE: /tmp/ko-cache
58-
KO_DOCKER_REPO: registry.paac-127-0-0-1.nip.io
59-
KUBECONFIG: /home/runner/.kube/config.local
58+
KO_DOCKER_REPO: localhost:5000
59+
KUBECONFIG: /home/runner/.kube/config.kind
6060
TARGET_TEAM_SLUGS: "pipeline-as-code,pipeline-as-code-contributors"
6161
TEST_BITBUCKET_CLOUD_API_URL: https://api.bitbucket.org/2.0
6262
TEST_BITBUCKET_CLOUD_E2E_REPOSITORY: cboudjna/pac-e2e-tests
@@ -66,10 +66,9 @@ jobs:
6666
TEST_BITBUCKET_SERVER_TOKEN: ${{ secrets.BITBUCKET_SERVER_TOKEN }}
6767
TEST_BITBUCKET_SERVER_USER: pipelines
6868
TEST_BITBUCKET_SERVER_WEBHOOK_SECRET: ${{ secrets.BITBUCKET_SERVER_WEBHOOK_SECRET }}
69-
TEST_EL_URL: https://paac.paac-127-0-0-1.nip.io
69+
TEST_EL_URL: http://controller.paac-127-0-0-1.nip.io
7070
TEST_EL_WEBHOOK_SECRET: ${{ secrets.WEBHOOK_SECRET }}
7171
TEST_GITEA_API_URL: http://localhost:3000
72-
TEST_GITEA_INTERNAL_URL: http://forgejo-http.forgejo.svc.cluster.local:3000
7372
TEST_GITEA_PASSWORD: pac
7473
TEST_GITEA_REPO_OWNER: pac/pac
7574
TEST_GITEA_SMEEURL: ${{ secrets.TEST_GITEA_SMEEURL }}
@@ -80,7 +79,7 @@ jobs:
8079
TEST_GITHUB_REPO_OWNER_GITHUBAPP: openshift-pipelines/pipelines-as-code-e2e-tests
8180
TEST_GITHUB_REPO_OWNER_WEBHOOK: openshift-pipelines/pipelines-as-code-e2e-tests-webhook
8281
TEST_GITHUB_SECOND_API_URL: ghe.pipelinesascode.com
83-
TEST_GITHUB_SECOND_EL_URL: https://ghe.paac-127-0-0-1.nip.io
82+
TEST_GITHUB_SECOND_EL_URL: http://ghe.paac-127-0-0-1.nip.io
8483
TEST_GITHUB_SECOND_REPO_INSTALLATION_ID: 1
8584
TEST_GITHUB_SECOND_REPO_OWNER_GITHUBAPP: pipelines-as-code/e2e
8685
TEST_GITLAB_API_URL: https://gitlab.com
@@ -291,30 +290,19 @@ jobs:
291290
with:
292291
repo: chmouel/snazy
293292

294-
- name: Install minica
295-
run: |
296-
go install github.com/jsha/minica@latest
297-
echo "$HOME/go/bin" >> "$GITHUB_PATH"
298-
299-
- name: Clone startpaac
300-
uses: actions/checkout@v6
301-
with:
302-
repository: openshift-pipelines/startpaac
303-
path: startpaac
304-
305293
- name: Run gosmee for main controller
306294
run: |
307-
nohup gosmee client --saveDir /tmp/gosmee-replay ${{ secrets.PYSMEE_URL }} "https://${CONTROLLER_DOMAIN_URL}" > /tmp/gosmee-main.log 2>&1 &
295+
nohup gosmee client --saveDir /tmp/gosmee-replay ${{ secrets.PYSMEE_URL }} "http://${CONTROLLER_DOMAIN_URL}" > /tmp/gosmee-main.log 2>&1 &
308296
309297
- name: Run gosmee for main controller (Gitea)
310298
if: startsWith(matrix.provider, 'gitea') || matrix.provider == 'concurrency'
311299
run: |
312-
nohup gosmee client --saveDir /tmp/gosmee-replay ${{ secrets.TEST_GITEA_SMEEURL }} "https://${CONTROLLER_DOMAIN_URL}" >> /tmp/gosmee-main.log 2>&1 &
300+
nohup gosmee client --saveDir /tmp/gosmee-replay ${{ secrets.TEST_GITEA_SMEEURL }} "http://${CONTROLLER_DOMAIN_URL}" >> /tmp/gosmee-main.log 2>&1 &
313301
314302
- name: Run gosmee for second controller (GHE)
315303
if: matrix.provider == 'github_second_controller' || matrix.provider == 'concurrency'
316304
run: |
317-
nohup gosmee client --saveDir /tmp/gosmee-replay-ghe ${{ secrets.TEST_GITHUB_SECOND_SMEE_URL }} "https://ghe.paac-127-0-0-1.nip.io" > /tmp/gosmee-ghe.log 2>&1 &
305+
nohup gosmee client --saveDir /tmp/gosmee-replay-ghe ${{ secrets.TEST_GITHUB_SECOND_SMEE_URL }} "http://ghe.paac-127-0-0-1.nip.io" > /tmp/gosmee-ghe.log 2>&1 &
318306
319307
- name: Setup tmate session
320308
uses: mxschmitt/action-tmate@v3
@@ -323,32 +311,28 @@ jobs:
323311
detached: true
324312
limit-access-to-actor: true
325313

326-
- name: Start installing cluster with startpaac
314+
- name: Start installing cluster
315+
run: |
316+
export PAC_DIR=${PWD}
317+
export TEST_GITEA_SMEEURL="${{ secrets.TEST_GITEA_SMEEURL }}"
318+
bash -x ./hack/dev/kind/install.sh
319+
320+
- name: Create PAC github-app-secret
327321
env:
328-
PAC_DIR: ${{ github.workspace }}
329-
PAAC_DOMAIN: paac-127-0-0-1.nip.io
330-
TEST_GITEA_SMEEURL: ${{ secrets.TEST_GITEA_SMEEURL }}
322+
PAC_GITHUB_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }}
323+
PAC_GITHUB_APPLICATION_ID: ${{ vars.APPLICATION_ID }}
324+
PAC_WEBHOOK_SECRET: ${{ secrets.WEBHOOK_SECRET }}
331325
run: |
332-
# Create real secrets for startpaac (not dummy)
333-
mkdir -p ~/secrets
334-
echo "${{ vars.APPLICATION_ID }}" > ~/secrets/github-application-id
335-
echo "${{ secrets.APP_PRIVATE_KEY }}" > ~/secrets/github-private-key
336-
echo "${{ secrets.WEBHOOK_SECRET }}" > ~/secrets/webhook.secret
337-
echo "${{ secrets.PYSMEE_URL }}" > ~/secrets/smee
338-
339-
# Create second controller secrets
340-
mkdir -p ~/secrets-second
341-
echo "${{ vars.TEST_GITHUB_SECOND_APPLICATION_ID }}" > ~/secrets-second/github-application-id
342-
echo "${{ secrets.TEST_GITHUB_SECOND_PRIVATE_KEY }}" > ~/secrets-second/github-private-key
343-
echo "${{ secrets.TEST_GITHUB_SECOND_WEBHOOK_SECRET }}" > ~/secrets-second/webhook.secret
344-
echo "${{ secrets.TEST_GITHUB_SECOND_SMEE_URL }}" > ~/secrets-second/smee
345-
346-
export PAC_SECRET_FOLDER=~/secrets
347-
export PAC_SECOND_SECRET_FOLDER=~/secrets-second
348-
export TARGET_HOST=local
349-
350-
cd startpaac
351-
./startpaac --ci -a
326+
./hack/gh-workflow-ci.sh create_pac_github_app_secret
327+
328+
- name: Create second Github APP Controller on GHE
329+
env:
330+
TEST_GITHUB_SECOND_SMEE_URL: ${{ secrets.TEST_GITHUB_SECOND_SMEE_URL }}
331+
TEST_GITHUB_SECOND_PRIVATE_KEY: ${{ secrets.TEST_GITHUB_SECOND_PRIVATE_KEY }}
332+
TEST_GITHUB_SECOND_WEBHOOK_SECRET: ${{ secrets.TEST_GITHUB_SECOND_WEBHOOK_SECRET }}
333+
TEST_GITHUB_SECOND_APPLICATION_ID: ${{ vars.TEST_GITHUB_SECOND_APPLICATION_ID }}
334+
run: |
335+
./hack/gh-workflow-ci.sh create_second_github_app_controller_on_ghe
352336
353337
- name: Enable debug logging for e2e
354338
run: |
@@ -360,29 +344,6 @@ jobs:
360344
kubectl -n pipelines-as-code rollout status deployment/pipelines-as-code-$name --timeout=120s
361345
done
362346
363-
- name: Install minica CA certificate to system trust store
364-
run: |
365-
set -x
366-
echo "=== Installing minica CA certificate to system trust store ==="
367-
if [ -f /tmp/certs/minica.pem ]; then
368-
sudo mkdir -p /usr/local/share/ca-certificates/
369-
sudo cp /tmp/certs/minica.pem /usr/local/share/ca-certificates/minica.crt
370-
sudo update-ca-certificates
371-
echo "✓ CA certificate installed to system trust store"
372-
373-
# Verify installation
374-
ls -la /usr/local/share/ca-certificates/minica.crt
375-
echo "System will now trust HTTPS connections to *.127-0-0-1.nip.io domains"
376-
else
377-
echo "✗ ERROR: /tmp/certs/minica.pem not found"
378-
echo "startpaac should have created this file"
379-
exit 1
380-
fi
381-
382-
- name: Configure git to skip TLS verification
383-
run: |
384-
git config --global http.sslVerify false
385-
386347
# Adjusted step-level conditions based on the new job-level logic
387348
- name: Run E2E Tests
388349
# This step runs for schedule, PR target (if job started), or workflow_dispatch (if job started)

0 commit comments

Comments
 (0)