Skip to content

Commit

Permalink
ci updates for v2 (#1631)
Browse files Browse the repository at this point in the history
  • Loading branch information
ajssmith authored Sep 5, 2024
1 parent 7c1cb3a commit e0785f9
Show file tree
Hide file tree
Showing 7 changed files with 90 additions and 17 deletions.
85 changes: 79 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ commands:
echo 'export PATH=$GOPATH/bin:$GOROOT/bin:$PATH' >> $BASH_ENV
echo "export SKUPPER_CONTROLLER_IMAGE=${LOCAL_IP}:5000/controller" >> $BASH_ENV
echo "export SKUPPER_CONFIG_SYNC_IMAGE=${LOCAL_IP}:5000/config-sync" >> $BASH_ENV
echo "export SKUPPER_NETWORK_CONSOLE_COLLECTOR_IMAGE=${LOCAL_IP}:5000/network-console-collector" >> $BASH_ENV
echo "export SKUPPER_BOOTSTRAP_IMAGE=${LOCAL_IP}:5000/bootstrap" >> $BASH_ENV
echo "export TEST_IMAGE=${LOCAL_IP}:5000/skupper-tests" >> $BASH_ENV
source $BASH_ENV
- checkout
Expand Down Expand Up @@ -135,6 +137,8 @@ commands:
gunzip -c /tmp/images/config-sync.gz | docker load
gunzip -c /tmp/images/network-console-collector.gz | docker import - 0.0.0.0:5000/network-console-collector
gunzip -c /tmp/images/network-console-collector.gz | docker load
gunzip -c /tmp/images/bootstrap.gz | docker import - 0.0.0.0:5000/bootstrap
gunzip -c /tmp/images/bootstrap.gz | docker load
gunzip -c /tmp/images/test-image.gz | docker import - 0.0.0.0:5000/skupper-tests
gunzip -c /tmp/images/test-image.gz | docker load
- run:
Expand All @@ -143,6 +147,7 @@ commands:
docker push 0.0.0.0:5000/controller
docker push 0.0.0.0:5000/config-sync
docker push 0.0.0.0:5000/network-console-collector
docker push 0.0.0.0:5000/bootstrap
docker push 0.0.0.0:5000/skupper-tests
system_monitor:
Expand All @@ -160,6 +165,7 @@ commands:
name: journalctl monitoring
command: journalctl -p 7 -b -f
background: true

system_status:
description: shows some point-in-time system status
parameters:
Expand Down Expand Up @@ -344,6 +350,12 @@ yaml-templates:
ignore: /.*/
only: /main/

v2_branch_filters: &run_for_v2_branch
filters:
branches:
ignore: /.*/
only: /v2/

release_filters: &run_for_numeric_tags
filters:
branches:
Expand All @@ -359,6 +371,12 @@ yaml-templates:
- main_tests_minikube_local_cluster
- policy_tests_minikube_local_cluster

v2_release_requires: &v2_release_requires
requires:
- build-all
- test-skupper-binary
- test

workflows:
version: 2.1
build-workflow:
Expand All @@ -378,8 +396,8 @@ workflows:
- build-all
- test:
<<: *run_for_all_branches_and_numeric_tags
# - build_and_save_test_images:
# <<: *run_for_all_branches_and_numeric_tags
- build_and_save_test_images:
<<: *run_for_all_branches_and_numeric_tags

# - main_tests_minikube_local_cluster:
# <<: *run_for_all_branches_and_numeric_tags
Expand All @@ -398,10 +416,10 @@ workflows:
# - build_and_save_test_images

# - publish-github-release-images:
# <<: *run_for_numeric_tags
# <<: *release_requires
# context:
# - skupper-org
# <<: *run_for_numeric_tags
# <<: *release_requires
# context:
# - skupper-org

# - generate-manifest:
# <<: *run_for_numeric_tags
Expand Down Expand Up @@ -433,6 +451,19 @@ workflows:
# context:
# - skupper-org

- publish-github-v2-artifacts:
<<: *run_for_v2_branch
requires:
- publish-github-v2-images
context:
- skupper-org

- publish-github-v2-latest-images:
<<: *run_for_v2_branch
<<: *v2_release_requires
context:
- skupper-org

jobs:
test:
executor:
Expand Down Expand Up @@ -692,3 +723,45 @@ jobs:
done
cd ${BASEDIR}
ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -replace -prerelease ${VERSION} "${BASEDIR}/archives"
publish-github-v2-images:
executor:
name: go_cimg
steps:
- checkout
- setup_remote_docker
- run: docker login quay.io -u ${QUAY_LOGIN} -p ${QUAY_PASSWORD}
- run:
name: "Publishing v2 images"
command: |
echo 'export CONTROLLER_IMAGE=quay.io/skupper/controller:v2-latest' >> $BASH_ENV
echo 'export CONFIG_SYNC_IMAGE=quay.io/skupper/config-sync:v2-latest' >> $BASH_ENV
echo 'export NETWORK_CONSOLE_COLLECTOR_IMAGE=quay.io/skupper/network-console-collector:v2-latest' >> $BASH_ENV
echo 'export BOOTSTRAP_IMAGE=quay.io/skupper/bootstrap:v2-latest' >> $BASH_ENV
source $BASH_ENV
docker buildx create --use --name skupper-buildx
make -e docker-build
make -e docker-push
publish-github-v2-artifacts:
docker:
- image: cibuilds/github:0.10
steps:
- attach_workspace:
at: .
- run:
name: "Create a V2 Pre-Release on GitHub"
command: |
VERSION="v2-release"
BASEDIR=`pwd`
mkdir "${BASEDIR}/archives"
for p in `ls dist` ; do
cd "$BASEDIR/dist/$p"
if [[ $p == windows* ]] ; then
zip -q "${BASEDIR}/archives/skupper-cli-${VERSION}-$p.zip" *
else
tar -zcf "${BASEDIR}/archives/skupper-cli-${VERSION}-$p.tgz" *
fi
done
cd ${BASEDIR}
ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -replace -prerelease ${VERSION} "${BASEDIR}/archives"
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
VERSION := $(shell git describe --tags --dirty=-modified --always)
CONTROLLER_IMAGE := quay.io/skupper/controller
BOOTSTRAP_IMAGE := quay.io/skupper/bootstrap
CONFIG_SYNC_IMAGE := quay.io/skupper/config-sync
NETWORK_CONSOLE_COLLECTOR_IMAGE := quay.io/skupper/network-console-collector
CONTROLLER_IMAGE := quay.io/skupper/controller:v2-latest
BOOTSTRAP_IMAGE := quay.io/skupper/bootstrap:v2-latest
CONFIG_SYNC_IMAGE := quay.io/skupper/config-sync:v2-latest
NETWORK_CONSOLE_COLLECTOR_IMAGE := quay.io/skupper/network-console-collector:v2-latest
TEST_IMAGE := quay.io/skupper/skupper-tests
TEST_BINARIES_FOLDER := ${PWD}/test/integration/bin
DOCKER := docker
Expand All @@ -11,7 +11,7 @@ PLATFORMS ?= linux/amd64,linux/arm64
GOOS ?= linux
GOARCH ?= amd64

all: build-cmd build-config-sync build-controller build-tests build-manifest
all: build-cmd build-config-sync build-controller build-bootstrap build-tests build-manifest build-network-console-collector

build-tests:
mkdir -p ${TEST_BINARIES_FOLDER}
Expand Down Expand Up @@ -96,7 +96,7 @@ test:
go test -v -count=1 ./pkg/... ./internal/... ./cmd/...

clean:
rm -rf skupper controller release config-sync manifest bootstrap ${TEST_BINARIES_FOLDER}
rm -rf skupper controller release config-sync manifest bootstrap network-console-collector ${TEST_BINARIES_FOLDER}

package: release/windows.zip release/darwin.zip release/linux.tgz release/s390x.tgz release/arm64.tgz

Expand Down
2 changes: 1 addition & 1 deletion cmd/bootstrap/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -Ceu

IMAGE="quay.io/skupper/bootstrap"
IMAGE="quay.io/skupper/bootstrap:v2-latest"
INPUT_PATH="${1:-${PWD}}"
SKUPPER_OUTPUT_PATH="${XDG_DATA_HOME:-${HOME}/.local/share}/skupper"
SERVICE_DIR="${XDG_CONFIG_HOME:-${HOME}/.config}/systemd/user"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ spec:
app.kubernetes.io/component: server
spec:
containers:
- image: quay.io/ckruse/network-console-collector:latest
- image: quay.io/skupper/network-console-collector:v2-latest
imagePullPolicy: Always
name: network-console
args:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ spec:
app.kubernetes.io/component: server
spec:
containers:
- image: quay.io/ckruse/network-console-collector:latest
- image: quay.io/skupper/network-console-collector:v2-latest
imagePullPolicy: Always
name: network-console
args:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ spec:
app.kubernetes.io/component: server
spec:
containers:
- image: quay.io/ckruse/network-console-collector:latest
- image: quay.io/skupper/network-console-collector:v2-latest
imagePullPolicy: Always
name: network-console
args:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ spec:
serviceAccountName: network-console-collector
containers:
- name: network-console
image: quay.io/ckruse/network-console-collector:latest
image: quay.io/skupper/network-console-collector:v2-latest
imagePullPolicy: Always
args:
- -listen=127.0.0.1:8080
Expand Down

0 comments on commit e0785f9

Please sign in to comment.