Skip to content
This repository has been archived by the owner on Sep 17, 2024. It is now read-only.

Commit

Permalink
chore: update 7.x versions (#1157)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdelapenya authored May 11, 2021
1 parent 998d8ca commit 36ee85d
Show file tree
Hide file tree
Showing 17 changed files with 3,291 additions and 3,291 deletions.
2 changes: 1 addition & 1 deletion .ci/scripts/fleet-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ set -euxo pipefail
# - STACK_VERSION - that's the version of the stack to be tested. Default '8.0.0-SNAPSHOT'.
#

STACK_VERSION=${1:-'8.0.0-SNAPSHOT'}
STACK_VERSION=${1:-'7.x-SNAPSHOT'}
SUITE='fleet'

# Exclude the nightly tests in the CI.
Expand Down
2 changes: 1 addition & 1 deletion cli/config/compose/profiles/fleet/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ services:
interval: 1s

fleet-server:
image: "docker.elastic.co/beats/elastic-agent:${stackVersion:-8.0.0-SNAPSHOT}"
image: "docker.elastic.co/beats/elastic-agent:${stackVersion:-7.x-SNAPSHOT}"
depends_on:
elasticsearch:
condition: service_healthy
Expand Down
2 changes: 1 addition & 1 deletion cli/config/compose/profiles/helm/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ services:
- xpack.monitoring.collection.enabled=true
- ELASTIC_USERNAME=elastic
- ELASTIC_PASSWORD=changeme
image: "docker.elastic.co/elasticsearch/elasticsearch:${stackVersion:-8.0.0-SNAPSHOT}"
image: "docker.elastic.co/elasticsearch/elasticsearch:${stackVersion:-7.x-SNAPSHOT}"
ports:
- "9200:9200"
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '2.4'
services:
elastic-agent:
image: docker.elastic.co/${elasticAgentDockerNamespace:-beats}/elastic-agent${elasticAgentDockerImageSuffix}:${elasticAgentTag:-8.0.0-SNAPSHOT}
image: docker.elastic.co/${elasticAgentDockerNamespace:-beats}/elastic-agent${elasticAgentDockerImageSuffix}:${elasticAgentTag:-7.x-SNAPSHOT}
container_name: ${elasticAgentContainerName}
depends_on:
elasticsearch:
Expand Down
2 changes: 1 addition & 1 deletion cli/config/compose/services/kibana/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ services:
test: "curl -f http://localhost:5601/login | grep kbn-injected-metadata 2>&1 >/dev/null"
retries: 600
interval: 1s
image: "docker.elastic.co/kibana/kibana:${kibanaTag:-8.0.0-SNAPSHOT}"
image: "docker.elastic.co/kibana/kibana:${kibanaTag:-7.x-SNAPSHOT}"
ports:
- "5601:5601"
2 changes: 1 addition & 1 deletion e2e/_suites/helm/helm_charts_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ var kubernetesVersion = "1.18.2"

// stackVersion is the version of the stack to use
// It can be overriden by STACK_VERSION env var
var stackVersion = "8.0.0-SNAPSHOT"
var stackVersion = "7.x-SNAPSHOT"

var testSuite HelmChartTestSuite

Expand Down
2 changes: 1 addition & 1 deletion e2e/_suites/kubernetes-autodiscover/autodiscover_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (

var beatVersions = map[string]string{}

const defaultBeatVersion = "8.0.0-SNAPSHOT"
const defaultBeatVersion = "7.x-SNAPSHOT"

var defaultEventsWaitTimeout = 60 * time.Second
var defaultDeployWaitTimeout = 60 * time.Second
Expand Down
5,190 changes: 2,595 additions & 2,595 deletions internal/_testresources/gcp/commits.json

Large diffs are not rendered by default.

1,330 changes: 665 additions & 665 deletions internal/_testresources/gcp/snapshots.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions internal/common/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ const FleetProfileName = "fleet"
const FleetServerAgentServiceName = "fleet-server"

// AgentVersionBase is the base version of the agent to use
var AgentVersionBase = "8.0.0-SNAPSHOT"
var AgentVersionBase = "7.x-SNAPSHOT"

// AgentVersion is the version of the agent to use
// It can be overriden by BEAT_VERSION env var
var AgentVersion = AgentVersionBase

// AgentStaleVersion is the version of the agent to use as a base during upgrade
// It can be overriden by ELASTIC_AGENT_STALE_VERSION env var. Using latest GA as a default.
var AgentStaleVersion = "7.11-SNAPSHOT"
var AgentStaleVersion = "7.13-SNAPSHOT"

// StackVersion is the version of the stack to use
// It can be overriden by STACK_VERSION env var
Expand Down
12 changes: 6 additions & 6 deletions internal/installer/base_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func TestDownloadAgentBinary(t *testing.T) {
artifact := "elastic-agent"
beatsDir := path.Join("..", "_testresources", "beats")
distributionsDir, _ := filepath.Abs(path.Join(beatsDir, "x-pack", "elastic-agent", "build", "distributions"))
version := "8.0.0-SNAPSHOT"
version := "7.x-SNAPSHOT"

t.Run("Fetching non-existent binary from local Beats dir throws an error", func(t *testing.T) {
defer os.Unsetenv("BEATS_LOCAL_PATH")
Expand All @@ -31,7 +31,7 @@ func TestDownloadAgentBinary(t *testing.T) {
defer os.Unsetenv("BEATS_LOCAL_PATH")
os.Setenv("BEATS_LOCAL_PATH", beatsDir)

artifactName := "elastic-agent-8.0.0-SNAPSHOT-x86_64.rpm"
artifactName := "elastic-agent-7.x-SNAPSHOT-x86_64.rpm"
expectedFilePath := path.Join(distributionsDir, artifactName)

downloadedFilePath, err := downloadAgentBinary(artifactName, artifact, version)
Expand All @@ -43,7 +43,7 @@ func TestDownloadAgentBinary(t *testing.T) {
defer os.Unsetenv("BEATS_LOCAL_PATH")
os.Setenv("BEATS_LOCAL_PATH", beatsDir)

artifactName := "elastic-agent-8.0.0-SNAPSHOT-amd64.deb"
artifactName := "elastic-agent-7.x-SNAPSHOT-amd64.deb"
expectedFilePath := path.Join(distributionsDir, artifactName)

downloadedFilePath, err := downloadAgentBinary(artifactName, artifact, version)
Expand All @@ -55,7 +55,7 @@ func TestDownloadAgentBinary(t *testing.T) {
defer os.Unsetenv("BEATS_LOCAL_PATH")
os.Setenv("BEATS_LOCAL_PATH", beatsDir)

artifactName := "elastic-agent-8.0.0-SNAPSHOT-linux-amd64.tar.gz"
artifactName := "elastic-agent-7.x-SNAPSHOT-linux-amd64.tar.gz"
expectedFilePath := path.Join(distributionsDir, artifactName)

downloadedFilePath, err := downloadAgentBinary(artifactName, artifact, version)
Expand All @@ -67,7 +67,7 @@ func TestDownloadAgentBinary(t *testing.T) {
defer os.Unsetenv("BEATS_LOCAL_PATH")
os.Setenv("BEATS_LOCAL_PATH", beatsDir)

artifactName := "elastic-agent-8.0.0-SNAPSHOT-linux-amd64.docker.tar.gz"
artifactName := "elastic-agent-7.x-SNAPSHOT-linux-amd64.docker.tar.gz"
expectedFilePath := path.Join(distributionsDir, artifactName)

downloadedFilePath, err := downloadAgentBinary(artifactName, artifact, version)
Expand All @@ -79,7 +79,7 @@ func TestDownloadAgentBinary(t *testing.T) {
defer os.Unsetenv("BEATS_LOCAL_PATH")
os.Setenv("BEATS_LOCAL_PATH", beatsDir)

artifactName := "elastic-agent-ubi8-8.0.0-SNAPSHOT-linux-amd64.docker.tar.gz"
artifactName := "elastic-agent-ubi8-7.x-SNAPSHOT-linux-amd64.docker.tar.gz"
expectedFilePath := path.Join(distributionsDir, artifactName)

downloadedFilePath, err := downloadAgentBinary(artifactName, artifact, version)
Expand Down
32 changes: 16 additions & 16 deletions internal/utils/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
gabs "github.com/Jeffail/gabs/v2"
)

var testVersion = "8.0.0-SNAPSHOT"
var testVersion = "7.x-SNAPSHOT"

const bucket = "beats-ci-artifacts"
const commits = "commits"
Expand Down Expand Up @@ -46,12 +46,12 @@ func init() {
func TestBuildArtifactName(t *testing.T) {
artifact := "elastic-agent"
OS := "linux"
version := "8.0.0-SNAPSHOT"
version := "7.x-SNAPSHOT"

t.Run("For RPM", func(t *testing.T) {
arch := "x86_64"
extension := "rpm"
expectedFileName := "elastic-agent-8.0.0-SNAPSHOT-x86_64.rpm"
expectedFileName := "elastic-agent-7.x-SNAPSHOT-x86_64.rpm"

artifactName := BuildArtifactName(artifact, version, version, OS, arch, extension, false)
assert.Equal(t, expectedFileName, artifactName)
Expand All @@ -63,7 +63,7 @@ func TestBuildArtifactName(t *testing.T) {
t.Run("For DEB", func(t *testing.T) {
arch := "amd64"
extension := "deb"
expectedFileName := "elastic-agent-8.0.0-SNAPSHOT-amd64.deb"
expectedFileName := "elastic-agent-7.x-SNAPSHOT-amd64.deb"

artifactName := BuildArtifactName(artifact, version, version, OS, arch, extension, false)
assert.Equal(t, expectedFileName, artifactName)
Expand All @@ -75,7 +75,7 @@ func TestBuildArtifactName(t *testing.T) {
t.Run("For TAR", func(t *testing.T) {
arch := "amd64"
extension := "tar.gz"
expectedFileName := "elastic-agent-8.0.0-SNAPSHOT-linux-amd64.tar.gz"
expectedFileName := "elastic-agent-7.x-SNAPSHOT-linux-amd64.tar.gz"

artifactName := BuildArtifactName(artifact, version, version, OS, arch, extension, false)
assert.Equal(t, expectedFileName, artifactName)
Expand All @@ -91,7 +91,7 @@ func TestBuildArtifactName(t *testing.T) {
artifact = "elastic-agent"
arch := "amd64"
extension := "tar.gz"
expectedFileName := "elastic-agent-8.0.0-SNAPSHOT-docker-image-linux-amd64.tar.gz"
expectedFileName := "elastic-agent-7.x-SNAPSHOT-docker-image-linux-amd64.tar.gz"

artifactName := BuildArtifactName(artifact, version, version, OS, arch, extension, true)
assert.Equal(t, expectedFileName, artifactName)
Expand All @@ -107,7 +107,7 @@ func TestBuildArtifactName(t *testing.T) {
artifact = "elastic-agent-ubi8"
arch := "amd64"
extension := "tar.gz"
expectedFileName := "elastic-agent-ubi8-8.0.0-SNAPSHOT-docker-image-linux-amd64.tar.gz"
expectedFileName := "elastic-agent-ubi8-7.x-SNAPSHOT-docker-image-linux-amd64.tar.gz"

artifactName := BuildArtifactName(artifact, version, version, OS, arch, extension, true)
assert.Equal(t, expectedFileName, artifactName)
Expand All @@ -123,7 +123,7 @@ func TestBuildArtifactName(t *testing.T) {
artifact = "elastic-agent"
arch := "amd64"
extension := "tar.gz"
expectedFileName := "elastic-agent-8.0.0-SNAPSHOT-linux-amd64.docker.tar.gz"
expectedFileName := "elastic-agent-7.x-SNAPSHOT-linux-amd64.docker.tar.gz"

artifactName := BuildArtifactName(artifact, version, version, OS, arch, extension, true)
assert.Equal(t, expectedFileName, artifactName)
Expand All @@ -139,7 +139,7 @@ func TestBuildArtifactName(t *testing.T) {
artifact = "elastic-agent-ubi8"
arch := "amd64"
extension := "tar.gz"
expectedFileName := "elastic-agent-ubi8-8.0.0-SNAPSHOT-linux-amd64.docker.tar.gz"
expectedFileName := "elastic-agent-ubi8-7.x-SNAPSHOT-linux-amd64.docker.tar.gz"

artifactName := BuildArtifactName(artifact, version, version, OS, arch, extension, true)
assert.Equal(t, expectedFileName, artifactName)
Expand All @@ -155,7 +155,7 @@ func TestBuildArtifactName(t *testing.T) {
artifact = "elastic-agent"
arch := "amd64"
extension := "tar.gz"
expectedFileName := "elastic-agent-8.0.0-SNAPSHOT-linux-amd64.docker.tar.gz"
expectedFileName := "elastic-agent-7.x-SNAPSHOT-linux-amd64.docker.tar.gz"

artifactName := BuildArtifactName(artifact, version, version, OS, arch, extension, true)
assert.Equal(t, expectedFileName, artifactName)
Expand All @@ -171,7 +171,7 @@ func TestBuildArtifactName(t *testing.T) {
artifact = "elastic-agent-ubi8"
arch := "amd64"
extension := "tar.gz"
expectedFileName := "elastic-agent-ubi8-8.0.0-SNAPSHOT-linux-amd64.docker.tar.gz"
expectedFileName := "elastic-agent-ubi8-7.x-SNAPSHOT-linux-amd64.docker.tar.gz"

artifactName := BuildArtifactName(artifact, version, version, OS, arch, extension, true)
assert.Equal(t, expectedFileName, artifactName)
Expand All @@ -187,8 +187,8 @@ func TestBuildArtifactName(t *testing.T) {
artifact = "elastic-agent"
arch := "amd64"
extension := "tar.gz"
fallbackVersion := "8.0.0-SNAPSHOT"
expectedFileName := "elastic-agent-8.0.0-SNAPSHOT-docker-image-linux-amd64.tar.gz"
fallbackVersion := "7.x-SNAPSHOT"
expectedFileName := "elastic-agent-7.x-SNAPSHOT-docker-image-linux-amd64.tar.gz"

artifactName := BuildArtifactName(artifact, version, fallbackVersion, OS, arch, extension, true)
assert.Equal(t, expectedFileName, artifactName)
Expand Down Expand Up @@ -342,15 +342,15 @@ func TestIsCommit(t *testing.T) {

func TestProcessBucketSearchPage_CommitFound(t *testing.T) {
// retrieving last element in commits.json
object := "024b732844d40bdb2bf806480af2b03fcb8fbdbe/elastic-agent/elastic-agent-8.0.0-SNAPSHOT-darwin-x86_64.tar.gz"
object := "024b732844d40bdb2bf806480af2b03fcb8fbdbe/elastic-agent/elastic-agent-7.x-SNAPSHOT-darwin-x86_64.tar.gz"

mediaLink, err := processBucketSearchPage(commitsJSON, 1, bucket, commits, object)
assert.Nil(t, err)
assert.True(t, mediaLink == "https://storage.googleapis.com/download/storage/v1/b/beats-ci-artifacts/o/commits%2F024b732844d40bdb2bf806480af2b03fcb8fbdbe%2Felastic-agent%2Felastic-agent-8.0.0-SNAPSHOT-darwin-x86_64.tar.gz?generation=1612983859986704&alt=media")
assert.True(t, mediaLink == "https://storage.googleapis.com/download/storage/v1/b/beats-ci-artifacts/o/commits%2F024b732844d40bdb2bf806480af2b03fcb8fbdbe%2Felastic-agent%2Felastic-agent-7.x-SNAPSHOT-darwin-x86_64.tar.gz?generation=1612983859986704&alt=media")
}

func TestProcessBucketSearchPage_CommitsNotFound(t *testing.T) {
object := "foo/elastic-agent-8.0.0-SNAPSHOT-linux-amd64.docker.tar.gz"
object := "foo/elastic-agent-7.x-SNAPSHOT-linux-amd64.docker.tar.gz"

mediaLink, err := processBucketSearchPage(commitsJSON, 1, bucket, commits, object)
assert.NotNil(t, err)
Expand Down

0 comments on commit 36ee85d

Please sign in to comment.