-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathJenkinsfile
52 lines (50 loc) · 1.57 KB
/
Jenkinsfile
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
49
50
51
52
pipeline {
agent {
kubernetes {
defaultContainer 'earthly'
inheritFrom 'default'
yaml '''
spec:
containers:
- name: tailscale
image: tailscale/tailscale
securityContext:
privileged: true
env:
- name: TS_AUTHKEY
valueFrom:
secretKeyRef:
name: tailscale-auth-key
key: TS_AUTHKEY
- name: TS_ACCEPT_DNS
value: true
- name: TS_KUBE_SECRET
value:
- name: TS_USERSPACE
value: false
- name: earthly
image: earthly/earthly
env:
- name: NO_BUILDKIT
value: 1
- name: NO_COLOR
value: 1
command: ["sleep"]
args: ["1h"]
'''
}
}
environment {
GITHUB_USERNAME = "shepherdjerred"
GITHUB_TOKEN = credentials('GITHUB_TOKEN')
EARTHLY_TOKEN = credentials('EARTHLY_TOKEN')
}
stages {
stage('Build') {
steps {
sh 'echo $GITHUB_TOKEN | docker login ghcr.io -u GITHUB_USERNAME --password-stdin'
sh 'earthly --sat=lamport --org=sjerred --ci --push +ci';
}
}
}
}