Skip to content

Commit 26f7fe0

Browse files
author
Mike Davis
authored
ci(refact): Streamline CI stages (#234)
Remove awesome-bot Remove mdspell Remove RPM and DEB builds Remove CA Cert pinning in alpine build Force etcd indirect dependency to the latest patch version
1 parent d28da69 commit 26f7fe0

10 files changed

+11
-110
lines changed

.travis.yml

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ branches:
1515
- /^v\d+\.\d+(\.\d+)?(-\S*)?$/
1616

1717
stages:
18-
- 'Lint markdown files'
1918
- 'Tests'
2019
- 'Trigger FSC Tests'
2120
- 'Test Build using latest tag (no upload)'
@@ -27,28 +26,6 @@ jobs:
2726

2827
include:
2928

30-
- stage: 'Lint markdown files'
31-
name: awesome_bot
32-
os: linux
33-
language: generic
34-
install: gem install awesome_bot
35-
before_script: skip
36-
script:
37-
- find . -type f -name '*.md' -exec awesome_bot {} \;
38-
39-
- stage: 'Lint markdown files'
40-
name: markdown-spellcheck
41-
os: linux
42-
language: generic
43-
before_install: skip
44-
install:
45-
- npm i -g markdown-spellcheck
46-
before_script:
47-
- wget --quiet https://raw.githubusercontent.com/optimizely/mdspell-config/master/.spelling
48-
script:
49-
- mdspell -a -n -r --en-us '**/*.md'
50-
after_success: skip
51-
5229
- stage: Tests
5330
name: hadolint
5431
os: linux
@@ -71,10 +48,10 @@ jobs:
7148
name: sourceclear
7249
os: linux
7350
dist: xenial
74-
install:
75-
- curl -sSL https://www.sourceclear.com/install | bash
51+
addons:
52+
srcclr: true
7653
script:
77-
- scripts/run_srcclr.sh
54+
- go get -v -d ./...
7855

7956
- stage: Tests
8057
name: windows build.ps1 test

go.mod

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,11 @@ exclude (
3030
github.com/coreos/etcd v3.3.12+incompatible
3131
github.com/coreos/etcd v3.3.13+incompatible
3232
github.com/coreos/etcd v3.3.15+incompatible
33+
github.com/coreos/etcd v3.3.16+incompatible
34+
github.com/coreos/etcd v3.3.17+incompatible
35+
github.com/coreos/etcd v3.3.18+incompatible
36+
github.com/coreos/etcd v3.3.19+incompatible
37+
github.com/coreos/etcd v3.3.20+incompatible
38+
github.com/coreos/etcd v3.3.21+incompatible
3339
github.com/gorilla/websocket v1.4.0
3440
)

go.sum

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+Ce
1212
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
1313
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
1414
github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
15-
github.com/coreos/etcd v3.3.16+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
15+
github.com/coreos/etcd v3.3.22+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
1616
github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
1717
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
1818
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=

scripts/Makefile.ci

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,3 @@ ci_build_dockerimage_alpine: ## build alpine docker image of optimizely
1818
-t optimizely/agent:alpine \
1919
--build-arg GO_VERSION=${GIMME_GO_VERSION:.x=} \
2020
.
21-
22-
ci_build_fpm_centos: ## build fpm_centos image for packaging
23-
docker build \
24-
--build-arg APP_VERSION \
25-
-f scripts/dockerfiles/Dockerfile.fpm_centos \
26-
-t fpm_centos \
27-
${TRAVIS_BUILD_DIR}/bin
28-
29-
ci_build_fpm_ubuntu: ## build fpm_centos image for packaging
30-
docker build \
31-
--build-arg APP_VERSION \
32-
-f scripts/dockerfiles/Dockerfile.fpm_ubuntu \
33-
-t fpm_ubuntu \
34-
${TRAVIS_BUILD_DIR}/bin
35-
36-
ci_get_fpm_centos: ## get generated rpm
37-
docker run -v /tmp/output_packages:/output -it fpm_centos bash -c "cp *.rpm /output"
38-
39-
ci_get_fpm_ubuntu: ## get generated deb
40-
docker run -v /tmp/output_packages:/output -it fpm_ubuntu bash -c "cp *.deb /output"

scripts/ci_create_packages.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@ set -euo pipefail
44
if [[ $TRAVIS_OS_NAME == "linux" ]]; then
55
echo "we're on linux"
66
cd $TRAVIS_BUILD_DIR
7-
make -e ci_build_fpm_centos
8-
make -e ci_get_fpm_centos
9-
make -e ci_build_fpm_ubuntu
10-
make -e ci_get_fpm_ubuntu
117
make -e ci_build_dockerimage
128
make -e ci_build_dockerimage_alpine
139
elif [[ $TRAVIS_OS_NAME == "osx" ]]; then

scripts/ci_upload_packages.sh

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,6 @@ cd /tmp/output_packages
77
if [[ $TRAVIS_OS_NAME == "linux" ]]; then
88
echo "we're on linux"
99

10-
for deb in `ls *.deb`; do
11-
curl -H "X-JFrog-Art-Api:${ARTIFACTORY_PASSWORD}" -XPUT "https://optimizely.jfrog.io/optimizely/deb-optimizely/pool/$deb;deb.distribution=xenial-optimizely;deb.distribution=bionic-optimizely;deb.component=main;deb.architecture=amd64" -T $deb
12-
done
13-
14-
for rpm in `ls *.rpm`; do
15-
curl -H "X-JFrog-Art-Api:${ARTIFACTORY_PASSWORD}" -XPUT https://optimizely.jfrog.io/optimizely/rpm-optimizely/ -T $rpm
16-
done
17-
1810
# push docker images to dockerhub
1911
echo "$DOCKERHUB_PASS" | docker login -u "$DOCKERHUB_USER" --password-stdin
2012
# if you dont specify the tag, it'll push all image versions

scripts/dockerfiles/Dockerfile.alpine

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ COPY . .
77
RUN make setup build
88

99
FROM alpine:3.10
10-
RUN apk add --no-cache ca-certificates=20191127-r0
10+
RUN apk add --no-cache ca-certificates
1111
COPY --from=builder /go/src/github.com/optimizely/agent/bin/optimizely /optimizely
1212
CMD ["/optimizely"]

scripts/dockerfiles/Dockerfile.fpm_centos

Lines changed: 0 additions & 16 deletions
This file was deleted.

scripts/dockerfiles/Dockerfile.fpm_ubuntu

Lines changed: 0 additions & 21 deletions
This file was deleted.

scripts/run_srcclr.sh

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)