-
Notifications
You must be signed in to change notification settings - Fork 19
48 lines (41 loc) · 1.35 KB
/
local-deployment.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: "Local Deployment"
on: [push, pull_request]
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Bootstrap lxd controller
uses: charmed-kubernetes/actions-operator@main
with:
provider: lxd
juju-channel: 3/stable
- name: Deploy a Jenkins master to Juju
shell: bash
run: |
set -euxo pipefail
juju add-model jenkins
juju deploy ch:jenkins --series=focal --config password=password --config plugins=jenkins-multijob-plugin
juju wait-for application jenkins --query 'status=="active"'
- name: Deploy juju-qa-jenkins to Jenkins
run: |
set -euxo pipefail
LOCAL_JENKINS_IP=$(juju status --format=json | jq -r '.applications.jenkins.units[]["public-address"]')
export LOCAL_JJB_CONF=$(mktemp)
cat >$LOCAL_JJB_CONF <<EOF
[job_builder]
ignore_cache=True
keep_descriptions=False
include_path=.:scripts:~/git/
recursive=False
exclude=.*:manual:./development
allow_duplicates=False
[jenkins]
user=admin
password=password
url=http://${LOCAL_JENKINS_IP}:8080
query_plugins_info=True
EOF
STATIC_ANALYSIS_JOB=test_static_analysis_shell PUSH_TARGET="jobs" make push-local