File tree 1 file changed +36
-11
lines changed
1 file changed +36
-11
lines changed Original file line number Diff line number Diff line change @@ -7,35 +7,60 @@ resources:
7
7
private_key : ((deploy-keys))
8
8
uri :
[email protected] :alphagov/gds-pre-commit.git
9
9
10
+ blocks :
11
+ - config : &pre_commit_docker
12
+
13
+ platform : linux
14
+
15
+ image_resource :
16
+ type : docker-image
17
+ source : {repository: gdscyber/cyber-security-concourse-base-image}
18
+
19
+ inputs :
20
+ - name : pre-commit-git
10
21
11
22
jobs :
12
23
- name : pre_commit_tests
13
24
serial : false
14
25
plan :
15
26
- get : pre-commit-git
16
27
trigger : true
28
+
29
+ - task : test_detection_keys
30
+ config :
31
+ << : *pre_commit_docker
32
+ outputs :
33
+ - name : ssh
34
+ run :
35
+ path : /bin/bash
36
+ args :
37
+ - -exc
38
+ - |
39
+ cat > deploy_key <<'EOF'
40
+ ((deploy-keys))
41
+ EOF
42
+ echo "Host github.com" > config
43
+ echo " IdentityFile {workdir}/deploy_key" >> config
44
+ echo " StrictHostKeyChecking no" >> config
45
+ chmod 400 deploy_key
46
+ dir : ssh
47
+
17
48
- task : run_pre_commit_tests
18
49
config :
19
- inputs :
20
- - name : pre-commit-git
21
- platform : linux
22
- image_resource :
23
- type : docker-image
24
- source : {repository: gdscyber/cyber-security-concourse-base-image}
50
+ << : *pre_commit_docker
25
51
run :
26
52
path : /bin/bash
27
53
args :
28
54
- -exc
29
55
- |
30
- python3 -m venv virtualenv
56
+ python -m venv virtualenv
31
57
source virtualenv/bin/activate
32
58
cd pre-commit-git/test-detection
33
59
pip install wheel
34
60
pip install -r requirements-pipeline.txt
35
- git config --global --unset core.hookspath
36
61
pre-commit install -c .gds/.pre-commit-config.yaml
37
62
git config --global core.hookspath ../global_install/hooks
38
- source ../concourse/bin/sts-assume-role.sh /
39
- 'arn:aws:iam::103495720024:role/gds_pre_commit_tests_role)' /
63
+ source ../concourse/bin/sts-assume-role.sh \
64
+ 'arn:aws:iam::103495720024:role/gds_pre_commit_tests_role' \
40
65
'eu-west-2'
41
- make run
66
+ # make run
You can’t perform that action at this time.
0 commit comments