Skip to content

Commit

Permalink
233 - Update environment variables for Space credentials (#168)
Browse files Browse the repository at this point in the history
Environment variables and secrets for fetching packages from Space were renamed and updated. This change affects build configuration and build scripts by replacing "MAVEN_SPACE" with "SPACE_INTELLIJ_NIGHTLIES" and "SPACE_PACKAGE_SEARCH". The affected files include Github workflow configuration files, build scripts, and publish plugin configuration files.

(cherry picked from commit 8440a27)

Co-authored-by: Lamberto Basti <[email protected]>
  • Loading branch information
lamba92 and Lamberto Basti authored May 22, 2024
1 parent 5af6fda commit 9a0efbf
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 25 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,7 @@ jobs:
run: ./gradlew :plugin:buildShadowPlugin
env:
GRADLE_ENTERPRISE_KEY: ${{ secrets.GRADLE_ENTERPRISE_KEY }}
SPACE_INTELLIJ_NIGHTLIES_TOKEN: ${{ secrets.SPACE_INTELLIJ_NIGHTLIES_TOKEN }}
SPACE_INTELLIJ_NIGHTLIES_USERNAME: ${{ secrets.SPACE_INTELLIJ_NIGHTLIES_USERNAME }}
SPACE_PACKAGE_SEARCH_TOKEN: ${{ secrets.SPACE_PACKAGE_SEARCH_TOKEN }}
SPACE_PACKAGE_SEARCH_USERNAME: ${{ secrets.SPACE_PACKAGE_SEARCH_USERNAME }}
6 changes: 4 additions & 2 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ jobs:
env:
MARKETPLACE_TOKEN: ${{ secrets.MARKETPLACE_TOKEN }}
GRADLE_ENTERPRISE_KEY: ${{ secrets.GRADLE_ENTERPRISE_KEY }}
MAVEN_SPACE_PASSWORD: ${{ secrets.MAVEN_SPACE_PASSWORD }}
MAVEN_SPACE_USERNAME: ${{ secrets.MAVEN_SPACE_USERNAME }}
SPACE_INTELLIJ_NIGHTLIES_TOKEN: ${{ secrets.SPACE_INTELLIJ_NIGHTLIES_TOKEN }}
SPACE_INTELLIJ_NIGHTLIES_USERNAME: ${{ secrets.SPACE_INTELLIJ_NIGHTLIES_USERNAME }}
SPACE_PACKAGE_SEARCH_TOKEN: ${{ secrets.SPACE_PACKAGE_SEARCH_TOKEN }}
SPACE_PACKAGE_SEARCH_USERNAME: ${{ secrets.SPACE_PACKAGE_SEARCH_USERNAME }}
CHANGE_NOTES: ${{ github.event.release.body }}
- name: Run :publishStablePluginToTBE task
run: ./gradlew :plugin:publishReleasePluginToTBE
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/publish-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ jobs:
env:
TOOLBOX_ENTERPRISE_TOKEN: ${{ secrets.TOOLBOX_ENTERPRISE_TOKEN }}
GRADLE_ENTERPRISE_KEY: ${{ secrets.GRADLE_ENTERPRISE_KEY }}
MAVEN_SPACE_PASSWORD: ${{ secrets.MAVEN_SPACE_PASSWORD }}
MAVEN_SPACE_USERNAME: ${{ secrets.MAVEN_SPACE_USERNAME }}
SPACE_INTELLIJ_NIGHTLIES_TOKEN: ${{ secrets.SPACE_INTELLIJ_NIGHTLIES_TOKEN }}
SPACE_INTELLIJ_NIGHTLIES_USERNAME: ${{ secrets.SPACE_INTELLIJ_NIGHTLIES_USERNAME }}
SPACE_PACKAGE_SEARCH_TOKEN: ${{ secrets.SPACE_PACKAGE_SEARCH_TOKEN }}
SPACE_PACKAGE_SEARCH_USERNAME: ${{ secrets.SPACE_PACKAGE_SEARCH_USERNAME }}
RUN_NUMBER: ${{ github.run_number }}
RUN_ATTEMPT: ${{ github.run_attempt }}
KMP: true
36 changes: 20 additions & 16 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name: Run tests
on:
pull_request:
branches: [ releases/233 ]

jobs:
gradle:
strategy:
Expand All @@ -13,9 +12,6 @@ jobs:
gradle-version: [ '5.6.4', '6.9.2', '7.6.4', '8.6' ]
name: Gradle ${{ matrix.gradle-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
env:
MAVEN_SPACE_PASSWORD: ${{ secrets.MAVEN_SPACE_PASSWORD }}
MAVEN_SPACE_USERNAME: ${{ secrets.MAVEN_SPACE_USERNAME }}
outputs:
result: ${{ steps.final_step.outputs.result }}
steps:
Expand All @@ -34,6 +30,10 @@ jobs:
GRADLE_VERSION: ${{ matrix.gradle-version }}
GRADLE_ENTERPRISE_KEY: ${{ secrets.GRADLE_ENTERPRISE_KEY }}
JAVA_VERSION: ${{matrix.jdk-version}}
SPACE_INTELLIJ_NIGHTLIES_TOKEN: ${{ secrets.SPACE_INTELLIJ_NIGHTLIES_TOKEN }}
SPACE_INTELLIJ_NIGHTLIES_USERNAME: ${{ secrets.SPACE_INTELLIJ_NIGHTLIES_USERNAME }}
SPACE_PACKAGE_SEARCH_TOKEN: ${{ secrets.SPACE_PACKAGE_SEARCH_TOKEN }}
SPACE_PACKAGE_SEARCH_USERNAME: ${{ secrets.SPACE_PACKAGE_SEARCH_USERNAME }}
run: ./gradlew :plugin:test --continue --tests "com.jetbrains.packagesearch.plugin.tests.end2end.projectservice.GradleProjectTest"
- name: Upload test result
if: always()
Expand All @@ -48,9 +48,6 @@ jobs:
os: [ ubuntu-latest, macos-latest, windows-latest ]
name: Maven on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
env:
MAVEN_SPACE_PASSWORD: ${{ secrets.MAVEN_SPACE_PASSWORD }}
MAVEN_SPACE_USERNAME: ${{ secrets.MAVEN_SPACE_USERNAME }}
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -66,6 +63,10 @@ jobs:
KMP: true
GRADLE_ENTERPRISE_KEY: ${{ secrets.GRADLE_ENTERPRISE_KEY }}
JAVA_VERSION: ${{matrix.jdk-version}}
SPACE_INTELLIJ_NIGHTLIES_TOKEN: ${{ secrets.SPACE_INTELLIJ_NIGHTLIES_TOKEN }}
SPACE_INTELLIJ_NIGHTLIES_USERNAME: ${{ secrets.SPACE_INTELLIJ_NIGHTLIES_USERNAME }}
SPACE_PACKAGE_SEARCH_TOKEN: ${{ secrets.SPACE_PACKAGE_SEARCH_TOKEN }}
SPACE_PACKAGE_SEARCH_USERNAME: ${{ secrets.SPACE_PACKAGE_SEARCH_USERNAME }}
run: ./gradlew :plugin:test --continue --tests "com.jetbrains.packagesearch.plugin.tests.end2end.projectservice.MavenProjectTest"
- name: Upload test result
if: always()
Expand All @@ -81,9 +82,6 @@ jobs:
gradle-version: [ '6.9.2', '7.6.4', '8.6' ]
name: KMP ${{ matrix.gradle-version }}
runs-on: ${{ matrix.os }}
env:
MAVEN_SPACE_PASSWORD: ${{ secrets.MAVEN_SPACE_PASSWORD }}
MAVEN_SPACE_USERNAME: ${{ secrets.MAVEN_SPACE_USERNAME }}
outputs:
result: ${{ steps.final_step.outputs.result }}
steps:
Expand All @@ -102,6 +100,10 @@ jobs:
GRADLE_VERSION: ${{ matrix.gradle-version }}
GRADLE_ENTERPRISE_KEY: ${{ secrets.GRADLE_ENTERPRISE_KEY }}
JAVA_VERSION: ${{matrix.jdk-version}}
SPACE_INTELLIJ_NIGHTLIES_TOKEN: ${{ secrets.SPACE_INTELLIJ_NIGHTLIES_TOKEN }}
SPACE_INTELLIJ_NIGHTLIES_USERNAME: ${{ secrets.SPACE_INTELLIJ_NIGHTLIES_USERNAME }}
SPACE_PACKAGE_SEARCH_TOKEN: ${{ secrets.SPACE_PACKAGE_SEARCH_TOKEN }}
SPACE_PACKAGE_SEARCH_USERNAME: ${{ secrets.SPACE_PACKAGE_SEARCH_USERNAME }}
run: ./gradlew :plugin:test --continue --tests "com.jetbrains.packagesearch.plugin.tests.end2end.projectservice.KMPGradleProjectTest"
- name: Upload test result
if: always()
Expand All @@ -118,9 +120,6 @@ jobs:
gradle-version: [ '7.6.4', '8.6' ]
name: Version Catalog ${{ matrix.gradle-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
env:
MAVEN_SPACE_PASSWORD: ${{ secrets.MAVEN_SPACE_PASSWORD }}
MAVEN_SPACE_USERNAME: ${{ secrets.MAVEN_SPACE_USERNAME }}
outputs:
result: ${{ steps.final_step.outputs.result }}
steps:
Expand All @@ -139,6 +138,10 @@ jobs:
GRADLE_VERSION: ${{ matrix.gradle-version }}
GRADLE_ENTERPRISE_KEY: ${{ secrets.GRADLE_ENTERPRISE_KEY }}
JAVA_VERSION: ${{matrix.jdk-version}}
SPACE_INTELLIJ_NIGHTLIES_TOKEN: ${{ secrets.SPACE_INTELLIJ_NIGHTLIES_TOKEN }}
SPACE_INTELLIJ_NIGHTLIES_USERNAME: ${{ secrets.SPACE_INTELLIJ_NIGHTLIES_USERNAME }}
SPACE_PACKAGE_SEARCH_TOKEN: ${{ secrets.SPACE_PACKAGE_SEARCH_TOKEN }}
SPACE_PACKAGE_SEARCH_USERNAME: ${{ secrets.SPACE_PACKAGE_SEARCH_USERNAME }}
run: ./gradlew :plugin:test --continue --tests "com.jetbrains.packagesearch.plugin.tests.end2end.projectservice.CatalogProjectTest"
- name: Upload test result
if: always()
Expand All @@ -149,9 +152,6 @@ jobs:
unit-tests:
name: Unit tests
runs-on: ubuntu-latest
env:
MAVEN_SPACE_PASSWORD: ${{ secrets.MAVEN_SPACE_PASSWORD }}
MAVEN_SPACE_USERNAME: ${{ secrets.MAVEN_SPACE_USERNAME }}
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -165,4 +165,8 @@ jobs:
- name: Run tests
env:
GRADLE_ENTERPRISE_KEY: ${{ secrets.GRADLE_ENTERPRISE_KEY }}
SPACE_INTELLIJ_NIGHTLIES_TOKEN: ${{ secrets.SPACE_INTELLIJ_NIGHTLIES_TOKEN }}
SPACE_INTELLIJ_NIGHTLIES_USERNAME: ${{ secrets.SPACE_INTELLIJ_NIGHTLIES_USERNAME }}
SPACE_PACKAGE_SEARCH_TOKEN: ${{ secrets.SPACE_PACKAGE_SEARCH_TOKEN }}
SPACE_PACKAGE_SEARCH_USERNAME: ${{ secrets.SPACE_PACKAGE_SEARCH_USERNAME }}
run: ./gradlew :plugin:utils:test
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ allprojects {
maven("https://cache-redirector.jetbrains.com/intellij-dependencies")
maven("https://packages.jetbrains.team/maven/p/ij/intellij-sdk-nightly") {
credentials {
username = getenv("MAVEN_SPACE_USERNAME")
username = getenv("SPACE_INTELLIJ_NIGHTLIES_USERNAME")
?: project.extra.getStringOrNull("space.intellij.username")
password = getenv("MAVEN_SPACE_PASSWORD")
password = getenv("SPACE_INTELLIJ_NIGHTLIES_TOKEN")
?: project.extra.getStringOrNull("space.intellij.password")
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import org.gradle.api.component.SoftwareComponentFactory
import org.gradle.api.file.DuplicatesStrategy
import org.gradle.api.internal.component.SoftwareComponentInternal
import org.gradle.api.plugins.ExtraPropertiesExtension
import org.gradle.api.publish.PublishingExtension
import org.gradle.api.plugins.internal.DefaultAdhocSoftwareComponent
import org.gradle.api.publish.PublishingExtension
import org.gradle.api.publish.maven.MavenPublication
import org.gradle.api.publish.maven.tasks.PublishToMavenRepository
import org.gradle.api.tasks.SourceSetContainer
Expand Down Expand Up @@ -191,8 +191,10 @@ fun RepositoryHandler.pkgsSpace(project: Project) {
name = "Space"
setUrl("https://packages.jetbrains.team/maven/p/kpm/public")
credentials {
username = System.getenv("MAVEN_SPACE_USERNAME") ?: project.extra.getStringOrNull("space.username")
password = System.getenv("MAVEN_SPACE_PASSWORD") ?: project.extra.getStringOrNull("space.password")
username = System.getenv("SPACE_PACKAGE_SEARCH_TOKEN")
?: project.extra.getStringOrNull("space.username")
password = System.getenv("SPACE_PACKAGE_SEARCH_USERNAME")
?: project.extra.getStringOrNull("space.password")
}
}
}
Expand Down

0 comments on commit 9a0efbf

Please sign in to comment.