Skip to content

Commit

Permalink
Merge pull request #44 from reportportal/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
HardNorth committed Jun 1, 2023
2 parents 968a1be + 41b5e88 commit 3e92619
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
id: setup
uses: actions/setup-go@v3
with:
go-version: '^1.19.1'
go-version: '1.19.9'

- name: Go Linter
id: linter
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: '^1.19.1'
go-version: '1.19.9'

- name: Go Linter
uses: golangci/golangci-lint-action@v3
Expand Down Expand Up @@ -91,7 +91,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: '^1.19.1'
go-version: '1.19.9'

- name: Get Date
run: 'echo "BUILD_DATE=`date +%FT%T%z`" >> $GITHUB_ENV'
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM alpine:3.16.2

LABEL maintainer="Andrei Varabyeu <andrei_varabyeu@epam.com>"
LABEL version=5.7.3
LABEL version=5.8.0

ENV APP_DOWNLOAD_URL https://github.com/reportportal/service-index/releases/download/v5.7.3/service-index_linux_amd64
ENV APP_DOWNLOAD_URL https://github.com/reportportal/service-index/releases/download/v5.8.0/service-index_linux_amd64
RUN apk --no-cache add --upgrade apk-tools

ADD ${APP_DOWNLOAD_URL} /service-index
Expand Down
14 changes: 5 additions & 9 deletions Jenkinsfile.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ node {
checkout scm
}

docker.withServer("$DOCKER_HOST") {
stage('Build Docker Image') {
sh """
MAJOR_VER=\$(cat VERSION)
Expand All @@ -20,29 +19,26 @@ node {
}

stage('Deploy container') {
sh "docker-compose -p reportportal -f $COMPOSE_FILE_RP up -d --force-recreate index"
stage('Push to ECR') {
withEnv(["AWS_URI=${AWS_URI}", "AWS_REGION=${AWS_REGION}"]) {
sh 'docker tag reportportal-dev/service-index ${AWS_URI}/service-index'
def image = env.AWS_URI + '/service-index'
sh 'docker tag reportportal-dev/service-index ${AWS_URI}/service-index:SNAPSHOT-${BUILD_NUMBER}'
def image = env.AWS_URI + '/service-index' + ':SNAPSHOT-' + env.BUILD_NUMBER
def url = 'https://' + env.AWS_URI
def credentials = 'ecr:' + env.AWS_REGION + ':aws_credentials'
echo image
docker.withRegistry(url, credentials) {
docker.image(image).push('SNAPSHOT-${BUILD_NUMBER}')
docker.image(image).push()
}
}
}
}

stage('Cleanup') {
docker.withServer("$DOCKER_HOST") {
withEnv(["AWS_URI=${AWS_URI}"]) {
sh 'docker rmi ${AWS_URI}/service-index:SNAPSHOT-${BUILD_NUMBER}'
sh 'docker rmi ${AWS_URI}/service-index:latest'
}
sh 'docker rmi reportportal-dev/service-index:latest'
}
}
}

}
}
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.7.4-SNAPSHOT
5.8.1-SNAPSHOT

0 comments on commit 3e92619

Please sign in to comment.