Skip to content

Commit d623a08

Browse files
Jason PetersonGitHub Enterprise
authored andcommitted
fix(ci): travis dependencies (#64)
1 parent ffc3dc1 commit d623a08

File tree

3 files changed

+37
-38
lines changed

3 files changed

+37
-38
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ script:
3232
- npm run test-unit-travis || travis_terminate 1
3333
- npm run lint
3434
- npm run check-packages
35+
- ./scripts/get-dependencies.sh # get api repo for access to latest domain mapping cert
3536
- npm run test-integration-travis || travis_terminate 1
3637

3738
before_deploy:

scripts/get-dependencies.sh

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/bin/bash
2+
##################################################
3+
# Licensed Materials - Property of IBM
4+
# IBM Cloud Code Engine, 5900-AB0
5+
# © Copyright IBM Corp. 2020, 2023
6+
# US Government Users Restricted Rights - Use, duplication or
7+
# disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
8+
##################################################
9+
10+
set -e
11+
12+
function get_repo {
13+
if [ ! -d "$apiDirectory" ]; then
14+
printf "Cloning github.ibm.com/coligo/api...\n"
15+
git clone https://github.ibm.com/coligo/api.git "$apiDirectory"
16+
else
17+
printf "github.ibm.com/coligo/api already cloned, getting latest...\n"
18+
cd "$apiDirectory"
19+
if [[ $(git status --porcelain) ]]; then
20+
printf "Local working tree contains changes... stashing them\n"
21+
git stash
22+
fi
23+
git checkout main
24+
git pull
25+
cd "$rootDirectory"
26+
fi
27+
}
28+
29+
echo ""
30+
echo "----------------------------------"
31+
echo "Getting test dependencies ..."
32+
echo "----------------------------------"
33+
rootDirectory=$(pwd)
34+
apiDirectory=$rootDirectory/api
35+
get_repo
Lines changed: 1 addition & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,3 @@
1-
#!/bin/bash
2-
##################################################
3-
# Licensed Materials - Property of IBM
4-
# IBM Cloud Code Engine, 5900-AB0
5-
# © Copyright IBM Corp. 2020, 2023
6-
# US Government Users Restricted Rights - Use, duplication or
7-
# disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
8-
##################################################
9-
10-
set -e
11-
121
# Create two new self-signed certificates using openssl
132
# The certs are used to verify TLS secret creations and updates
143
echo "Creating dummy certificates to verify TLS secrets ..."
@@ -22,30 +11,4 @@ echo ""
2211
echo "Creating dummy SSH keys to verify SSH secrets ..."
2312
openssl ecparam -name prime256v1 -genkey -noout -out ./test/integration/sshkey.pem
2413
echo "Creating dummy certificates to verify SSH secrets [done]"
25-
echo ""
26-
27-
28-
function get_repo {
29-
if [ ! -d "$apiDirectory" ]; then
30-
printf "Cloning github.ibm.com/coligo/api...\n"
31-
git clone https://github.ibm.com/coligo/api.git "$apiDirectory"
32-
else
33-
printf "github.ibm.com/coligo/api already cloned, getting latest...\n"
34-
cd "$apiDirectory"
35-
if [[ $(git status --porcelain) ]]; then
36-
printf "Local working tree contains changes... stashing them\n"
37-
git stash
38-
fi
39-
git checkout main
40-
git pull
41-
cd "$rootDirectory"
42-
fi
43-
}
44-
45-
echo ""
46-
echo "----------------------------------"
47-
echo "Getting test dependencies ..."
48-
echo "----------------------------------"
49-
rootDirectory=$(pwd)
50-
apiDirectory=$rootDirectory/api
51-
get_repo
14+
echo ""

0 commit comments

Comments
 (0)