Skip to content

Commit

Permalink
upgrade to go 1.23 + all dependencies to latest
Browse files Browse the repository at this point in the history
  • Loading branch information
Arnould Gateaux committed Oct 24, 2024
1 parent 160d867 commit 495da92
Show file tree
Hide file tree
Showing 156 changed files with 12,751 additions and 33,161 deletions.
4 changes: 2 additions & 2 deletions .github/scripts/apidb_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ DOCKER_DATA_DIR=`mktemp -d -t docker-XXXXXX`

mkdir -p /var/log/harbor/

docker run -i --rm --privileged -v `pwd`/harbor:/drone -v /var/log/harbor/:/var/log/harbor/ -v $DOCKER_DATA_DIR:/var/lib/docker -e NOTARY_URL=https://$NOTARY_HOST -w /drone $E2E_IMAGE make swagger_client
docker run -i --rm --privileged -v `pwd`/harbor:/drone -v /var/log/harbor/:/var/log/harbor/ -v $DOCKER_DATA_DIR:/var/lib/docker -e NOTARY_URL=https://$NOTARY_HOST -w /drone $E2E_IMAGE $CMD
docker run -i --rm --privileged -v `pwd`/harbor:/drone -v /var/log/harbor/:/var/log/harbor/ -v $DOCKER_DATA_DIR:/var/lib/docker -w /drone $E2E_IMAGE make swagger_client
docker run -i --rm --privileged -v `pwd`/harbor:/drone -v /var/log/harbor/:/var/log/harbor/ -v $DOCKER_DATA_DIR:/var/lib/docker -w /drone $E2E_IMAGE $CMD

rc=$?

Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/build-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,23 @@ jobs:
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v2
- uses: actions/setup-go@v5
with:
go-version: 1.18
- uses: actions/checkout@v2
go-version: 1.23
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2.0.0
uses: docker/setup-buildx-action@v3.7.1
with:
driver-opts: image=moby/buildkit:master
- name: Login to DockerHub
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
username: '${{ secrets.DOCKER_USER }}'
password: '${{ secrets.DOCKER_TOKEN }}'
- name: Build and push to DockerHub
uses: docker/build-push-action@v3
uses: docker/build-push-action@v6
with:
push: true
platforms: |
Expand All @@ -35,13 +35,13 @@ jobs:
file: Dockerfile
tags: goharbor/harbor-operator:dev
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: harbor
password: '${{ secrets.GHCR_TOKEN }}'
- name: Build and push go ghcr
uses: docker/build-push-action@v3
uses: docker/build-push-action@v6
with:
push: true
platforms: |
Expand All @@ -53,13 +53,13 @@ jobs:
charts:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v2
- uses: actions/setup-go@v5
with:
go-version: 1.18
- uses: actions/checkout@v2
go-version: 1.23
- uses: actions/checkout@v4
- name: Package charts
run: make helm-generate
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: charts
path: charts/*.tgz
23 changes: 9 additions & 14 deletions .github/workflows/chart-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,18 @@ jobs:
- "1.3.0"

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: actions/setup-go@v2
- uses: actions/setup-go@v5
with:
go-version: 1.18
go-version: 1.23

- uses: azure/setup-kubectl@v3
- uses: azure/setup-kubectl@v4
with:
version: 'latest'

- name: Cache go mod
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
Expand All @@ -62,9 +62,8 @@ jobs:
sudo mount -t tmpfs tmpfs /tmp/lib/etcd
- name: Install Kubernetes v${{ matrix.k8sVersion }}
uses: helm/kind-action@v1.3.0
uses: helm/kind-action@v1.10.0
with:
version: v0.14.0
node_image: kindest/node:v${{ matrix.k8sVersion }}
cluster_name: harbor
config: .github/kind.yaml
Expand Down Expand Up @@ -107,13 +106,9 @@ jobs:
IP=`hostname -I | awk '{print $1}'`
echo "IP=$IP" >> $GITHUB_ENV
CORE_HOST=core.$IP.nip.io
NOTARY_HOST=notary.$IP.nip.io
echo "CORE_HOST=$CORE_HOST" >> $GITHUB_ENV
echo "NOTARY_HOST=$NOTARY_HOST" >> $GITHUB_ENV
sed -i "s/core.harbor.domain/$CORE_HOST/g" config/samples/harborcluster-minimal/*.yaml
sed -i "s/notary.harbor.domain/$NOTARY_HOST/g" config/samples/harborcluster-minimal/*.yaml
sed -i "s/core.harbor.domain/$CORE_HOST/g" config/samples/harborcluster-standard/*.yaml
sed -i "s/notary.harbor.domain/$NOTARY_HOST/g" config/samples/harborcluster-standard/*.yaml
make sample-harborcluster-standard
Expand Down Expand Up @@ -169,14 +164,14 @@ jobs:
if: ${{ failure() }}
run: |
mkdir -p /tmp/harbor
for name in core jobservice registry registryctl trivy chartmuseum notaryserver notarysigner portal; do \
for name in core jobservice registry registryctl trivy portal; do \
kubectl logs -l "goharbor.io/operator-controller=$name" --all-containers > /tmp/harbor/$name.log ; \
done
kubectl logs -l "app.kubernetes.io/instance=harbor-database" --all-containers > /tmp/harbor/db.log
kubectl logs -l "release=harbor-redis" --all-containers > /tmp/harbor/redis.log
ls -l /tmp/harbor
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: harbor_chart
Expand All @@ -189,7 +184,7 @@ jobs:
kind export logs --name harbor /tmp/logs
ls -l /tmp/logs
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: kind_chart
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -50,7 +50,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -64,4 +64,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2
22 changes: 9 additions & 13 deletions .github/workflows/contour-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,18 @@ jobs:
- "full_stack.yaml"

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: actions/setup-go@v2
- uses: actions/setup-go@v5
with:
go-version: 1.18
go-version: 1.23

- uses: azure/setup-kubectl@v3
- uses: azure/setup-kubectl@v4
with:
version: 'v1.25.4'

- name: Cache go mod
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
Expand All @@ -64,9 +64,8 @@ jobs:
sudo mount -t tmpfs tmpfs /tmp/lib/etcd
- name: Install Kubernetes v${{ matrix.k8sVersion }}
uses: helm/kind-action@v1.3.0
uses: helm/kind-action@v1.10.0
with:
version: v0.14.0
node_image: kindest/node:v${{ matrix.k8sVersion }}
cluster_name: harbor
config: .github/kind.yaml
Expand Down Expand Up @@ -113,14 +112,11 @@ jobs:
IP=`hostname -I | awk '{print $1}'`
echo "IP=$IP" >> $GITHUB_ENV
CORE_HOST=core.$IP.nip.io
NOTARY_HOST=notary.$IP.nip.io
MINIO_HOST=minio.$IP.nip.io
echo "CORE_HOST=$CORE_HOST" >> $GITHUB_ENV
echo "NOTARY_HOST=$NOTARY_HOST" >> $GITHUB_ENV
echo "MINIO_HOST=$MINIO_HOST" >> $GITHUB_ENV
samplefile=${{ matrix.samples }}
sed -i "s/core.harbor.domain/$CORE_HOST/g" manifests/samples/$samplefile
sed -i "s/notary.harbor.domain/$NOTARY_HOST/g" manifests/samples/$samplefile
sed -i "s/minio.harbor.domain/$MINIO_HOST/g" manifests/samples/$samplefile
sed -i "s/controller: default/controller: contour/g" manifests/samples/$samplefile
sed -i "s/logLevel: info/logLevel: debug/g" manifests/samples/$samplefile
Expand Down Expand Up @@ -191,14 +187,14 @@ jobs:
df -h
free -m
mkdir -p /tmp/harbor
for name in core jobservice registry registryctl trivy chartmuseum notaryserver notarysigner portal; do \
for name in core jobservice registry registryctl trivy portal; do \
kubectl -n cluster-sample-ns logs -l "goharbor.io/operator-controller=$name" --all-containers > /tmp/harbor/$name.log ; \
done
kubectl -n cluster-sample-ns logs -l "application=spilo" --all-containers > /tmp/harbor/db.log
kubectl -n cluster-sample-ns logs -l "app.kubernetes.io/component=redis" --all-containers > /tmp/harbor/redis.log
ls -l /tmp/harbor
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: contour_harbor_v${{ matrix.k8sVersion }}_v${{ matrix.certManager }}_${{ matrix.samples }}
Expand All @@ -211,7 +207,7 @@ jobs:
kind export logs --name harbor /tmp/logs
ls -l /tmp/logs
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: contour_kind_v${{ matrix.k8sVersion }}_v${{ matrix.certManager }}_${{ matrix.samples }}
Expand Down
22 changes: 9 additions & 13 deletions .github/workflows/harbor-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,18 @@ jobs:
- "standard_stack_fs.yaml"

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: actions/setup-go@v2
- uses: actions/setup-go@v5
with:
go-version: 1.18
go-version: 1.23

- uses: azure/setup-kubectl@v3
- uses: azure/setup-kubectl@v4
with:
version: 'latest'

- name: Cache go mod
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
Expand All @@ -67,9 +67,8 @@ jobs:
sudo mount -t tmpfs tmpfs /tmp/lib/etcd
- name: Install Kubernetes v${{ matrix.k8sVersion }}
uses: helm/kind-action@v1.3.0
uses: helm/kind-action@v1.10.0
with:
version: v0.14.0
node_image: kindest/node:v${{ matrix.k8sVersion }}
cluster_name: harbor
config: .github/kind_permission.yaml
Expand Down Expand Up @@ -116,14 +115,11 @@ jobs:
IP=`hostname -I | awk '{print $1}'`
echo "IP=$IP" >> $GITHUB_ENV
CORE_HOST=core.$IP.nip.io
NOTARY_HOST=notary.$IP.nip.io
MINIO_HOST=minio.$IP.nip.io
echo "CORE_HOST=$CORE_HOST" >> $GITHUB_ENV
echo "NOTARY_HOST=$NOTARY_HOST" >> $GITHUB_ENV
echo "MINIO_HOST=$MINIO_HOST" >> $GITHUB_ENV
samplefile=${{ matrix.samples }}
sed -i "s/core.harbor.domain/$CORE_HOST/g" manifests/samples/$samplefile
sed -i "s/notary.harbor.domain/$NOTARY_HOST/g" manifests/samples/$samplefile
sed -i "s/minio.harbor.domain/$MINIO_HOST/g" manifests/samples/$samplefile
sed -i "s/logLevel: info/logLevel: debug/g" manifests/samples/$samplefile
Expand Down Expand Up @@ -194,14 +190,14 @@ jobs:
df -h
free -m
mkdir -p /tmp/harbor
for name in core jobservice registry registryctl trivy chartmuseum notaryserver notarysigner portal; do \
for name in core jobservice registry registryctl trivy portal; do \
kubectl -n cluster-sample-ns logs -l "goharbor.io/operator-controller=$name" --all-containers > /tmp/harbor/$name.log ; \
done
kubectl -n cluster-sample-ns logs -l "application=spilo" --all-containers > /tmp/harbor/db.log
kubectl -n cluster-sample-ns logs -l "app.kubernetes.io/component=redis" --all-containers > /tmp/harbor/redis.log
ls -l /tmp/harbor
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: harbor_v${{ matrix.k8sVersion }}_v${{ matrix.certManager }}_${{ matrix.samples }}
Expand All @@ -214,7 +210,7 @@ jobs:
kind export logs --name harbor /tmp/logs
ls -l /tmp/logs
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: kind_v${{ matrix.k8sVersion }}_v${{ matrix.certManager }}_${{ matrix.samples }}
Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- # required for the changelog to work correctly
run: git fetch --prune --unshallow
- uses: actions/setup-go@v2
- uses: actions/setup-go@v5
with:
go-version: 1.18
go-version: 1.23
- name: prepare changelog
run: |
tag=${{ github.ref }}
Expand All @@ -26,9 +26,9 @@ jobs:
EOF
- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v3
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v1
Expand All @@ -43,23 +43,23 @@ jobs:
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v2
- uses: actions/setup-go@v5
with:
go-version: 1.18
- uses: actions/checkout@v2
go-version: 1.23
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2.0.0
uses: docker/setup-buildx-action@v3.7.1
with:
driver-opts: image=moby/buildkit:master
- name: Login to DockerHub
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
username: '${{ secrets.DOCKER_USER }}'
password: '${{ secrets.DOCKER_TOKEN }}'
- name: Build and push to DockerHub
uses: docker/build-push-action@v3
uses: docker/build-push-action@v6
with:
push: true
platforms: |
Expand All @@ -74,7 +74,7 @@ jobs:
username: harbor
password: '${{ secrets.GHCR_TOKEN }}'
- name: Build and push go ghcr
uses: docker/build-push-action@v3
uses: docker/build-push-action@v6
with:
push: true
platforms: |
Expand Down
Loading

0 comments on commit 495da92

Please sign in to comment.